Compile time type determination in C++

后端 未结 6 1828
囚心锁ツ
囚心锁ツ 2021-02-01 22:26

A coworker recently showed me some code that he found online. It appears to allow compile time determination of whether a type has an \"is a\" relationship with another type. I

6条回答
  •  清酒与你
    2021-02-01 23:18

    By the way, you can use __is_base_of from "type_traits" introduced in std::tr1 (MSCV 2008 compiler has intrinsics support for that).

提交回复
热议问题