#include #include #include using namespace std ; // Alias template template using MyVector = vector; // Alias template for a custom smart pointer template using MySmartPtr = std::unique_ptr; int main() { // Traditional typedef typedef std::vector IntVectorOld ; // C++11 using for type alias using IntVectorNew = std::vector ; IntVectorOld v1 ; v1.push_back( 2 ) ; IntVectorNew v2 ; v2.push_back( 2 ) ; MyVector v3 ; v3.push_back( 2 ) ; // Usage MySmartPtr ptr_to_int( new int(10) ) ; MySmartPtr ptr_to_double( new double(3.14) ) ; return 0; }