c++templatesc++14generic-programmingpolicy-based-design

Are named template arguments in the newest Standard or implemented in a contemporary compiler?


Named template arguments would arguably be a very important feature in C++. Namely, given a class template that has many template parameters with default arguments, this feature would allow the user to provide arguments for an arbitrary subset of these parameters. "C++ Templates: the Complete Guide" by Vandervoorde and Josuttis spends the whole Section 16.1 on achieving the effect of named template arguments.

Section 13.9 of the same book lists named template arguments as one of the features that are likely to be added to the language. Given both the fact that this estimation dates 12 years ago and the great utility of this feature, I would like to find out: have named template arguments made it into the newest Standard and/or been implemented in a contemporary compiler?

If the answer to the first question is negative, then I would like to understand what I am missing, that is: why is the need for this feature not as bad as I perceive it?


Solution

  • 1) No.

    2) Nobody has made any statement about "the need for this feature". The fact that it doesn't exist doesn't mean that it's not badly needed; it just means that nobody has successfully proposed it and convinced the committee of it.