Explore >> Select a destination


You are here

www.cplusplus.com
| | www.foonathan.net
5.2 parsecs away

Travel
| | Just like regular function parameters, template parameters can also have default parameters. For class templates, this behaves mostly just like default function arguments: if you pass fewer template arguments than required, default template arguments are used to fill the remaining places. However, for function templates, it gets more complicated as template parameters for functions can be deduced by the normal function arguments. This leads to some interesting side-effects. In particular, default argumen...
| | quuxplusone.github.io
4.4 parsecs away

Travel
| | Via StackOverflow: Newcomers to C++20 Ranges are often surprised that some ranges cannot be "const-iterated." But it's true! template<std::ranges::range R> void foreach(const R& rg) { // Wrong! for (auto&& elt : rg) { } }
| | www.fluentcpp.com
5.1 parsecs away

Travel
| | Variadic templates allow any number of template parameters of any type. In this article we see how to do a variadic number of parameters of the SAME type.
| | mpark.github.io
26.5 parsecs away

Travel
| The pitfall of eagerness of perfect forwarding.