How to check that template's parameter type is integral?

前端 未结 4 628
南笙
南笙 2021-01-12 09:11

In the description of some std template function I saw something like:

if the template parameter is of integral type, the behavior is such and such.

4条回答
  •  醉梦人生
    2021-01-12 09:46

    Boost.TypeTraits provides is_integral<>(), as described in another response, if your compiler does not yet support C++ features of the next standard.

提交回复
热议问题