測試2個類型相同的方法

    也許有的時候,咱們須要測試2個類型是否相同,恩,有幾種方法你能夠參考如下:     一、利用typeid,也許這是最多見的方法了:        template<class T, class U>        struct same_type        {        public:    operator bool()                {             
相關文章
相關標籤/搜索