They are almost completely redundant. As @Revolver noted, they were introduced in different papers, and alignment_of
comes from boost
nearly verbatim.
But that does not mean the trait is useless.
A template<class...>class
can be passed to other template
s and used with metaprogramming. Operators like alignof
cannot: you would have to write the template<class>class alignment_of
before you could pass it to metaprogramming facilities.
Now the same could be said of sizeof
needing a std::size_of<class>
template.
...
The addition of _v
was because they swept every ::value
integral_constant
-type template in std
and added a _v
variable template. Considering which ones where worthy and which not would be bikeshed painting and nearly pointless: it is easier to do every one than spend effort picking the worthy ones to do. It being done is not evidence the feature is not obsolete.