forked from fmtlib/fmt
Remove FMT_*_DETAIL_NAMESPACE
This commit is contained in:
@ -530,7 +530,7 @@ inline std::tm gmtime(
|
|||||||
return gmtime(std::chrono::system_clock::to_time_t(time_point));
|
return gmtime(std::chrono::system_clock::to_time_t(time_point));
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
// DEPRECATED!
|
// DEPRECATED!
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
@ -1997,7 +1997,7 @@ struct chrono_formatter {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
|
#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
|
||||||
using weekday = std::chrono::weekday;
|
using weekday = std::chrono::weekday;
|
||||||
@ -2142,8 +2142,8 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
|
|||||||
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
|
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
|
||||||
|
|
||||||
if (subsecs.count() < 0) {
|
if (subsecs.count() < 0) {
|
||||||
auto second = std::chrono::duration_cast<Duration>(
|
auto second =
|
||||||
std::chrono::seconds(1));
|
std::chrono::duration_cast<Duration>(std::chrono::seconds(1));
|
||||||
if (epoch.count() < ((Duration::min)() + second).count())
|
if (epoch.count() < ((Duration::min)() + second).count())
|
||||||
FMT_THROW(format_error("duration is too small"));
|
FMT_THROW(format_error("duration is too small"));
|
||||||
subsecs += second;
|
subsecs += second;
|
||||||
|
@ -203,7 +203,7 @@ struct rgb {
|
|||||||
uint8_t b;
|
uint8_t b;
|
||||||
};
|
};
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
// color is a struct of either a rgb color or a terminal color.
|
// color is a struct of either a rgb color or a terminal color.
|
||||||
struct color_type {
|
struct color_type {
|
||||||
@ -225,8 +225,7 @@ struct color_type {
|
|||||||
uint32_t rgb_color;
|
uint32_t rgb_color;
|
||||||
} value;
|
} value;
|
||||||
};
|
};
|
||||||
|
} // namespace detail
|
||||||
FMT_END_DETAIL_NAMESPACE
|
|
||||||
|
|
||||||
/** A text style consisting of foreground and background colors and emphasis. */
|
/** A text style consisting of foreground and background colors and emphasis. */
|
||||||
class text_style {
|
class text_style {
|
||||||
@ -323,7 +322,7 @@ FMT_CONSTEXPR inline text_style operator|(emphasis lhs, emphasis rhs) noexcept {
|
|||||||
return text_style(lhs) | rhs;
|
return text_style(lhs) | rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
template <typename Char> struct ansi_color_escape {
|
template <typename Char> struct ansi_color_escape {
|
||||||
FMT_CONSTEXPR ansi_color_escape(detail::color_type text_color,
|
FMT_CONSTEXPR ansi_color_escape(detail::color_type text_color,
|
||||||
@ -457,7 +456,7 @@ void vformat_to(buffer<Char>& buf, const text_style& ts,
|
|||||||
if (has_style) detail::reset_color<Char>(buf);
|
if (has_style) detail::reset_color<Char>(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
inline void vprint(std::FILE* f, const text_style& ts, string_view fmt,
|
inline void vprint(std::FILE* f, const text_style& ts, string_view fmt,
|
||||||
format_args args) {
|
format_args args) {
|
||||||
|
@ -48,11 +48,6 @@
|
|||||||
|
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
|
|
||||||
#ifndef FMT_BEGIN_DETAIL_NAMESPACE
|
|
||||||
# define FMT_BEGIN_DETAIL_NAMESPACE namespace detail {
|
|
||||||
# define FMT_END_DETAIL_NAMESPACE }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
|
#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
|
||||||
# define FMT_INLINE_VARIABLE inline
|
# define FMT_INLINE_VARIABLE inline
|
||||||
#else
|
#else
|
||||||
@ -1126,7 +1121,7 @@ template <typename Locale> class format_facet : public Locale::facet {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
// Returns true if value is negative, false otherwise.
|
// Returns true if value is negative, false otherwise.
|
||||||
// Same as `value < 0` but doesn't produce warnings if T is an unsigned type.
|
// Same as `value < 0` but doesn't produce warnings if T is an unsigned type.
|
||||||
@ -3893,7 +3888,7 @@ FMT_API void format_error_code(buffer<char>& out, int error_code,
|
|||||||
|
|
||||||
FMT_API void report_error(format_func func, int error_code,
|
FMT_API void report_error(format_func func, int error_code,
|
||||||
const char* message) noexcept;
|
const char* message) noexcept;
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
FMT_API auto vsystem_error(int error_code, string_view format_str,
|
FMT_API auto vsystem_error(int error_code, string_view format_str,
|
||||||
format_args args) -> std::system_error;
|
format_args args) -> std::system_error;
|
||||||
@ -4264,7 +4259,7 @@ FMT_NODISCARD auto to_string(const basic_memory_buffer<Char, SIZE>& buf)
|
|||||||
return std::basic_string<Char>(buf.data(), size);
|
return std::basic_string<Char>(buf.data(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
|
void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
|
||||||
@ -4347,7 +4342,7 @@ extern template FMT_API auto decimal_point_impl(locale_ref) -> char;
|
|||||||
extern template FMT_API auto decimal_point_impl(locale_ref) -> wchar_t;
|
extern template FMT_API auto decimal_point_impl(locale_ref) -> wchar_t;
|
||||||
#endif // FMT_HEADER_ONLY
|
#endif // FMT_HEADER_ONLY
|
||||||
|
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
#if FMT_USE_USER_DEFINED_LITERALS
|
#if FMT_USE_USER_DEFINED_LITERALS
|
||||||
inline namespace literals {
|
inline namespace literals {
|
||||||
|
@ -123,10 +123,10 @@ using wcstring_view = basic_cstring_view<wchar_t>;
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
FMT_API const std::error_category& system_category() noexcept;
|
FMT_API const std::error_category& system_category() noexcept;
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
FMT_API void format_windows_error(buffer<char>& out, int error_code,
|
FMT_API void format_windows_error(buffer<char>& out, int error_code,
|
||||||
const char* message) noexcept;
|
const char* message) noexcept;
|
||||||
FMT_END_DETAIL_NAMESPACE
|
}
|
||||||
|
|
||||||
FMT_API std::system_error vwindows_error(int error_code, string_view format_str,
|
FMT_API std::system_error vwindows_error(int error_code, string_view format_str,
|
||||||
format_args args);
|
format_args args);
|
||||||
@ -328,7 +328,7 @@ class FMT_API file {
|
|||||||
// Returns the memory page size.
|
// Returns the memory page size.
|
||||||
long getpagesize();
|
long getpagesize();
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
struct buffer_size {
|
struct buffer_size {
|
||||||
buffer_size() = default;
|
buffer_size() = default;
|
||||||
@ -387,7 +387,7 @@ class file_buffer final : public buffer<char> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
// Added {} below to work around default constructor error known to
|
// Added {} below to work around default constructor error known to
|
||||||
// occur in Xcode versions 7.2.1 and 8.2.1.
|
// occur in Xcode versions 7.2.1 and 8.2.1.
|
||||||
|
@ -52,7 +52,7 @@ template <typename Char> class basic_printf_context {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FMT_BEGIN_DETAIL_NAMESPACE
|
namespace detail {
|
||||||
|
|
||||||
// Checks if a value fits in int - used to avoid warnings about comparing
|
// Checks if a value fits in int - used to avoid warnings about comparing
|
||||||
// signed and unsigned integers.
|
// signed and unsigned integers.
|
||||||
@ -553,7 +553,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
|
|||||||
}
|
}
|
||||||
write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
|
write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
|
||||||
}
|
}
|
||||||
FMT_END_DETAIL_NAMESPACE
|
} // namespace detail
|
||||||
|
|
||||||
using printf_context = basic_printf_context<char>;
|
using printf_context = basic_printf_context<char>;
|
||||||
using wprintf_context = basic_printf_context<wchar_t>;
|
using wprintf_context = basic_printf_context<wchar_t>;
|
||||||
|
Reference in New Issue
Block a user