diff --git a/groups/bsl/bslim/bslim_bslstandardheadertest.t.cpp b/groups/bsl/bslim/bslim_bslstandardheadertest.t.cpp index cd1f1000fc..4ef90d4bb4 100644 --- a/groups/bsl/bslim/bslim_bslstandardheadertest.t.cpp +++ b/groups/bsl/bslim/bslim_bslstandardheadertest.t.cpp @@ -229,6 +229,10 @@ using namespace BloombergLP; #endif #endif +#if defined(BSLS_PLATFORM_CMP_CLANG) && BSLS_PLATFORM_CMP_VERSION >= 100000 +#pragma clang diagnostic ignored "-Wconstant-evaluated" +#endif + //============================================================================= // TEST PLAN //----------------------------------------------------------------------------- diff --git a/groups/bsl/bslmf/bslmf_invokeresult.xt.cpp b/groups/bsl/bslmf/bslmf_invokeresult.xt.cpp index bf408f4edb..a9e78d398a 100644 --- a/groups/bsl/bslmf/bslmf_invokeresult.xt.cpp +++ b/groups/bsl/bslmf/bslmf_invokeresult.xt.cpp @@ -38,9 +38,10 @@ #ifdef BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC #pragma GCC diagnostic ignored "-Wvolatile" - #ifdef BSLS_PLATFORM_CMP_CLANG - #pragma GCC diagnostic ignored "-Wdeprecated-volatile" - #endif +#endif + +#if defined(BSLS_PLATFORM_CMP_CLANG) && BSLS_PLATFORM_CMP_VERSION >= 100000 + #pragma clang diagnostic ignored "-Wdeprecated-volatile" #endif using namespace BloombergLP; diff --git a/groups/bsl/bslmf/bslmf_invokeresult_cpp03.xt.cpp b/groups/bsl/bslmf/bslmf_invokeresult_cpp03.xt.cpp index b2d482cac3..17bc6ec593 100644 --- a/groups/bsl/bslmf/bslmf_invokeresult_cpp03.xt.cpp +++ b/groups/bsl/bslmf/bslmf_invokeresult_cpp03.xt.cpp @@ -15,7 +15,7 @@ // delimited regions of C++11 code, then this test driver is a minimal 'main' // program that tests nothing and is not '#include'd in the original. // -// Generated on Tue Oct 1 13:55:03 2024 +// Generated on Wed Dec 18 17:14:49 2024 // Command line: sim_cpp11_features.pl bslmf_invokeresult.xt.cpp // Expanded test driver only when compiling bslmf_invokeresult.cpp @@ -27,9 +27,10 @@ #ifdef BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC #pragma GCC diagnostic ignored "-Wvolatile" - #ifdef BSLS_PLATFORM_CMP_CLANG - #pragma GCC diagnostic ignored "-Wdeprecated-volatile" - #endif +#endif + +#if defined(BSLS_PLATFORM_CMP_CLANG) && BSLS_PLATFORM_CMP_VERSION >= 100000 + #pragma clang diagnostic ignored "-Wdeprecated-volatile" #endif using namespace BloombergLP; diff --git a/groups/bsl/bslstl/bslstl_function_rep.t.cpp b/groups/bsl/bslstl/bslstl_function_rep.t.cpp index 772df8accb..82dcb6a8da 100644 --- a/groups/bsl/bslstl/bslstl_function_rep.t.cpp +++ b/groups/bsl/bslstl/bslstl_function_rep.t.cpp @@ -44,7 +44,6 @@ using namespace BloombergLP; #ifdef BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC #pragma GCC diagnostic ignored "-Wclass-memaccess" -#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion" #endif // ============================================================================ @@ -779,65 +778,65 @@ enum { // possibly ORed with `e_HAS_ALLOCATOR`) and each combination of bitwise // movable and nothrow move-constructible qualities. #define GEN_FUNCTOR_TYPES(SIZE_ALLOC) \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor + TestFunctor<(int)SIZE_ALLOC >, \ + TestFunctor<(int)SIZE_ALLOC | e_NTMOVE>, \ + TestFunctor<(int)SIZE_ALLOC | e_BITWISE >, \ + TestFunctor<(int)SIZE_ALLOC | e_BITWISE | e_NTMOVE> // A good variety of functor types touching all the corner cases #define COMMON_FUNCTOR_TYPES \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor + TestFunctor<(int)e_SML >, \ + TestFunctor<(int)e_SML | e_NTMOVE>, \ + TestFunctor<(int)e_MED | e_BITWISE >, \ + TestFunctor<(int)e_MED | e_BITWISE | e_NTMOVE>, \ + TestFunctor<(int)e_MED | e_ALLOC >, \ + TestFunctor<(int)e_MED | e_ALLOC | e_NTMOVE>, \ + TestFunctor<(int)e_SML | e_ALLOC | e_BITWISE >, \ + TestFunctor<(int)e_SML | e_ALLOC | e_BITWISE | e_NTMOVE>, \ + TestFunctor<(int)e_LRG >, \ + TestFunctor<(int)e_LRG | e_ALLOC | e_BITWISE | e_NTMOVE> // A few callable types wrapped in `bslalg::NothrowMovableUtil`. The small and // medium ones are the only ones where behavior would change. #define NTWRAP_T(V) bslalg::NothrowMovableWrapper #define NTMOVE_FUNCTOR_TYPES \ NTWRAP_T(PtrToFunc_t ), \ - NTWRAP_T(TestFunctor), \ - NTWRAP_T(TestFunctor), \ - NTWRAP_T(TestFunctor), \ - NTWRAP_T(TestFunctor), \ - NTWRAP_T(TestFunctor), \ - NTWRAP_T(TestFunctor) + NTWRAP_T(TestFunctor<(int)e_SML >), \ + NTWRAP_T(TestFunctor<(int)e_MED | e_BITWISE >), \ + NTWRAP_T(TestFunctor<(int)e_MED | e_BITWISE | e_NTMOVE>), \ + NTWRAP_T(TestFunctor<(int)e_MED | e_ALLOC >), \ + NTWRAP_T(TestFunctor<(int)e_LRG >), \ + NTWRAP_T(TestFunctor<(int)e_LRG | e_ALLOC | e_NTMOVE>) #define SMALL_FUNCTOR_TYPES \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor + TestFunctor<(int)e_SML >, \ + TestFunctor<(int)e_SML | e_NTMOVE>, \ + TestFunctor<(int)e_SML | e_BITWISE >, \ + TestFunctor<(int)e_SML | e_BITWISE | e_NTMOVE>, \ + TestFunctor<(int)e_SML | e_ALLOC >, \ + TestFunctor<(int)e_SML | e_ALLOC | e_NTMOVE>, \ + TestFunctor<(int)e_SML | e_ALLOC | e_BITWISE >, \ + TestFunctor<(int)e_SML | e_ALLOC | e_BITWISE | e_NTMOVE> #define MEDIUM_FUNCTOR_TYPES \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor + TestFunctor<(int)e_MED >, \ + TestFunctor<(int)e_MED | e_NTMOVE>, \ + TestFunctor<(int)e_MED | e_BITWISE >, \ + TestFunctor<(int)e_MED | e_BITWISE | e_NTMOVE>, \ + TestFunctor<(int)e_MED | e_ALLOC >, \ + TestFunctor<(int)e_MED | e_ALLOC | e_NTMOVE>, \ + TestFunctor<(int)e_MED | e_ALLOC | e_BITWISE >, \ + TestFunctor<(int)e_MED | e_ALLOC | e_BITWISE | e_NTMOVE> #define LARGE_FUNCTOR_TYPES \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor, \ - TestFunctor + TestFunctor<(int)e_LRG >, \ + TestFunctor<(int)e_LRG | e_NTMOVE>, \ + TestFunctor<(int)e_LRG | e_BITWISE >, \ + TestFunctor<(int)e_LRG | e_BITWISE | e_NTMOVE>, \ + TestFunctor<(int)e_LRG | e_ALLOC >, \ + TestFunctor<(int)e_LRG | e_ALLOC | e_NTMOVE>, \ + TestFunctor<(int)e_LRG | e_ALLOC | e_BITWISE >, \ + TestFunctor<(int)e_LRG | e_ALLOC | e_BITWISE | e_NTMOVE> /// Namespace to test `Function_Rep` for target of specified `TYPE`. template diff --git a/groups/bsl/bslstl/bslstl_hashtable.xt.cpp b/groups/bsl/bslstl/bslstl_hashtable.xt.cpp index ecf82078a6..6349aa17ca 100644 --- a/groups/bsl/bslstl/bslstl_hashtable.xt.cpp +++ b/groups/bsl/bslstl/bslstl_hashtable.xt.cpp @@ -60,6 +60,10 @@ using namespace BloombergLP; +#if defined(BSLS_PLATFORM_CMP_CLANG) && BSLS_PLATFORM_CMP_VERSION >= 100000 +#pragma clang diagnostic ignored "-Wdeprecated-copy" +#endif + // ============================================================================ // TEST PLAN // ---------------------------------------------------------------------------- @@ -789,7 +793,6 @@ namespace TestTypes { /// template specialization if this class were a template, and that is not /// supported by the C++ language. class MostEvilTestType { - private: bsltf::NonEqualComparableTestType d_data; diff --git a/groups/bsl/bslstl/bslstl_map_test3.t.cpp b/groups/bsl/bslstl/bslstl_map_test3.t.cpp index 53b4bd166d..8aa61a8deb 100644 --- a/groups/bsl/bslstl/bslstl_map_test3.t.cpp +++ b/groups/bsl/bslstl/bslstl_map_test3.t.cpp @@ -5925,7 +5925,7 @@ struct TestDeductionGuides { typedef std::allocator > SA7; typedef std::initializer_list> IL7; - IL7 il7({{1L, 1L}, {2L, 3L}}); + IL7 il7{{1L, 1L}, {2L, 3L}}; bsl::map m7a(il7); bsl::map m7b(il7, CompT7{}); bsl::map m7c(il7, CompT7{}, BA7{}); @@ -5945,7 +5945,7 @@ struct TestDeductionGuides { typedef std::allocator > SA8; typedef std::initializer_list> IL8; - IL8 il8({{3LL, 3LL}, {2LL, 1LL}}); + IL8 il8{{3LL, 3LL}, {2LL, 1LL}}; bsl::map m8a(il8, BA8{}); bsl::map m8b(il8, a1); bsl::map m8c(il8, a2); diff --git a/groups/bsl/bslstl/bslstl_multimap_test.t.cpp b/groups/bsl/bslstl/bslstl_multimap_test.t.cpp index b3923e0601..d112ff0f82 100644 --- a/groups/bsl/bslstl/bslstl_multimap_test.t.cpp +++ b/groups/bsl/bslstl/bslstl_multimap_test.t.cpp @@ -8655,7 +8655,7 @@ struct TestDeductionGuides { typedef std::allocator > SA7; typedef std::initializer_list> IL7; - IL7 il7({{1L, 1L}, {2L, 3L}}); + IL7 il7{{1L, 1L}, {2L, 3L}}; bsl::multimap m7a(il7); bsl::multimap m7b(il7, CompT7{}); bsl::multimap m7c(il7, CompT7{}, BA7{}); @@ -8675,7 +8675,7 @@ struct TestDeductionGuides { typedef std::allocator > SA8; typedef std::initializer_list> IL8; - IL8 il8({{3LL, 3LL}, {2LL, 1LL}}); + IL8 il8{{3LL, 3LL}, {2LL, 1LL}}; bsl::multimap m8a(il8, BA8{}); bsl::multimap m8b(il8, a1); bsl::multimap m8c(il8, a2); diff --git a/groups/bsl/bslstl/bslstl_multiset_test.t.cpp b/groups/bsl/bslstl/bslstl_multiset_test.t.cpp index f42a1b1aa5..da6ea42a9e 100644 --- a/groups/bsl/bslstl/bslstl_multiset_test.t.cpp +++ b/groups/bsl/bslstl/bslstl_multiset_test.t.cpp @@ -8292,7 +8292,7 @@ struct TestDeductionGuides { typedef long T7; typedef std::greater CompT7; - std::initializer_list il7({1L, 2L, 3L}); + std::initializer_list il7{1L, 2L, 3L}; bsl::multiset ms7a(il7); bsl::multiset ms7b(il7, CompT7{}); @@ -8313,7 +8313,7 @@ struct TestDeductionGuides { bsl::multiset>); typedef long long T8; - std::initializer_list il8({3LL, 2LL, 1LL}); + std::initializer_list il8{3LL, 2LL, 1LL}; bsl::multiset ms8a(il8, bsl::allocator{}); bsl::multiset ms8b(il8, a1); diff --git a/groups/bsl/bslstl/bslstl_set_test.t.cpp b/groups/bsl/bslstl/bslstl_set_test.t.cpp index 38e44d5b70..11abfdc1b4 100644 --- a/groups/bsl/bslstl/bslstl_set_test.t.cpp +++ b/groups/bsl/bslstl/bslstl_set_test.t.cpp @@ -8246,7 +8246,7 @@ struct TestDeductionGuides { typedef long T7; typedef std::greater CompT7; - std::initializer_list il7({1L, 2L, 3L}); + std::initializer_list il7{1L, 2L, 3L}; bsl::set s7a(il7); bsl::set s7b(il7, CompT7{}); @@ -8267,7 +8267,7 @@ struct TestDeductionGuides { bsl::set>); typedef long long T8; - std::initializer_list il8({3LL, 2LL, 1LL}); + std::initializer_list il8{3LL, 2LL, 1LL}; bsl::set s8a(il8, bsl::allocator{}); bsl::set s8b(il8, a1); diff --git a/groups/bsl/bslstl/bslstl_vector.xt.cpp b/groups/bsl/bslstl/bslstl_vector.xt.cpp index e4121c2dde..119366d0cb 100644 --- a/groups/bsl/bslstl/bslstl_vector.xt.cpp +++ b/groups/bsl/bslstl/bslstl_vector.xt.cpp @@ -69,6 +69,13 @@ #include #include +#if defined(BSLS_PLATFORM_CMP_CLANG) + #pragma clang diagnostic ignored "-Wunneeded-internal-declaration" + #if BSLS_PLATFORM_CMP_VERSION >= 100000 + #pragma clang diagnostic ignored "-Wdeprecated-copy" + #endif +#endif + // Don't put any `using` declaration or directive here, see swap helpers below. //============================================================================= @@ -2793,16 +2800,11 @@ void debugprint(const BitwiseNotAssignable& v) /// Non-copyable but movable type. class MoveOnlyType { - - // DATA - void *ptr; public: // CREATORS /// Create a `MoveOnlyType` object. - MoveOnlyType() : ptr(0) - { - } + MoveOnlyType() = default; MoveOnlyType(MoveOnlyType &&) = default; MoveOnlyType(const MoveOnlyType &) = delete;