Template metaprogramming: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.04b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
Line 294:
</syntaxhighlight>
 
==Concepts==
==New possibilites in metaprogramming thanks to concepts==
The C++20 standard bringsbrought C++ programmers a new toolstool for meta template programming, which are concepts.<ref>https://en.cppreference.com/w/cpp/language/constraints</ref>
 
ThanksConcepts toallow them,programmers now programmer canto specify requirements for the type, to make instantationinstantiation of template possible. The compiler looks for a template with the concept that has the highest requirements.
Moreover standard says, that compiler should look for template with concpet, that has highest requirements.
 
Here is an example of the famous [[Fizz buzz]] problem fully resolvedsolved with Template Meta Programming.
 
<syntaxhighlight lang="cpp">