Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move fmt_detail namespace under the main fmt namespace #4328

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading