/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

hackingcpp.com
| | www.cppstories.com

From dynamic container operations to compile-time constants, C++ offers a variety of techniques (as in this famous Meme :)). In this article, we'll delve into advanced initialization methods likereserve() and emplace_backfor containers to tuples with piecewise_construct and forward_as_tuple. Thanks to those techniques, we can reduce the number of temporary objects and create variables more efficiently.
3.3 parsecs

Travel
| |
| | studiofreya.org

[AI summary] A C++11 variadic template example demonstrating perfect forwarding to wrap constructor calls for a structure.
3.5 parsecs

Travel
| |
| | eyakubovich.github.io

Suppose we need to write a factory function that constructs a runtime polymorphic object. For the purposes of this post, let's say we want to construct a concrete shape object - a rectangle, triangle, or an ellipse. Here are our basic declarations: 1 2 3 4 5 6 7 8...
4.8 parsecs

Travel
| |
| | blog.melashri.net

How C++ std:move is actually just specialized cast .
18.0 parsecs

Travel
|