From 8a3e5dd918a2fe0454cf94cd84387b7a24481d20 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Fri, 21 Oct 2022 11:13:13 +0200 Subject: [PATCH] added workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 --- test/unordered/init_type_insert_tests.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/unordered/init_type_insert_tests.cpp b/test/unordered/init_type_insert_tests.cpp index 2de991fb..1fc2f229 100644 --- a/test/unordered/init_type_insert_tests.cpp +++ b/test/unordered/init_type_insert_tests.cpp @@ -21,7 +21,9 @@ struct move_only } }; -template <> struct std::hash +namespace std{ + +template <> struct hash { std::size_t operator()(move_only const& mo) const noexcept { @@ -29,6 +31,8 @@ template <> struct std::hash } }; +} // namespace std + struct raii_tracker { static int move_constructs; @@ -59,7 +63,9 @@ struct raii_tracker } }; -template <> struct std::hash +namespace std{ + +template <> struct hash { std::size_t operator()(raii_tracker const& rt) const noexcept { @@ -67,6 +73,8 @@ template <> struct std::hash } }; +} // namespace std + int raii_tracker::move_constructs = 0; int raii_tracker::copy_constructs = 0;