Disallow specializing bitset and ratio by frederick-vs-ja · Pull Request #5937 · microsoft/STL (original) (raw)

std::bitset or std::ratio only take constant template parameters, so none of their specialization can depend on a type. As a result, although they are not explicitly disallowed to be specialized, it is impossible to provide any valid program-defined specialization.

It's not very clear to me whether it's OK to reject all program-defined ratio_add specializations and their friends. It seems that there can be valid program-defined ratio_add partial specializations that are always ill-formed on instantiation due to static_assert, which is squirrelly🐿️.