Skip to content

Commit

Permalink
add fmt::format specialization for REL::Version
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Sep 26, 2024
1 parent 08220ca commit 3a18e4d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/REL/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,15 @@ struct std::formatter<REL::Version, CharT> : formatter<std::string, CharT>
}
};
#endif

#ifdef FMT_VERSION
template <class CharT>
struct fmt::formatter<REL::Version, CharT> : formatter<std::string, CharT>
{
template <class FormatContext>
auto format(const REL::Version a_version, FormatContext& a_ctx) const
{
return formatter<std::string, CharT>::format(a_version.string(), a_ctx);
}
};
#endif

0 comments on commit 3a18e4d

Please sign in to comment.