Skip to content

Commit

Permalink
Suppress a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Aug 8, 2021
1 parent bdfbd79 commit d57b2a6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,17 @@ inline auto do_write(const std::tm& time, const std::locale& loc, char format,
#else
using code_unit = char32_t;
#endif
auto& f = std::use_facet<std::codecvt<code_unit, char, std::mbstate_t>>(loc);

using codecvt = std::codecvt<code_unit, char, std::mbstate_t>;
#if FMT_CLANG_VERSION
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated"
auto& f = std::use_facet<codecvt>(loc);
# pragma clang diagnostic pop
#else
auto& f = std::use_facet<codecvt>(loc);
#endif

auto mb = std::mbstate_t();
const char* from_next = nullptr;
code_unit* to_next = nullptr;
Expand Down

0 comments on commit d57b2a6

Please sign in to comment.