constexpr和内联constexpr全局变量之间的区别

时间:2019-08-29 07:07:32

标签: c++ global-variables c++17 inline constexpr

C ++ 17引入了 helper变量模板

template <typename T>
inline constexpr bool is_integral_v = is_integral<T>::value;

但是我看到很多人在定义自己的特征时错过了inline关键字,这是否等于关注?

template <typename T>
constexpr bool is_integral_v = is_integral<T>::value;

0 个答案:

没有答案