3 ms·
Yeah, it's fairly basic, and most of this is in the usual c++ docs like cppreference.com But... Is template meta-programming a required feature of a C++ dev?
by jvanderbot 4y ago
Yeah, it's fairly basic, and most of this is in the usual c++ docs like cppreference.com
But...
Is template meta-programming a required feature of a C++ dev?
double-bracket is ... an edge case of usual [] overloading, isn't it?
- ur-whale 4y agoThese are just examples to make a point. And: https://arne-mertz.de/2016/12/modern-c-features-attributes/ https://arne-mertz.de/2016/12/modern-c-features-attributes/
- stonemetal12 4y agoTemplates are a major feature of the language, leaving it out seems a little weird.
- d_tr 4y agoLooks like an ongoing work so more will probably be available in the future. I see an example for templates. Template metaprogramming is more advanced but would be nice to include.
- sva_ 4y agoThese? https://cppbyexample.com/templates.html https://cppbyexample.com/templates.html
- ur-whale 4y agoThat's just templates. I'm talking about stuff like this: https://en.wikipedia.org/wiki/Template_metaprogramming#Static_Table_Generation https://en.wikipedia.org/wiki/Template_metaprogramming#Stati...
- ncmncm 4y agoIt has been years since I was tempted to template metaprogramming. It is a specialist technique being made redundant by straightforward language features that compile much faster.
- jvanderbot 4y agoYeah. I've never seen this in practice except as premature optimization or solving a problem in code that can be solved easier elsewhere.