C++17 introduced various helper variable templates, e.g.,
template< class T, class U >
inline constexpr bool is_same_v = is_same<T, U>::value;
template< class T >
inline constexpr bool is_aggregate_v = is_aggregate<T>::value;
They are all marked inline
. Since constexpr
implies internal linkage by default [ref], even without inline
, the one definition rule will not be violated. So I don't see inline
necessary here. Neither do I see any benefit it brings. So why inline
?