Commit 1dfa2591 authored by Charles Milette's avatar Charles Milette Committed by Victor Zverovich

Make operator _a constexpr

parent 6f2dd30e
...@@ -3527,11 +3527,13 @@ FMT_CONSTEXPR internal::udl_formatter<wchar_t> operator"" _format( ...@@ -3527,11 +3527,13 @@ FMT_CONSTEXPR internal::udl_formatter<wchar_t> operator"" _format(
fmt::print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); fmt::print("Elapsed time: {s:.2f} seconds", "s"_a=1.23);
\endrst \endrst
*/ */
inline internal::udl_arg<char> operator"" _a(const char* s, std::size_t) { FMT_CONSTEXPR internal::udl_arg<char> operator"" _a(const char* s,
return {s}; std::size_t n) {
return {{s, n}};
} }
inline internal::udl_arg<wchar_t> operator"" _a(const wchar_t* s, std::size_t) { FMT_CONSTEXPR internal::udl_arg<wchar_t> operator"" _a(const wchar_t* s,
return {s}; std::size_t n) {
return {{s, n}};
} }
} // namespace literals } // namespace literals
#endif // FMT_USE_USER_DEFINED_LITERALS #endif // FMT_USE_USER_DEFINED_LITERALS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment