Skip to content

Commit

Permalink
move fmt_detail namespace under the main fmt namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd committed Jan 26, 2025
1 parent 4946bdb commit 6b54860
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "format.h"

FMT_BEGIN_NAMESPACE

namespace fmt_detail {
struct time_zone {
template <typename Duration, typename T>
Expand All @@ -37,8 +39,6 @@ template <typename... T> inline auto current_zone(T...) -> time_zone* {
template <typename... T> inline void _tzset(T...) {}
} // namespace fmt_detail

FMT_BEGIN_NAMESPACE

// Enable safe chrono durations, unless explicitly disabled.
#ifndef FMT_SAFE_DURATION_CAST
# define FMT_SAFE_DURATION_CAST 1
Expand Down Expand Up @@ -522,8 +522,8 @@ auto to_time_t(sys_time<Duration> time_point) -> std::time_t {
// Workaround a bug in libstdc++ which sets __cpp_lib_chrono to 201907 without
// providing current_zone(): https://github.com/fmtlib/fmt/issues/4160.
template <typename T> FMT_CONSTEXPR auto has_current_zone() -> bool {
using namespace std::chrono;
using namespace fmt_detail;
using std::chrono::current_zone;
using fmt_detail::current_zone;
return !std::is_same<decltype(current_zone()), fmt_detail::time_zone*>::value;
}
} // namespace detail
Expand Down

0 comments on commit 6b54860

Please sign in to comment.