Still no fixed template syntax
Posted Mar 29, 2013 13:12 UTC (Fri) by
HelloWorld (guest, #56129)
Parent article:
A look at C++14, part 1
A major pain point in C++ template programming is the ambiguity between the less-than operator and the opening angle bracket for template parameters. That's what makes the typename and template keywords necessary in all kinds of crazy places.
It's 2013, Unicode has existed for ages and it's time to put it to use. They should allow proper angle brackets (unicode characters U+3008 and U+3009) for template parameters in addition to the conventional syntax.
template<typename T>
typename std::enable_if<T::template foo<42>::value, T>::type bla();
would become
template〈typename T〉
std::enable_if〈T::template foo〈42〉::value, T〉::type bla();
Much nicer.
(
Log in to post comments)