I have a type TimeDuration
. Right now it is literal type and I can use it as non-type template parameter. Such usage is very far away (compilation-wise) from type definition, so if anybody modifies TimeDuration
such that it is no loner literal, it will be noticed much later.
So I put static_assert(std::is_literal_type_v<TimeDuration>);
just after class definition. However, is_literal_type
is deleted in c++20. What can I replace this with?
I know about Deprecated std::is_literal_type in C++17, but the answer basically says that my problem doesn't exist.