diff --git a/include/fmt/base.h b/include/fmt/base.h index f5a45563..18c8de58 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -686,17 +686,6 @@ struct has_to_string_view< T, void_t()))>> : std::true_type {}; -template struct string_literal { - static constexpr Char value[sizeof...(C)] = {C...}; - constexpr operator basic_string_view() const { - return {value, sizeof...(C)}; - } -}; -#if FMT_CPLUSPLUS < 201703L -template -constexpr Char string_literal::value[sizeof...(C)]; -#endif - enum class type { none_type, // Integer types should go first, diff --git a/include/fmt/format.h b/include/fmt/format.h index 59ae206a..6278489a 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -278,6 +278,17 @@ template using std_string_view = std::basic_string_view; template struct std_string_view {}; #endif +template struct string_literal { + static constexpr Char value[sizeof...(C)] = {C...}; + constexpr operator basic_string_view() const { + return {value, sizeof...(C)}; + } +}; +#if FMT_CPLUSPLUS < 201703L +template +constexpr Char string_literal::value[sizeof...(C)]; +#endif + // Implementation of std::bit_cast for pre-C++20. template FMT_CONSTEXPR20 auto bit_cast(const From& from) -> To {