// Introducing a template alias (4ed, page 694) - a slight improvement. // Conditional example - adapted from www.cplusplus.com. #include #include // Conditional is a syntactical embellishment of the application of underlying conditional template: template using Conditional = typename std::conditional::type; int main() { using namespace std; using A = Conditional; // select int using B = Conditional; // select float using C = Conditional::value,long,int>; // select long - because type A is int using D = Conditional::value,long,int>; // select int - because B is float // ... }