Template type check C++

前端 未结 6 747
日久生厌
日久生厌 2021-01-14 17:48

I have a template function which takes in objects. I need to determine whether the object is derived from a particular base class. If it is derived from the base class, I ne

6条回答
  •  情话喂你
    2021-01-14 18:33

    Boost.TypeTraits boost::is_base_of

    const bool is = boost::is_base_of::value;
    

    How does `is_base_of` work?

提交回复
热议问题