c++11 模板的别名

c++11 模板的别名

 

#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <vector>
#include <map>

using uint = unsigned int;
typedef unsigned int UINT;
using sint = int;


void mytest()
{
    //std::is_same 判断类型是否一致
    //这个结构体作用很简单,就是两个一样的类型会返回true
    std::cout << is_same<uint, UINT>::value << std::endl; // 1

    return;
}


int main()
{
    mytest();

    system("pause");
    return 0;
}

 

posted @ 2017-11-05 15:07  lsgxeva  阅读(948)  评论(0编辑  收藏  举报