|
|
|
|
|
by rian
4122 days ago
|
|
C++ templates do have "protocols," they just aren't necessary. The result is that the perpetrator of a template error is ambiguous. check out type traits: http://en.cppreference.com/w/cpp/types
and std::enable_if: http://en.cppreference.com/w/cpp/types/enable_if "concepts lite" is a proposal to add syntactic sugar for type traits as well as enhance them a bit. in general this is how C++ does things now: first add library-level solutions as far as possible, then add language-level syntactic sugar once the usage and implementation is fully understood. |
|