C++Guns – RoboBlog

22.02.2019

C++ Guns: rvalue referenz, forwarding referenz, universal referenz WTF?

Filed under: Allgemein — Tags: — Thomas @ 18:02

Die gute Nachricht: Normale Menschen müssen das alles nicht verstehen. Auch Anwendungs- Programmierer und library designer brauchen die Details nicht zu wissen. Ihr könnt meine Regeln durchlesen, daran halten und dann STOP. Die Details sind für Leute, die sich einem 1.5h Vortrag über && anhören können. Streng genommen wird der Begriff "universal referenz" nicht im […]

C+ Guns: ACPL ownership transfer

Filed under: Allgemein — Tags: — Thomas @ 18:02

acpl::moveOwnership bietet im Gegensatz zu std::move den Vorteil, dass ein move-from const Variablen einen Fehler zur Compilezeit erzeugt. Zwei Beispiele sollen ownership transfer verdeutlichen. Daten in ein Type moven und dort speichern. Daten entweder kopieren oder durch eine Funktion moven. Move von const Variablen ist nicht möglich, da die Variablen geändert werden würden, was nicht […]

15.02.2019

C++ Guns: class template specialization with concepts aka C++20 std::ranges::value_type

Filed under: Allgemein — Tags: — Thomas @ 20:02

You can create a constrain for a class. And another constrain for the same class. Isn't this crazy stuff? With this we can build something like an identity function for types, like std::type_identity, for value_type. It's something like the C++17 non-member functions size() and empty(). Why must value_type be a member? It can be a […]

03.02.2019

C++ Guns: ACPL proudly presents: BinaryHeap

Filed under: Allgemein — Thomas @ 21:02

See also ACPL: Histogram1D ACPL: Histogram2D BinaryHeap as array implemente priority queue. Good for way finding graph algorithmen like dijkstra. See source code and more code examples at ACPL Binary Heap 7 tasks Most important: solve RC tasks with priority 1 6 tasks left Next 3 tasks: tax return with priority 2 clear drains with […]

C++ Guns: ACPL proudly presents: Histogram2D

Filed under: Allgemein — Tags: — Thomas @ 21:02

See also ACPL: Histogram1D ACPL: BinaryHeap Create even 2D Histogram in a fast and intuitive way. Define TWO access functions, Axis, Range, Titles, get stochastic moments for every dimension. Enjoy the 2D ASCII art output. See source code and more code examples at ACPL Histogram 2D City temperature VS air pressure Axis: temp [degree] Number […]

C++ Guns: ACPL proudly presents: Histogram1D

Filed under: Allgemein — Tags: — Thomas @ 21:02

See also ACPL: Histogram2D ACPL: BinaryHeap Create 1D Histogram in a fast and intuitive way. Define an Axis, Range, Title, get stochastic moments. Enjoy the ASCII art output. See source code and more code examples at ACPL Histogram 1D City temperature Axis: temp [degree] Number of bins: 50 bin width 0.242 Under/ Overflow count: 0 […]

Powered by WordPress