In the book by Bjarne Straustrup "Programming. Principles and practice using C ++, 2nd edition.", Chapter 19, paragraph 19.3.3 it is written that in C ++ 14 we can use and apply to the template arguments some concept or requirements of the template.
template<typename T> // Для всех типов T requires Element<T>() // таких, что является Element class vector { // . . . }; Here are a couple of concepts that are provided in the book (there are many of them):
Element<E> (): Е может быть элементом контейнера Number<N> () : N ведет себя как число, поддерживая операции +, -, * и /. But this code is not compiled. Please explain if there is a keyword requires and, in general, the concept of templates in C ++?
is_detectedand SFINAE - int3