2015年11月2日

check member function

摘要: templatestruct has_member_foo11{private: template static auto check(int) -> decltype(std::declval().foo(), std::true_type()); template static st... 阅读全文

posted @ 2015-11-02 13:58 qicosmos(江南) 阅读(1369) 评论(0) 推荐(0) 编辑

CHECK MEMBER TYPE

摘要: 检查类里是否存在某种类型的几种方法,以检查xxx类型为例:方法1:templateclass has_member_type_Type{ struct big { char a[2]; }; template static big probe(typename C::xxx*); //... 阅读全文

posted @ 2015-11-02 10:14 qicosmos(江南) 阅读(1504) 评论(1) 推荐(0) 编辑

导航