|
You are here |
www.lukas-barth.net | ||
| | | | |
www.foonathan.net
|
|
| | | | | 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... | |
| | | | |
mcyoung.xyz
|
|
| | | | | ||
| | | | |
blog.knatten.org
|
|
| | | | | Quiz time! Which of the following programs can you expect to not compile? For bonus points, which are required by the C++ standard to not compile? Program 1 Program 2 Program 3 In case you're not familiar with static_assert, it takes a constant boolean expression, and if it evaluates to false, you get a compilation... | |
| | | | |
arne-mertz.de
|
|
| | | Having covered the basics of `auto` and rvalue references, there is a third big new C++ feature definitely worth knowing about: creating function objects on the fly with lambda expressions. | ||