From b9a3ecaa149b2618c1c09792f54f85a903ef87d8 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 7 Dec 2022 19:05:19 +0000 Subject: [PATCH] Fix some C++23 testing issues: Deprecated type_traits and non-const operator==. Fixes https://github.com/boostorg/config/issues/460 --- test/boost_no_cxx11_hdr_type_traits.ipp | 3 +++ test/boost_no_unified_init.ipp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/boost_no_cxx11_hdr_type_traits.ipp b/test/boost_no_cxx11_hdr_type_traits.ipp index ad7a8801..43833206 100644 --- a/test/boost_no_cxx11_hdr_type_traits.ipp +++ b/test/boost_no_cxx11_hdr_type_traits.ipp @@ -99,8 +99,11 @@ int test() using std::remove_all_extents; using std::remove_pointer; using std::add_pointer; +#if !((__cplusplus > 202002L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 202002L))) + // deprecated in C++23: using std::aligned_storage; using std::aligned_union; +#endif using std::decay; using std::enable_if; using std::conditional; diff --git a/test/boost_no_unified_init.ipp b/test/boost_no_unified_init.ipp index 428c8f43..a755f337 100644 --- a/test/boost_no_unified_init.ipp +++ b/test/boost_no_unified_init.ipp @@ -34,7 +34,7 @@ struct IdString { std::string name; int identifier; - bool operator == (const IdString& other) + bool operator == (const IdString& other)const { return identifier == other.identifier && name == other.name; }