diff --git a/boost-math b/boost-math index f395de082ec..c56f334348d 160000 --- a/boost-math +++ b/boost-math @@ -1 +1 @@ -Subproject commit f395de082eca6ee993a15f2bdb90277eda518295 +Subproject commit c56f334348d5476783fba996d604fc5c6ae980c3 diff --git a/docs/cgmanifest.json b/docs/cgmanifest.json index a7d932b2729..d6f5dd7612f 100644 --- a/docs/cgmanifest.json +++ b/docs/cgmanifest.json @@ -6,7 +6,7 @@ "type": "git", "git": { "repositoryUrl": "https://github.com/boostorg/math", - "commitHash": "f395de082eca6ee993a15f2bdb90277eda518295" + "commitHash": "c56f334348d5476783fba996d604fc5c6ae980c3" } } }, diff --git a/stl/CMakeLists.txt b/stl/CMakeLists.txt index 64ee93e9055..6c2e456eedf 100644 --- a/stl/CMakeLists.txt +++ b/stl/CMakeLists.txt @@ -247,7 +247,6 @@ set(HEADERS ${CMAKE_CURRENT_LIST_DIR}/inc/xnode_handle.h ${CMAKE_CURRENT_LIST_DIR}/inc/xpolymorphic_allocator.h ${CMAKE_CURRENT_LIST_DIR}/inc/xsmf_control.h - ${CMAKE_CURRENT_LIST_DIR}/inc/xstddef ${CMAKE_CURRENT_LIST_DIR}/inc/xstring ${CMAKE_CURRENT_LIST_DIR}/inc/xthreads.h ${CMAKE_CURRENT_LIST_DIR}/inc/xtimec.h diff --git a/stl/inc/header-units.json b/stl/inc/header-units.json index 0d21964d524..345af8adf51 100644 --- a/stl/inc/header-units.json +++ b/stl/inc/header-units.json @@ -153,7 +153,6 @@ "xnode_handle.h", "xpolymorphic_allocator.h", "xsmf_control.h", - "xstddef", "xstring", "xthreads.h", "xtimec.h", diff --git a/stl/inc/limits b/stl/inc/limits index cd4bbf056f9..b957442428a 100644 --- a/stl/inc/limits +++ b/stl/inc/limits @@ -36,7 +36,8 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -_EXPORT_STD enum float_denorm_style { // constants for different IEEE float denormalization styles +// constants for different IEEE float denormalization styles +_EXPORT_STD enum _CXX23_DEPRECATE_DENORM float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 @@ -51,8 +52,11 @@ _EXPORT_STD enum float_round_style { // constants for different IEEE rounding st }; struct _Num_base { // base for all types, with common defaults - static constexpr float_denorm_style has_denorm = denorm_absent; - static constexpr bool has_denorm_loss = false; + _STL_DISABLE_DEPRECATED_WARNING + _CXX23_DEPRECATE_DENORM static constexpr float_denorm_style has_denorm = denorm_absent; + _CXX23_DEPRECATE_DENORM static constexpr bool has_denorm_loss = false; + _STL_RESTORE_DEPRECATED_WARNING + static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; @@ -134,7 +138,10 @@ struct _Num_int_base : _Num_base { // base for integer types }; struct _Num_float_base : _Num_base { // base for floating-point types - static constexpr float_denorm_style has_denorm = denorm_present; + _STL_DISABLE_DEPRECATED_WARNING + _CXX23_DEPRECATE_DENORM static constexpr float_denorm_style has_denorm = denorm_present; + _STL_RESTORE_DEPRECATED_WARNING + static constexpr bool has_infinity = true; static constexpr bool has_quiet_NaN = true; static constexpr bool has_signaling_NaN = true; diff --git a/stl/inc/map b/stl/inc/map index eaca60e2932..b7e1cb601c8 100644 --- a/stl/inc/map +++ b/stl/inc/map @@ -77,8 +77,6 @@ public: _MISMATCHED_ALLOCATOR_MESSAGE("map", "pair")); static_assert(is_object_v<_Kty>, "The C++ Standard forbids containers of non-object types " "because of [container.requirements]."); - static_assert(is_object_v<_Ty>, "The C++ Standard forbids containers of non-object types " - "because of [container.requirements]."); using _Mybase = _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, false>>; using _Nodeptr = typename _Mybase::_Nodeptr; @@ -463,8 +461,6 @@ public: _MISMATCHED_ALLOCATOR_MESSAGE("multimap", "pair")); static_assert(is_object_v<_Kty>, "The C++ Standard forbids containers of non-object types " "because of [container.requirements]."); - static_assert(is_object_v<_Ty>, "The C++ Standard forbids containers of non-object types " - "because of [container.requirements]."); using _Mybase = _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, true>>; using key_type = _Kty; diff --git a/stl/inc/type_traits b/stl/inc/type_traits index c51ef667b26..3d26f56f401 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -8,8 +8,9 @@ #define _TYPE_TRAITS_ #include #if _STL_COMPILER_PREPROCESSOR +#include #include -#include +#include #pragma pack(push, _CRT_PACKING) #pragma warning(push, _STL_WARNING_LEVEL) @@ -19,6 +20,10 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN +template +// TRANSITION, CWG-2518: false value attached to a dependent name (for static_assert) +_INLINE_VAR constexpr bool _Always_false = false; + _EXPORT_STD template struct integer_sequence { // sequence of integer parameters static_assert(is_integral_v<_Ty>, "integer_sequence requires T to be an integral type."); diff --git a/stl/inc/unordered_map b/stl/inc/unordered_map index 40561f6eb79..dee66749bfc 100644 --- a/stl/inc/unordered_map +++ b/stl/inc/unordered_map @@ -71,8 +71,6 @@ public: _MISMATCHED_ALLOCATOR_MESSAGE("unordered_map", "pair")); static_assert(is_object_v<_Kty>, "The C++ Standard forbids containers of non-object types " "because of [container.requirements]."); - static_assert(is_object_v<_Ty>, "The C++ Standard forbids containers of non-object types " - "because of [container.requirements]."); private: using _Mytraits = _Uhash_compare<_Kty, _Hasher, _Keyeq>; @@ -563,8 +561,6 @@ public: "unordered_multimap", "pair")); static_assert(is_object_v<_Kty>, "The C++ Standard forbids containers of non-object types " "because of [container.requirements]."); - static_assert(is_object_v<_Ty>, "The C++ Standard forbids containers of non-object types " - "because of [container.requirements]."); private: using _Mytraits = _Uhash_compare<_Kty, _Hasher, _Keyeq>; diff --git a/stl/inc/xstddef b/stl/inc/xstddef deleted file mode 100644 index ffa37dfcc08..00000000000 --- a/stl/inc/xstddef +++ /dev/null @@ -1,32 +0,0 @@ -// xstddef internal header (core) - -// Copyright (c) Microsoft Corporation. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#pragma once -#ifndef _XSTDDEF_ -#define _XSTDDEF_ -#include -#if _STL_COMPILER_PREPROCESSOR -#include -#include - -#pragma pack(push, _CRT_PACKING) -#pragma warning(push, _STL_WARNING_LEVEL) -#pragma warning(disable : _STL_DISABLED_WARNINGS) -_STL_DISABLE_CLANG_WARNINGS -#pragma push_macro("new") -#undef new - -_STD_BEGIN -template -// TRANSITION, CWG-2518: false value attached to a dependent name (for static_assert) -_INLINE_VAR constexpr bool _Always_false = false; -_STD_END - -#pragma pop_macro("new") -_STL_RESTORE_CLANG_WARNINGS -#pragma warning(pop) -#pragma pack(pop) -#endif // _STL_COMPILER_PREPROCESSOR -#endif // _XSTDDEF_ diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index b1fc9a6c944..02308dbbfab 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -365,6 +365,7 @@ // _HAS_CXX23 and _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS control: // P1413R3 Deprecate aligned_storage And aligned_union +// P2614R2 Deprecating float_denorm_style, numeric_limits::has_denorm, numeric_limits::has_denorm_loss // Other C++23 deprecation warnings // Parallel Algorithms Notes @@ -1431,7 +1432,18 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect #define _CXX23_DEPRECATE_UNIX_STREAMS #endif // ^^^ warning disabled ^^^ -// next warning number: STL4042 +#if _HAS_CXX23 && !defined(_SILENCE_CXX23_DENORM_DEPRECATION_WARNING) \ + && !defined(_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS) +#define _CXX23_DEPRECATE_DENORM \ + [[deprecated("warning STL4042: " \ + "std::float_denorm_style, std::numeric_limits::has_denorm, and std::numeric_limits::has_denorm_loss " \ + "are deprecated in C++23. You can define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING or " \ + "_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.")]] +#else // ^^^ warning enabled / warning disabled vvv +#define _CXX23_DEPRECATE_DENORM +#endif // ^^^ warning disabled ^^^ + +// next warning number: STL4043 // next error number: STL1006 diff --git a/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp b/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp index 466a658ba69..296ca936c4a 100644 --- a/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp +++ b/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp @@ -3048,6 +3048,17 @@ void assert_container() { check_all_specific_requirements(); } +// MapLike is squirrelly, but appears to be permitted. +template