3 ms·
Oh neat. Also thanks for reducing the use to a 'small' example. Why does the author use a struct and "shell{true}" rather than creating a function or a class t
by ant6n 11y ago
Oh neat. Also thanks for reducing the use to a 'small' example.
Why does the author use a struct and "shell{true}" rather than creating a function or a class that would allow "shell(true)". Love for braces? Performance?
EDIT: also I wonder whether there's a way to create helper definitions to allow defining named parameters like this in a more concise way. This recursive template expansion business tends to result in long code.
- ant6n 11y agoOk, so it seems the use of braces (use of "Uniform initialization syntax") in constructors is to reduce the ambiguity with declaring functions and declaring+initializing variables. This wiki entry has more: https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.org/wiki/Most_vexing_parse
- souperhanz 11y agoIt's a very good day. I get to just say "exactly" again. :)