Skip to content

Commit

Permalink
Fixed redefinition error when compiling with G++12
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Albrecht authored and johnmcfarlane committed Jul 23, 2023
1 parent 3ef9b0e commit 781d03f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/unit/presentations/cppcon2017.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace filesystem = std::filesystem;
template<typename Rep = int, int Exponent = 0, int Radix = 2>
using fixed_point = cnl::scaled_integer<Rep, cnl::power<Exponent, Radix>>;

#if !defined(_MSC_VER) || _MSC_VER < 1932 // wg21.link/LWG3657
#if (defined(_MSC_VER) && _MSC_VER < 1932) || (defined(__GNUC__) && __cplusplus < 201703L) // wg21.link/LWG3657
template<>
struct std::hash<filesystem::path> {
auto operator()(filesystem::path const& p) const
Expand Down
2 changes: 1 addition & 1 deletion test/unit/presentations/cppdub2018.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using cnl::make_scaled_integer;
using cnl::power;
using cnl::scaled_integer;

#if !defined(_MSC_VER) || _MSC_VER < 1932 // wg21.link/LWG3657
#if (defined(_MSC_VER) && _MSC_VER < 1932) || (defined(__GNUC__) && __cplusplus < 201703L) // wg21.link/LWG3657
template<>
struct std::hash<filesystem::path> {
auto operator()(filesystem::path const& p) const
Expand Down

0 comments on commit 781d03f

Please sign in to comment.