Skip to content

Commit

Permalink
Merge pull request #1618 from DARMA-tasking/1605-fmt-custom-namespace
Browse files Browse the repository at this point in the history
#1605 fmt custom namespace
  • Loading branch information
lifflander authored Dec 22, 2021
2 parents afcd064 + 9cb5849 commit a5e6009
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/fmt/include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@
# define FMT_INLINE_NAMESPACE namespace
# define FMT_END_NAMESPACE \
} \
using namespace v7; \
using namespace vt; \
}
# endif
# define FMT_BEGIN_NAMESPACE \
namespace fmt { \
FMT_INLINE_NAMESPACE v7 {
FMT_INLINE_NAMESPACE vt {
#endif

#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
Expand Down Expand Up @@ -500,7 +500,7 @@ constexpr basic_string_view<typename S::char_type> to_string_view(const S& s) {

namespace detail {
void to_string_view(...);
using fmt::v7::to_string_view;
using fmt::to_string_view;

// Specifies whether S is a string type convertible to fmt::basic_string_view.
// It should be a constexpr function but MSVC 2017 fails to compile it in
Expand Down
4 changes: 2 additions & 2 deletions src/vt/elm/elm_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace fmt {

/// Custom fmt formatter/print for \c vt::elm::ElementIDStruct
template <>
struct formatter<vt::elm::ElementIDStruct> {
struct formatter<::vt::elm::ElementIDStruct> {
/// Presentation format:
/// - 'x' - hex (default)
/// - 'd' - decimal
Expand All @@ -127,7 +127,7 @@ struct formatter<vt::elm::ElementIDStruct> {
/// Formats the epoch using the parsed format specification (presentation)
/// stored in this formatter.
template <typename FormatContext>
auto format(vt::elm::ElementIDStruct const& e, FormatContext& ctx) {
auto format(::vt::elm::ElementIDStruct const& e, FormatContext& ctx) {
std::string id_format =
presentation == 'b' ? "{:b}" : (presentation == 'd' ? "{:d}" : "{:x}");
auto fmt_str = "(" + id_format + ",{},{},{})";
Expand Down
4 changes: 2 additions & 2 deletions src/vt/epoch/epoch_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace fmt {

/// Custom fmt formatter/print for \c EpochType
template <>
struct formatter<vt::epoch::EpochType> {
struct formatter<::vt::epoch::EpochType> {
/// Presentation format:
/// - 'x' - hex (default)
/// - 'd' - decimal
Expand All @@ -141,7 +141,7 @@ struct formatter<vt::epoch::EpochType> {
/// Formats the epoch using the parsed format specification (presentation)
/// stored in this formatter.
template <typename FormatContext>
auto format(vt::epoch::EpochType const& e, FormatContext& ctx) {
auto format(::vt::epoch::EpochType const& e, FormatContext& ctx) {
return format_to(
ctx.out(),
presentation == 'b' ? "{:b}" : (presentation == 'd' ? "{:d}" : "{:x}"),
Expand Down

0 comments on commit a5e6009

Please sign in to comment.