fix gcc 13 problems · phprus/unordered_dense@50310a5 · GitHub
Skip to content

Commit 50310a5

Browse files
committed
fix gcc 13 problems
1 parent cfde579 commit 50310a5

4 files changed

Lines changed: 31 additions & 23 deletions

File tree

scripts/build.py

Lines changed: 18 additions & 18 deletions

test/bench/game_of_life.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@
99
#include <vector>
1010

1111
#if __has_include("boost/unordered/unordered_flat_map.hpp")
12-
# pragma clang diagnostic ignored "-Wold-style-cast"
12+
# if defined(__clang__)
13+
# pragma clang diagnostic ignored "-Wold-style-cast"
14+
# endif
1315
# include "boost/unordered/unordered_flat_map.hpp"
1416
# define HAS_BOOST_UNORDERED_FLAT_MAP() 1 // NOLINT(cppcoreguidelines-macro-usage)
1517
#else
1618
# define HAS_BOOST_UNORDERED_FLAT_MAP() 0 // NOLINT(cppcoreguidelines-macro-usage)
1719
#endif
1820

1921
#if 0 && __has_include("absl/container/flat_hash_map.h")
20-
# pragma clang diagnostic ignored "-Wdeprecated-builtins"
21-
# pragma clang diagnostic ignored "-Wsign-conversion"
22+
# if defined(__clang__)
23+
# pragma clang diagnostic ignored "-Wdeprecated-builtins"
24+
# pragma clang diagnostic ignored "-Wsign-conversion"
25+
# endif
2226
# include <absl/container/flat_hash_map.h>
2327
# define HAS_ABSL() 1 // NOLINT(cppcoreguidelines-macro-usage)
2428
#else

test/bench/show_allocations.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
#include <third-party/nanobench.h>
77

88
#if __has_include("boost/unordered/unordered_flat_map.hpp")
9-
# pragma clang diagnostic push
10-
# pragma clang diagnostic ignored "-Wold-style-cast"
9+
# if defined(__clang__)
10+
# pragma clang diagnostic push
11+
# pragma clang diagnostic ignored "-Wold-style-cast"
12+
# endif
1113
# include "boost/unordered/unordered_flat_map.hpp"
1214
# define HAS_BOOST_UNORDERED_FLAT_MAP() 1 // NOLINT(cppcoreguidelines-macro-usage)
1315
#else

test/meson.build

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)