Make operator _a constexpr

This commit is contained in:
Charles Milette 2019-07-27 18:04:51 -04:00 committed by Victor Zverovich
parent 6f2dd30e38
commit 1dfa2591b3

View File

@ -3527,11 +3527,13 @@ FMT_CONSTEXPR internal::udl_formatter<wchar_t> operator"" _format(
fmt::print("Elapsed time: {s:.2f} seconds", "s"_a=1.23);
\endrst
*/
inline internal::udl_arg<char> operator"" _a(const char* s, std::size_t) {
return {s};
FMT_CONSTEXPR internal::udl_arg<char> operator"" _a(const char* s,
std::size_t n) {
return {{s, n}};
}
inline internal::udl_arg<wchar_t> operator"" _a(const wchar_t* s, std::size_t) {
return {s};
FMT_CONSTEXPR internal::udl_arg<wchar_t> operator"" _a(const wchar_t* s,
std::size_t n) {
return {{s, n}};
}
} // namespace literals
#endif // FMT_USE_USER_DEFINED_LITERALS