diff --git a/.clang-format b/.clang-format index 76504cac07..6c2d849e5b 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# https://releases.llvm.org/15.0.0/tools/clang/docs/ClangFormatStyleOptions.html +# https://releases.llvm.org/16.0.0/tools/clang/docs/ClangFormatStyleOptions.html --- # Language: Cpp @@ -42,17 +42,20 @@ AlignConsecutiveMacros: Consecutive AlignEscapedNewlines: Left # AlignOperands: Align AlignOperands: AlignAfterOperator -# AlignTrailingComments: true -AlignTrailingComments: false +# AlignTrailingComments: +# Kind: Always +# OverEmptyLines: 0 +AlignTrailingComments: + Kind: Never # AllowAllArgumentsOnNextLine: true # AllowAllParametersOfDeclarationOnNextLine: true -# AllowShortEnumsOnASingleLine: true # AllowShortBlocksOnASingleLine: Never # AllowShortCaseLabelsOnASingleLine: false +# AllowShortEnumsOnASingleLine: true # AllowShortFunctionsOnASingleLine: All AllowShortFunctionsOnASingleLine: Empty -# AllowShortLambdasOnASingleLine: All # AllowShortIfStatementsOnASingleLine: Never +# AllowShortLambdasOnASingleLine: All # AllowShortLoopsOnASingleLine: false # AlwaysBreakAfterDefinitionReturnType: None # AlwaysBreakAfterReturnType: None @@ -63,17 +66,18 @@ AlwaysBreakTemplateDeclarations: Yes # - __capability # BinPackArguments: true # BinPackParameters: true +# BitFieldColonSpacing: Both # BraceWrapping: # AfterCaseLabel: false # AfterClass: false # AfterControlStatement: Never # AfterEnum: false +# AfterExternBlock: false # AfterFunction: false # AfterNamespace: false # AfterObjCDeclaration: false # AfterStruct: false # AfterUnion: false -# AfterExternBlock: false # BeforeCatch: false # BeforeElse: false # BeforeLambdaBody: false @@ -82,36 +86,30 @@ AlwaysBreakTemplateDeclarations: Yes # SplitEmptyFunction: true # SplitEmptyRecord: true # SplitEmptyNamespace: true +# BreakAfterAttributes: Never +# BreakAfterJavaFieldAnnotations: false +# BreakArrays: true # BreakBeforeBinaryOperators: None BreakBeforeBinaryOperators: NonAssignment # BreakBeforeConceptDeclarations: Always # BreakBeforeBraces: Attach -# BreakBeforeInheritanceComma: false -# BreakInheritanceList: BeforeColon +# BreakBeforeInlineASMColon: OnlyMultiline # BreakBeforeTernaryOperators: true -# BreakConstructorInitializersBeforeComma: false # BreakConstructorInitializers: BeforeColon -# BreakAfterJavaFieldAnnotations: false +# BreakInheritanceList: BeforeColon # BreakStringLiterals: true # ColumnLimit: 80 ColumnLimit: 120 # CommentPragmas: '^ IWYU pragma:' -# QualifierAlignment: Leave # CompactNamespaces: false # ConstructorInitializerIndentWidth: 4 # ContinuationIndentWidth: 4 # Cpp11BracedListStyle: true -# DeriveLineEnding: true -DeriveLineEnding: false # DerivePointerAlignment: false # DisableFormat: false # EmptyLineAfterAccessModifier: Never # EmptyLineBeforeAccessModifier: LogicalBlock # ExperimentalAutoDetectBinPacking: false -# PackConstructorInitializers: BinPack -# BasedOnStyle: '' -# ConstructorInitializerAllOnOneLineOrOnePerLine: false -# AllowAllConstructorInitializersOnNextLine: true # FixNamespaceComments: true # ForEachMacros: # - foreach @@ -152,12 +150,12 @@ IncludeCategories: # IncludeIsMainRegex: '(Test)?$' # IncludeIsMainSourceRegex: '' # IndentAccessModifiers: false -# IndentCaseLabels: false # IndentCaseBlocks: false IndentCaseBlocks: true +# IndentCaseLabels: false +# IndentExternBlock: AfterExternBlock # IndentGotoLabels: true # IndentPPDirectives: None -# IndentExternBlock: AfterExternBlock # IndentRequiresClause: true # IndentWidth: 2 IndentWidth: 4 @@ -165,11 +163,22 @@ IndentWidth: 4 IndentWrappedFunctionNames: true # InsertBraces: false InsertBraces: true +# InsertNewlineAtEOF: false +InsertNewlineAtEOF: true # InsertTrailingCommas: None +# IntegerLiteralSeparator: +# Binary: 0 +# BinaryMinDigits: 0 +# Decimal: 0 +# DecimalMinDigits: 0 +# Hex: 0 +# HexMinDigits: 0 # JavaScriptQuotes: Leave # JavaScriptWrapImports: true # KeepEmptyLinesAtTheStartOfBlocks: true # LambdaBodyIndentation: Signature +# LineEnding: DeriveLF +LineEnding: CRLF # NOTE: MacroBlockBegin/MacroBlockEnd don't work with _CATCH_ALL. # MacroBlockBegin: '' # MacroBlockEnd: '' @@ -182,6 +191,7 @@ NamespaceIndentation: All # ObjCBreakBeforeNestedBlockParam: true # ObjCSpaceAfterProperty: false # ObjCSpaceBeforeProtocolList: true +# PackConstructorInitializers: BinPack # PenaltyBreakAssignment: 2 # PenaltyBreakBeforeFirstCallParameter: 19 # PenaltyBreakComment: 300 @@ -190,24 +200,29 @@ NamespaceIndentation: All # PenaltyBreakString: 1000 # PenaltyBreakTemplateDeclaration: 10 # PenaltyExcessCharacter: 1000000 -# PenaltyReturnTypeOnItsOwnLine: 60 # PenaltyIndentedWhitespace: 0 +# PenaltyReturnTypeOnItsOwnLine: 60 # PointerAlignment: Right PointerAlignment: Left # PPIndentWidth: -1 +# QualifierAlignment: Leave # ReferenceAlignment: Pointer # ReflowComments: true # RemoveBracesLLVM: false +# RemoveSemicolon: false +RemoveSemicolon: true # RequiresClausePosition: OwnLine +# RequiresExpressionIndentation: OuterScope # SeparateDefinitionBlocks: Leave # ShortNamespaceLines: 1 # SortIncludes: CaseSensitive # SortJavaStaticImport: Before -# SortUsingDeclarations: true +# SortUsingDeclarations: LexicographicNumeric # SpaceAfterCStyleCast: false SpaceAfterCStyleCast: true # SpaceAfterLogicalNot: false # SpaceAfterTemplateKeyword: true +# SpaceAroundPointerQualifiers: Default # SpaceBeforeAssignmentOperators: true # SpaceBeforeCaseColon: false # SpaceBeforeCpp11BracedList: false @@ -227,8 +242,8 @@ SpaceAfterCStyleCast: true SpaceBeforeParens: Custom SpaceBeforeParensOptions: AfterRequiresInClause: true -# SpaceAroundPointerQualifiers: Default # SpaceBeforeRangeBasedForLoopColon: true +# SpaceBeforeSquareBrackets: false # SpaceInEmptyBlock: false # SpaceInEmptyParentheses: false # SpacesBeforeTrailingComments: 1 @@ -241,8 +256,6 @@ SpaceBeforeParensOptions: # Maximum: -1 # SpacesInParentheses: false # SpacesInSquareBrackets: false -# SpaceBeforeSquareBrackets: false -# BitFieldColonSpacing: Both # Standard: Latest # StatementAttributeLikeMacros: # - Q_EMIT @@ -261,13 +274,11 @@ StatementMacros: - _EXTERN_C_UNLESS_PURE - _END_EXTERN_C_UNLESS_PURE # TabWidth: 8 -# UseCRLF: false -UseCRLF: true # UseTab: Never # WhitespaceSensitiveMacros: -# - STRINGIZE -# - PP_STRINGIZE # - BOOST_PP_STRINGIZE -# - NS_SWIFT_NAME # - CF_SWIFT_NAME +# - NS_SWIFT_NAME +# - PP_STRINGIZE +# - STRINGIZE ... diff --git a/README.md b/README.md index 5dcc910d8e..bb6c91125e 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With The Visual Studio IDE -1. Install Visual Studio 2022 17.6 Preview 3 or later. +1. Install Visual Studio 2022 17.7 Preview 1 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. @@ -157,7 +157,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With A Native Tools Command Prompt -1. Install Visual Studio 2022 17.6 Preview 3 or later. +1. Install Visual Studio 2022 17.7 Preview 1 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index c5731b52fb..43d697251d 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) { $PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe' # https://github.com/PowerShell/PowerShell/releases/latest - $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.zip' + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip' Write-Host "Downloading: $PowerShellZipUrl" $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5baa036c05..a23bd04bd6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ variables: benchmarkBuildOutputLocation: 'D:\benchmark' pool: - name: 'StlBuild-2023-04-11T1428-Pool' + name: 'StlBuild-2023-05-16T1204-Pool' demands: EnableSpotVM -equals true pr: diff --git a/stl/inc/__msvc_int128.hpp b/stl/inc/__msvc_int128.hpp index d0bb3167b3..a537b05f7b 100644 --- a/stl/inc/__msvc_int128.hpp +++ b/stl/inc/__msvc_int128.hpp @@ -43,14 +43,17 @@ _STD_BEGIN #if defined(_M_X64) && !defined(_M_ARM64EC) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \ && !defined(__INTEL_COMPILER) #define _STL_128_INTRINSICS 1 -#ifdef __clang__ // clang doesn't have _udiv128 / _div128 -#define _STL_128_DIV_INTRINSICS 0 -#else // ^^^ Clang / other vvv -#define _STL_128_DIV_INTRINSICS 1 -#endif // ^^^ detect _udiv128 / _div128 ^^^ +#ifdef __clang__ +#define _STL_128_ADD_SUB_INTRINSICS 0 // clang doesn't have _addcarry_u64 / _subborrow_u64 +#define _STL_128_DIV_INTRINSICS 0 // clang doesn't have _udiv128 / _div128 +#else // ^^^ Clang / other compilers vvv +#define _STL_128_ADD_SUB_INTRINSICS 1 +#define _STL_128_DIV_INTRINSICS 1 +#endif // ^^^ other compilers ^^^ #else // ^^^ intrinsics available / intrinsics unavailable vvv -#define _STL_128_INTRINSICS 0 -#define _STL_128_DIV_INTRINSICS 0 +#define _STL_128_INTRINSICS 0 +#define _STL_128_ADD_SUB_INTRINSICS 0 +#define _STL_128_DIV_INTRINSICS 0 #endif // ^^^ intrinsics unavailable ^^^ struct @@ -111,11 +114,11 @@ struct static constexpr unsigned char _AddCarry64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_INTRINSICS +#if _STL_128_ADD_SUB_INTRINSICS if (!_Is_constant_evaluated()) { return _addcarry_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_INTRINSICS +#endif // _STL_128_ADD_SUB_INTRINSICS const uint64_t _Sum = _Left + _Right + _Carry; _Result = _Sum; @@ -125,11 +128,11 @@ struct static constexpr unsigned char _SubBorrow64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_INTRINSICS +#if _STL_128_ADD_SUB_INTRINSICS if (!_Is_constant_evaluated()) { return _subborrow_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_INTRINSICS +#endif // _STL_128_ADD_SUB_INTRINSICS const auto _Difference = _Left - _Right - _Carry; _Result = _Difference; @@ -511,7 +514,7 @@ struct return __qhat; #else // ^^^ 128-bit intrinsics / no such intrinsics vvv #if _HAS_CXX20 - auto __d = _STD countl_zero(_Den._Word[1]); + auto __d = _STD countl_zero(_Den._Word[1]); #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv auto __d = _Countl_zero_fallback(_Den._Word[1]); #endif // ^^^ !_HAS_CXX20 ^^^ @@ -646,7 +649,7 @@ struct } #else // ^^^ 128-bit intrinsics / no such intrinsics vvv #if _HAS_CXX20 - auto __d = _STD countl_zero(_Den._Word[1]); + auto __d = _STD countl_zero(_Den._Word[1]); #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv auto __d = _Countl_zero_fallback(_Den._Word[1]); #endif // ^^^ !_HAS_CXX20 ^^^ diff --git a/stl/inc/__msvc_iter_core.hpp b/stl/inc/__msvc_iter_core.hpp index e94bd7183e..fe41efa81c 100644 --- a/stl/inc/__msvc_iter_core.hpp +++ b/stl/inc/__msvc_iter_core.hpp @@ -34,8 +34,8 @@ _EXPORT_STD struct contiguous_iterator_tag : random_access_iterator_tag {}; template concept _Dereferenceable = requires(_Ty& __t) { - { *__t } -> _Can_reference; - }; + { *__t } -> _Can_reference; +}; template concept _Has_member_iterator_concept = requires { typename _Ty::iterator_concept; }; @@ -77,8 +77,8 @@ struct incrementable_traits<_Ty> { template concept _Can_difference = requires(const _Ty& __a, const _Ty& __b) { - { __a - __b } -> integral; - }; + { __a - __b } -> integral; +}; template requires (!_Has_member_difference_type<_Ty> && _Can_difference<_Ty>) @@ -291,10 +291,10 @@ struct _Iter_traits_category3 { template concept _Cpp17_bidi_delta = requires(_It __i) { - { --__i } -> same_as<_It&>; - { __i-- } -> convertible_to; - requires same_as>; - }; + { --__i } -> same_as<_It&>; + { __i-- } -> convertible_to; + requires same_as>; +}; template struct _Iter_traits_category2 { @@ -363,9 +363,9 @@ struct iterator_traits<_Ty*> { template inline constexpr bool _Integer_class = requires { - typename _Ty::_Signed_type; - typename _Ty::_Unsigned_type; - }; + typename _Ty::_Signed_type; + typename _Ty::_Unsigned_type; +}; template concept _Integer_like = _Is_nonbool_integral> || _Integer_class<_Ty>; diff --git a/stl/inc/__msvc_sanitizer_annotate_container.hpp b/stl/inc/__msvc_sanitizer_annotate_container.hpp index db8cbd852f..f967074ea7 100644 --- a/stl/inc/__msvc_sanitizer_annotate_container.hpp +++ b/stl/inc/__msvc_sanitizer_annotate_container.hpp @@ -92,30 +92,30 @@ void __cdecl __sanitizer_annotate_contiguous_container( #ifdef _M_ARM64EC #pragma comment(linker, \ - "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") + "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, \ - "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") + "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:#_Asan_vector_should_annotate=#_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_vector_should_annotate=_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:#_Asan_string_should_annotate=#_Asan_string_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_string_should_annotate=_Asan_string_should_annotate_default") #elif defined(_M_HYBRID) #pragma comment(linker, \ - "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") + "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, \ - "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") + "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:#_Asan_vector_should_annotate=#_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_vector_should_annotate=__Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:#_Asan_string_should_annotate=#_Asan_string_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_string_should_annotate=__Asan_string_should_annotate_default") #elif defined(_M_IX86) #pragma comment(linker, \ - "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") + "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:__Asan_vector_should_annotate=__Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_string_should_annotate=__Asan_string_should_annotate_default") #elif defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64) #pragma comment(linker, \ - "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") + "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:_Asan_vector_should_annotate=_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_string_should_annotate=_Asan_string_should_annotate_default") #else // ^^^ known architecture / unknown architecture vvv diff --git a/stl/inc/atomic b/stl/inc/atomic index e404365994..9f9c0aec27 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -435,23 +435,23 @@ struct _Atomic_padded { #else // ^^^ don't break ABI / break ABI vvv template struct _Atomic_storage_traits { // properties for how _Ty is stored in an atomic - static constexpr size_t _Storage_size = sizeof(_Ty) == 1 ? 1 - : sizeof(_Ty) == 2 ? 2 - : sizeof(_Ty) <= 4 ? 4 - : sizeof(_Ty) <= 8 ? 8 + static constexpr size_t _Storage_size = sizeof(_Ty) == 1 ? 1 + : sizeof(_Ty) == 2 ? 2 + : sizeof(_Ty) <= 4 ? 4 + : sizeof(_Ty) <= 8 ? 8 #if defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM64EC) : sizeof(_Ty) <= 16 ? 16 #endif // 64 bits : sizeof(_Ty); static constexpr size_t _Padding_size = _Storage_size - sizeof(_Ty); - static constexpr bool _Uses_padding = _Padding_size != 0; + static constexpr bool _Uses_padding = _Padding_size != 0; }; template struct _Atomic_storage_traits<_Ty&> { // properties for how _Ty is stored in an atomic_ref static constexpr size_t _Storage_size = sizeof(_Ty); - static constexpr bool _Uses_padding = false; + static constexpr bool _Uses_padding = false; }; template ::_Uses_padding> @@ -1117,7 +1117,7 @@ struct _Atomic_storage<_Ty, 8> { // lock-free using 8-byte intrinsics #else // ^^^ _STD_ATOMIC_USE_ARM64_LDAR_STLR == 1 / _STD_ATOMIC_USE_ARM64_LDAR_STLR != 1 vvv #ifdef _M_ARM - _As_bytes = __ldrexd(_Mem); + _As_bytes = __ldrexd(_Mem); #else _As_bytes = __iso_volatile_load64(_Mem); #endif diff --git a/stl/inc/chrono b/stl/inc/chrono index 6b5cce3ecd..d896c9e282 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -2538,7 +2538,7 @@ namespace chrono { sys_time _Tp{}; }; - zoned_time()->zoned_time; + zoned_time() -> zoned_time; template zoned_time(sys_time<_Duration>) -> zoned_time>; @@ -2644,7 +2644,7 @@ namespace chrono { #ifdef __cpp_lib_concepts const auto _Leap_cmp = _Utc_leap_second <=> _Time_floor; #else // ^^^ __cpp_lib_concepts / TRANSITION, GH-395 workaround vvv - const auto _Leap_cmp = _Utc_leap_second > _Time_floor ? strong_ordering::greater + const auto _Leap_cmp = _Utc_leap_second > _Time_floor ? strong_ordering::greater : _Utc_leap_second == _Time_floor ? strong_ordering::equal : strong_ordering::less; #endif // ^^^ workaround @@ -4709,8 +4709,8 @@ concept _Chrono_parse_spec_callbacks = _Parse_align_callbacks<_Ty, _CharT> template concept _Has_ok = requires(_Ty _At) { - { _At.ok() } -> same_as; - }; + { _At.ok() } -> same_as; +}; // A chrono spec is either a type (with an optional modifier), OR a literal character, never both. template diff --git a/stl/inc/compare b/stl/inc/compare index c01e004c92..04b3d5292f 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -349,9 +349,9 @@ struct _Synth_three_way { template _NODISCARD constexpr auto operator()(const _Ty1& _Left, const _Ty2& _Right) const requires requires { - { _Left < _Right } -> _Boolean_testable; - { _Right < _Left } -> _Boolean_testable; - } + { _Left < _Right } -> _Boolean_testable; + { _Right < _Left } -> _Boolean_testable; + } { if constexpr (three_way_comparable_with<_Ty1, _Ty2>) { return _Left <=> _Right; @@ -381,8 +381,8 @@ namespace _Strong_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(strong_order(_Left, _Right)); // intentional ADL - }; + static_cast(strong_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -477,8 +477,8 @@ namespace _Weak_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(weak_order(_Left, _Right)); // intentional ADL - }; + static_cast(weak_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -603,8 +603,8 @@ namespace _Partial_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(partial_order(_Left, _Right)); // intentional ADL - }; + static_cast(partial_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -681,9 +681,9 @@ inline namespace _Cpos { template concept _Can_fallback_eq_lt = requires(_Ty1& _Left, _Ty2& _Right) { - { _Left == _Right } -> _Boolean_testable; - { _Left < _Right } -> _Boolean_testable; - }; + { _Left == _Right } -> _Boolean_testable; + { _Left < _Right } -> _Boolean_testable; +}; template concept _Can_strong_order = requires(_Ty1& _Left, _Ty2& _Right) { _STD strong_order(_Left, _Right); }; @@ -791,10 +791,10 @@ concept _Can_partial_order = requires(_Ty1& _Left, _Ty2& _Right) { _STD partial_ namespace _Compare_partial_order_fallback { template concept _Can_fallback_eq_lt_twice = requires(_Ty1& _Left, _Ty2& _Right) { - { _Left == _Right } -> _Boolean_testable; - { _Left < _Right } -> _Boolean_testable; - { _Right < _Left } -> _Boolean_testable; - }; + { _Left == _Right } -> _Boolean_testable; + { _Left < _Right } -> _Boolean_testable; + { _Right < _Left } -> _Boolean_testable; + }; class _Cpo { private: diff --git a/stl/inc/complex b/stl/inc/complex index 42b2e32354..d869f9d5e7 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -2038,7 +2038,7 @@ _NODISCARD complex<_Ty> tanh(const complex<_Ty>& _Left) { _Real = _Ty{1}; } - return complex<_Ty>(_Real, _Tv * _Ty{0}); + return complex<_Ty>(_Real, _Tv* _Ty{0}); } return complex<_Ty>((_Ctraits<_Ty>::sqrt(_Ty{1} + _Sv * _Sv)) * _Bv / _Dv, _Tv / _Dv); diff --git a/stl/inc/execution b/stl/inc/execution index a8a8de3478..464c44deb5 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -780,8 +780,8 @@ struct _Static_partition_team { // common data for all static partitioned ops _Diff _Unchunked_items; _Static_partition_team(const _Diff _Count_, const size_t _Chunks_) - : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{static_cast<_Diff>( - _Count_ / static_cast<_Diff>(_Chunks_))}, + : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, + _Chunk_size{static_cast<_Diff>(_Count_ / static_cast<_Diff>(_Chunks_))}, _Unchunked_items{static_cast<_Diff>(_Count_ % static_cast<_Diff>(_Chunks_))} { // Calculate common data for statically partitioning iterator ranges. // pre: _Count_ >= _Chunks_ && _Chunks_ >= 1 @@ -1490,8 +1490,8 @@ struct _Static_partitioned_find_end_backward3 { _Static_partitioned_find_end_backward3(const size_t _Hw_threads, const _Iter_diff_t<_BidIt1> _Count, const _BidIt1 _Last1, const _FwdIt2 _First2, const _FwdIt2 _Last2, const _Pr _Pred_) - : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis{}, - _Results(_Last1), _Range2{_First2, _Last2}, _Pred{_Pred_} {} + : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis{}, _Results(_Last1), + _Range2{_First2, _Last2}, _Pred{_Pred_} {} _Cancellation_status _Process_chunk() { if (_Results._Complete()) { @@ -1961,8 +1961,8 @@ struct _Static_partitioned_equal2 { _Cancellation_token _Cancel_token; _Static_partitioned_equal2(const size_t _Hw_threads, const _Diff _Count, _Pr _Pred_, const _FwdIt1&, const _FwdIt2&) - : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis1{}, _Basis2{}, - _Pred(_Pred_), _Cancel_token{} {} + : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis1{}, _Basis2{}, _Pred(_Pred_), + _Cancel_token{} {} _Cancellation_status _Process_chunk() { if (_Cancel_token._Is_canceled()) { @@ -4119,8 +4119,8 @@ struct _Static_partitioned_transform_reduce_binary2 { // transform-reduction tas _Static_partitioned_transform_reduce_binary2(const _Diff _Count, const size_t _Chunks, const _FwdIt1 _First1, const _FwdIt2 _First2, _BinOp1 _Reduce_op_, _BinOp2 _Transform_op_) - : _Team{_Count, _Chunks}, _Basis1{}, _Basis2{}, _Reduce_op(_Reduce_op_), - _Transform_op(_Transform_op_), _Results{_Chunks} { + : _Team{_Count, _Chunks}, _Basis1{}, _Basis2{}, _Reduce_op(_Reduce_op_), _Transform_op(_Transform_op_), + _Results{_Chunks} { _Basis1._Populate(_Team, _First1); _Basis2._Populate(_Team, _First2); } diff --git a/stl/inc/expected b/stl/inc/expected index e94c3a8fa4..8c0fe0960f 100644 --- a/stl/inc/expected +++ b/stl/inc/expected @@ -166,9 +166,9 @@ struct _Construct_expected_from_invoke_result_tag { template concept _Is_invoke_constructible = requires(_Fn&& _Func, _Tys&&... _Vals) { - static_cast>>( - _STD invoke(_STD forward<_Fn>(_Func), _STD forward<_Tys>(_Vals)...)); - }; + static_cast>>( + _STD invoke(_STD forward<_Fn>(_Func), _STD forward<_Tys>(_Vals)...)); +}; template struct _Check_expected_argument : true_type { diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index 3fe48f56c4..0d98d73dcc 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -2583,7 +2583,7 @@ inline void resize_file(const path& _Path, uintmax_t _Newsize) { // change file if (_Code) { _Throw_filesystem_error("resize_file(p, n): invalid arguments"); } -}; +} inline void resize_file(const path& _Path, uintmax_t _Newsize, error_code& _Code) noexcept { // change file size diff --git a/stl/inc/format b/stl/inc/format index 5cb1fae91b..f8a736a74a 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -558,10 +558,9 @@ template concept _Format_supported_charT = _Is_any_of_v<_CharT, char, wchar_t>; template -concept _Has_formatter = - requires(_Ty& _Val, _Context& _Ctx) { - _STD declval>>().format(_Val, _Ctx); - }; +concept _Has_formatter = requires(_Ty& _Val, _Context& _Ctx) { + _STD declval>>().format(_Val, _Ctx); +}; template concept _Has_const_formatter = _Has_formatter, _Context>; @@ -2636,8 +2635,8 @@ inline namespace __p2286 { template requires (!_CharT_or_bool<_Integral, _CharT>) - _NODISCARD _OutputIt - _Fmt_write(_OutputIt _Out, _Integral _Value, const _Basic_format_specs<_CharT>& _Specs, _Lazy_locale _Locale); + _NODISCARD _OutputIt _Fmt_write( + _OutputIt _Out, _Integral _Value, const _Basic_format_specs<_CharT>& _Specs, _Lazy_locale _Locale); template _NODISCARD _OutputIt _Fmt_write( @@ -3445,8 +3444,8 @@ inline namespace __p2286 { _ParseFunc _Parse_funcs[_Num_args > 0 ? _Num_args : 1]; consteval explicit _Format_checker(basic_string_view<_CharT> _Fmt) noexcept - : _Parse_context(_Fmt, _Num_args), _Parse_funcs{ - &_Compile_time_parse_format_specs<_Args, _ParseContext>...} {} + : _Parse_context(_Fmt, _Num_args), + _Parse_funcs{&_Compile_time_parse_format_specs<_Args, _ParseContext>...} {} constexpr void _On_text(const _CharT*, const _CharT*) const noexcept {} constexpr void _On_replacement_field(size_t, const _CharT*) const noexcept {} constexpr const _CharT* _On_format_specs(const size_t _Id, const _CharT* _First, const _CharT*) { diff --git a/stl/inc/iterator b/stl/inc/iterator index 112aa54124..180abaa4c2 100644 --- a/stl/inc/iterator +++ b/stl/inc/iterator @@ -1100,9 +1100,9 @@ struct _Common_iterator_pointer_type<_Iter, _Se> { template concept _Has_forward_category = requires { - typename _Iter_cat_t<_Iter>; - requires derived_from<_Iter_cat_t<_Iter>, forward_iterator_tag>; - }; + typename _Iter_cat_t<_Iter>; + requires derived_from<_Iter_cat_t<_Iter>, forward_iterator_tag>; +}; template struct iterator_traits> { diff --git a/stl/inc/memory b/stl/inc/memory index 2e8e65ecf2..f4c3d571fe 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -4179,8 +4179,8 @@ using _Pointer_of_or = typename _Pointer_of_or_helper<_Ty, _Uty>::type; // TRANSITION, requires expression support template concept _Resettable_pointer = requires(_SmartPtr& _Smart_ptr, _Pointer _Ptr, _ArgsT&&... _Args) { - _Smart_ptr.reset(static_cast<_Sp>(_Ptr), _STD forward<_ArgsT>(_Args)...); - }; + _Smart_ptr.reset(static_cast<_Sp>(_Ptr), _STD forward<_ArgsT>(_Args)...); +}; _EXPORT_STD template class out_ptr_t { diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 5296112a9f..9d996bdb85 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -417,8 +417,8 @@ namespace pmr { _Pool(_Pool&& _That) noexcept : _Unfull_chunk{_STD exchange(_That._Unfull_chunk, nullptr)}, _All_chunks{_STD move(_That._All_chunks)}, _Next_capacity{_STD exchange(_That._Next_capacity, _Default_next_capacity)}, - _Block_size{_That._Block_size}, _Log_of_size{_That._Log_of_size}, _Empty_chunk{_STD exchange( - _That._Empty_chunk, nullptr)} {} + _Block_size{_That._Block_size}, _Log_of_size{_That._Log_of_size}, + _Empty_chunk{_STD exchange(_That._Empty_chunk, nullptr)} {} _Pool& operator=(_Pool&& _That) noexcept { _Unfull_chunk = _STD exchange(_That._Unfull_chunk, nullptr); diff --git a/stl/inc/optional b/stl/inc/optional index 505963ef68..8d1684f87a 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -627,8 +627,8 @@ _NODISCARD constexpr bool operator==(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left == *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left == *_Right } -> _Implicitly_convertible_to; - } + { *_Left == *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -644,8 +644,8 @@ _NODISCARD constexpr bool operator!=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left != *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left != *_Right } -> _Implicitly_convertible_to; - } + { *_Left != *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -661,8 +661,8 @@ _NODISCARD constexpr bool operator<(const optional<_Ty1>& _Left, const optional< noexcept(_Fake_copy_init(*_Left < *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left < *_Right } -> _Implicitly_convertible_to; - } + { *_Left < *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -678,8 +678,8 @@ _NODISCARD constexpr bool operator>(const optional<_Ty1>& _Left, const optional< noexcept(_Fake_copy_init(*_Left > *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left > *_Right } -> _Implicitly_convertible_to; - } + { *_Left > *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -695,8 +695,8 @@ _NODISCARD constexpr bool operator<=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left <= *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires(const _Ty1& _Elem1, const _Ty2& _Elem2) { - { *_Left <= *_Right } -> _Implicitly_convertible_to; - } + { *_Left <= *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -712,8 +712,8 @@ _NODISCARD constexpr bool operator>=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left >= *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left >= *_Right } -> _Implicitly_convertible_to; - } + { *_Left >= *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); diff --git a/stl/inc/ranges b/stl/inc/ranges index 8fdd18ed79..cc5c841ba9 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -1418,8 +1418,8 @@ namespace ranges { #if _HAS_CXX23 template - concept _Integer_like_with_usable_difference_type = _Signed_integer_like<_Ty> - || (_Integer_like<_Ty> && weakly_incrementable<_Ty>); + concept _Integer_like_with_usable_difference_type = + _Signed_integer_like<_Ty> || (_Integer_like<_Ty> && weakly_incrementable<_Ty>); template struct _Repeat_view_difference_type { @@ -1741,12 +1741,11 @@ namespace ranges { concept _Istreamable_impl = derived_from<_Stream, basic_istream<_CharT, _Traits>> && constructible_from, _Stream&>; template - concept _Istreamable = - requires { - typename _Stream::char_type; - typename _Stream::traits_type; - requires _Istreamable_impl<_Elem, _Stream, typename _Stream::char_type, typename _Stream::traits_type>; - }; + concept _Istreamable = requires { + typename _Stream::char_type; + typename _Stream::traits_type; + requires _Istreamable_impl<_Elem, _Stream, typename _Stream::char_type, typename _Stream::traits_type>; + }; template struct _Istream_fn { @@ -6951,10 +6950,10 @@ namespace ranges { concept _Slide_caches_nothing = random_access_range<_Vw> && sized_range<_Vw>; template - concept _Slide_caches_last = (!_Slide_caches_nothing<_Vw>) && bidirectional_range<_Vw> && common_range<_Vw>; + concept _Slide_caches_last = (!_Slide_caches_nothing<_Vw>) &&bidirectional_range<_Vw> && common_range<_Vw>; template - concept _Slide_caches_first = (!_Slide_caches_nothing<_Vw>) && (!_Slide_caches_last<_Vw>); + concept _Slide_caches_first = (!_Slide_caches_nothing<_Vw>) &&(!_Slide_caches_last<_Vw>); _EXPORT_STD template requires view<_Vw> @@ -7981,9 +7980,9 @@ namespace ranges { constexpr bool _Is_noexcept = (noexcept(static_cast<_ResultType>( _STD declval() - _STD declval())) && ...); // clang-format on - const auto _Get_smallest_distance_closure = - [&_Lhs_tuple, &_Rhs_tuple ]( - index_sequence<_FirstIdx, _Idxs...>) noexcept(_Is_noexcept) { + const auto _Get_smallest_distance_closure = [&_Lhs_tuple, + &_Rhs_tuple]( + index_sequence<_FirstIdx, _Idxs...>) noexcept(_Is_noexcept) { const _ResultType _First_size = static_cast<_ResultType>(_STD get<0>(_Lhs_tuple) - _STD get<0>(_Rhs_tuple)); if (_First_size == 0) { @@ -8006,29 +8005,29 @@ namespace ranges { noexcept((noexcept(_STD declval() == _STD declval()) && ...)) { // clang-format on const auto _Evaluate_equality_closure = - [&_Lhs_tuple, &_Rhs_tuple ](index_sequence<_Indices...>) noexcept( + [&_Lhs_tuple, &_Rhs_tuple](index_sequence<_Indices...>) noexcept( (noexcept(_STD declval() == _STD declval()) && ...)) { - return ((_STD get<_Indices>(_Lhs_tuple) == _STD get<_Indices>(_Rhs_tuple)) || ...); - }; + return ((_STD get<_Indices>(_Lhs_tuple) == _STD get<_Indices>(_Rhs_tuple)) || ...); + }; return _Evaluate_equality_closure(index_sequence_for<_LHSTupleTypes...>{}); } #ifdef __clang__ template // TRANSITION, LLVM-47414 - concept _Zip_iter_converts = _IsConst - && (convertible_to, iterator_t> && ...); + concept _Zip_iter_converts = + _IsConst && (convertible_to, iterator_t> && ...); template // TRANSITION, LLVM-47414 - concept _Zip_sent_converts = _IsConst - && (convertible_to, sentinel_t> && ...); + concept _Zip_sent_converts = + _IsConst && (convertible_to, sentinel_t> && ...); #endif // ^^^ workaround ^^^ template - concept _Zip_transform_constraints = move_constructible<_Func> && is_object_v<_Func> && (sizeof...(_Views) > 0) - && (input_range<_Views> && ...) && (view<_Views> && ...) - && regular_invocable<_Func&, range_reference_t<_Views>...> - && _Can_reference...>>; + concept _Zip_transform_constraints = + move_constructible<_Func> && is_object_v<_Func> && (sizeof...(_Views) > 0) && (input_range<_Views> && ...) + && (view<_Views> && ...) && regular_invocable<_Func&, range_reference_t<_Views>...> + && _Can_reference...>>; _EXPORT_STD template requires (view<_ViewTypes> && ...) && (sizeof...(_ViewTypes) > 0) @@ -8249,11 +8248,12 @@ namespace ranges { { // clang-format on const auto _Swap_every_pair_closure = - [&_Lhs, &_Rhs ](index_sequence<_Indices...>) noexcept(noexcept( + [&_Lhs, &_Rhs](index_sequence<_Indices...>) noexcept(noexcept( ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), ...))) { - ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), ...); - }; + ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), + ...); + }; _Swap_every_pair_closure(index_sequence_for<_ViewTypes...>{}); } @@ -8843,6 +8843,16 @@ namespace ranges { using _Invoke_result_with_repeated_type = typename _Invoke_result_with_repeated_type_impl<_Fn, _Ty, make_index_sequence<_Nx>>::type; + template + concept _Adjacent_transform_constraints = + (_Nx > 0) && forward_range<_Vw> && view<_Vw> && is_object_v<_Fn> && move_constructible<_Fn> + && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx> + && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx>>; + + _EXPORT_STD template + requires _Adjacent_transform_constraints<_Vw, _Fn, _Nx> + class adjacent_transform_view; + _EXPORT_STD template requires view<_Vw> && (_Nx > 0) class adjacent_view : public view_interface> { @@ -8858,12 +8868,13 @@ namespace ranges { private: friend adjacent_view; - template - requires view<_Vw2> && (_Nx2 > 0) - && is_object_v<_Fn> && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw2>, _Nx2> - && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw2>, _Nx2>> +#ifdef __clang__ // TRANSITION, Clang 17 + public: +#else // ^^^ workaround / no workaround vvv + template + requires _Adjacent_transform_constraints<_Vw2, _Fn, _Nx2> friend class adjacent_transform_view; - +#endif // ^^^ no workaround ^^^ using _Base = _Maybe_const<_Const, _Vw>; using _Base_iterator = iterator_t<_Base>; @@ -9224,10 +9235,8 @@ namespace ranges { _EXPORT_STD inline constexpr _Adjacent_fn<2> pairwise; } // namespace views - _EXPORT_STD template - requires view<_Vw> && (_Nx > 0) - && is_object_v<_Fn> && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx> - && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx>> + _EXPORT_STD template + requires _Adjacent_transform_constraints<_Vw, _Fn, _Nx> class adjacent_transform_view : public view_interface> { private: using _Inner_view = adjacent_view<_Vw, _Nx>; @@ -9543,10 +9552,7 @@ namespace ranges { template _NODISCARD constexpr auto operator()(_Rng&&, _Fn&& _Func) const noexcept(noexcept(views::zip_transform(_STD forward<_Fn>(_Func)))) - requires (_Nx == 0) -#ifndef __clang__ // TRANSITION, Clang 16 - && requires { views::zip_transform(_STD forward<_Fn>(_Func)); } -#endif // __clang__ + requires (_Nx == 0) && requires { views::zip_transform(_STD forward<_Fn>(_Func)); } { return views::zip_transform(_STD forward<_Fn>(_Func)); } @@ -9556,9 +9562,9 @@ namespace ranges { noexcept(noexcept(adjacent_transform_view, decay_t<_Fn>, _Nx>( _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)))) requires requires { - adjacent_transform_view, decay_t<_Fn>, _Nx>( - _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); - } + adjacent_transform_view, decay_t<_Fn>, _Nx>( + _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); + } { return adjacent_transform_view, decay_t<_Fn>, _Nx>( _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); @@ -9578,9 +9584,9 @@ namespace ranges { } // namespace views template - concept _Cartesian_product_is_random_access = (random_access_range<_Maybe_const<_Const, _First>> && ... - && (random_access_range<_Maybe_const<_Const, _Rest>> - && sized_range<_Maybe_const<_Const, _Rest>>) ); + concept _Cartesian_product_is_random_access = + (random_access_range<_Maybe_const<_Const, _First>> && ... + && (random_access_range<_Maybe_const<_Const, _Rest>> && sized_range<_Maybe_const<_Const, _Rest>>) ); template concept _Cartesian_product_common_arg = common_range<_Rng> || (sized_range<_Rng> && random_access_range<_Rng>); @@ -9976,8 +9982,7 @@ namespace ranges { return [&](index_sequence<_Indices...>) { return (_RANGES iter_swap(_STD get<_Indices>(_Left._Current), _STD get<_Indices>(_Right._Current)), ...); - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } }; @@ -10025,8 +10030,7 @@ namespace ranges { { const bool _Is_empty = [&](index_sequence<_Indices...>) { return (_RANGES empty(_STD get<_Indices + 1>(_Bases)) || ...); - } - (make_index_sequence{}); + }(make_index_sequence{}); const auto _Make_iter_tuple = [&](index_sequence<_Indices...>) { return tuple, iterator_t<_Rest>...>{_Begin_or_first_end<_Indices>(_Is_empty)...}; @@ -10039,8 +10043,7 @@ namespace ranges { { const bool _Is_empty = [&](index_sequence<_Indices...>) { return (_RANGES empty(_STD get<_Indices + 1>(_Bases)) || ...); - } - (make_index_sequence{}); + }(make_index_sequence{}); const auto _Make_iter_tuple = [&](index_sequence<_Indices...>) { return tuple, iterator_t...>{ @@ -10069,8 +10072,7 @@ namespace ranges { #else // ^^^ _CONTAINER_DEBUG_LEVEL > 0 / _CONTAINER_DEBUG_LEVEL == 0 vvv return (static_cast<_Size_type>(_RANGES size(_STD get<_Indices>(_Bases))) * ...); #endif // ^^^ _CONTAINER_DEBUG_LEVEL == 0 ^^^ - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } _NODISCARD constexpr auto size() const @@ -10089,8 +10091,7 @@ namespace ranges { #else // ^^^ _CONTAINER_DEBUG_LEVEL > 0 / _CONTAINER_DEBUG_LEVEL == 0 vvv return (static_cast<_Size_type>(_RANGES size(_STD get<_Indices>(_Bases))) * ...); #endif // ^^^ _CONTAINER_DEBUG_LEVEL == 0 ^^^ - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } }; diff --git a/stl/inc/stop_token b/stl/inc/stop_token index ee14cc886a..3d65a48ddc 100644 --- a/stl/inc/stop_token +++ b/stl/inc/stop_token @@ -255,7 +255,7 @@ void _Stop_callback_base::_Do_attach( // fast path check if the state is already known auto _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources & uint32_t{1}) != 0) { + if ((_Local_sources& uint32_t{1}) != 0) { // stop already requested _Fn(this); return; @@ -269,7 +269,7 @@ void _Stop_callback_base::_Do_attach( auto _Head = _State->_Callbacks._Lock_and_load(); // recheck the state in case it changed while we were waiting to acquire the lock _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources & uint32_t{1}) != 0) { + if ((_Local_sources& uint32_t{1}) != 0) { // stop already requested _State->_Callbacks._Store_and_unlock(_Head); _Fn(this); diff --git a/stl/inc/tuple b/stl/inc/tuple index 30ec28d07a..c23afdbd27 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -189,13 +189,14 @@ inline constexpr bool _Can_construct_values_from_tuple_like_v, #ifdef __clang__ // TRANSITION, LLVM-59827 template -concept _Can_construct_from_tuple_like = _Tuple_like<_TupleLike> && _Different_from<_TupleLike, _Tuple> - && (!_Is_subrange_v>) - && (tuple_size_v<_Tuple> == tuple_size_v>) - && _Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> - && (tuple_size_v<_Tuple> != 1 - || (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>> - && !is_constructible_v, _TupleLike>) ); +concept _Can_construct_from_tuple_like = + _Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> + && (!_Is_subrange_v>) &&( + tuple_size_v<_Tuple> + == tuple_size_v>) &&_Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> + && (tuple_size_v<_Tuple> != 1 + || (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>> + && !is_constructible_v, _TupleLike>) ); #endif // __clang__ template >> @@ -214,6 +215,9 @@ struct _Three_way_comparison_result_with_tuple_like, _UTuple, template using _Three_way_comparison_result_with_tuple_like_t = typename _Three_way_comparison_result_with_tuple_like<_TTuple, _UTuple>::type; + +template +concept _Tuple_like_non_tuple = (!_Is_specialization_v<_Ty, tuple>) &&_Tuple_like<_Ty>; #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) template <> @@ -224,8 +228,8 @@ public: constexpr tuple(const tuple&) noexcept /* strengthened */ {} // TRANSITION, ABI: should be defaulted #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple(_Other&&) noexcept /* strengthened */ {} #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) @@ -236,8 +240,8 @@ public: _CONSTEXPR20 tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept /* strengthened */ {} #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple(allocator_arg_t, const _Alloc&, _Other&&) noexcept /* strengthened */ {} #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) @@ -254,14 +258,14 @@ public: } #ifdef __cpp_lib_concepts - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple& operator=(_Other&&) noexcept /* strengthened */ { return *this; } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr const tuple& operator=(_Other&&) const noexcept /* strengthened */ { return *this; } @@ -288,13 +292,13 @@ public: #endif // ^^^ !defined(__cpp_lib_concepts) ^^^ #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr bool operator==(const tuple&, const _Other&) noexcept /* strengthened */ { static_assert(tuple_size_v<_Other> == 0, "Cannot compare tuples of different sizes (N4950 [tuple.rel]/2)."); return true; } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> requires (tuple_size_v> == 0) _NODISCARD_FRIEND constexpr strong_ordering operator<=>(const tuple&, const _Other&) noexcept /* strengthened */ { return strong_ordering::equal; @@ -433,8 +437,8 @@ public: #ifdef __clang__ // TRANSITION, LLVM-59827 template , int> = 0> #else // ^^^ workaround / no workaround vvv - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_construct_values_from_tuple_like_v && (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) ) @@ -541,8 +545,8 @@ public: #ifdef __clang__ // TRANSITION, LLVM-59827 template , int> = 0> #else // ^^^ workaround / no workaround vvv - template - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_construct_values_from_tuple_like_v && (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) ) @@ -711,8 +715,8 @@ public: ((void) (_STD get<_Indices>(*this) = _STD get<_Indices>(_STD forward<_Other>(_Right))), ...); } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_assign_values_from_tuple_like_v constexpr tuple& operator=(_Other&& _Right) { @@ -720,8 +724,8 @@ public: return *this; } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_assign_values_from_tuple_like_v constexpr const tuple& operator=(_Other&& _Right) const { @@ -773,31 +777,27 @@ public: } #if _HAS_CXX23 -#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1753916 template > static constexpr bool _Can_equal_compare_with_tuple_like_v = false; template static constexpr bool _Can_equal_compare_with_tuple_like_v<_Other, index_sequence<_Indices...>> = (requires(const tuple& _Left, const _Other& _Right) { - { _STD get<_Indices>(_Left) == _STD get<_Indices>(_Right) } -> _Boolean_testable; - } && ...); -#endif // ^^^ no workaround ^^^ + { _STD get<_Indices>(_Left) == _STD get<_Indices>(_Right) } -> _Boolean_testable; + } && ...); template _NODISCARD constexpr bool _Equals_to_tuple_like(const _Other& _Right, index_sequence<_Indices...>) const { return ((_STD get<_Indices>(*this) == _STD get<_Indices>(_Right)) && ...); } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr bool operator==(const tuple& _Left, const _Other& _Right) { static_assert(1 + sizeof...(_Rest) == tuple_size_v<_Other>, "Cannot compare tuples of different sizes (N4950 [tuple.rel]/2)."); -#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1753916 static_assert(_Can_equal_compare_with_tuple_like_v<_Other>, "For all i, where 0 <= i < sizeof...(TTypes), get(t) == get(u) must be a valid expression (N4950 " "[tuple.rel]/2)."); -#endif // ^^^ no workaround ^^^ return _Left._Equals_to_tuple_like(_Right, make_index_sequence<1 + sizeof...(_Rest)>{}); } @@ -809,7 +809,7 @@ public: return _Result; } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr auto operator<=>(const tuple& _Left, const _Other& _Right) -> _Three_way_comparison_result_with_tuple_like_t { return _Left._Three_way_compare_with_tuple_like(_Right, make_index_sequence<1 + sizeof...(_Rest)>{}); @@ -1128,9 +1128,9 @@ struct _Tuple_like_common_reference; template class _TQual, template class _UQual, size_t... _Indices> requires requires { - typename tuple>, - _UQual>>...>; - } + typename tuple>, + _UQual>>...>; + } struct _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual, index_sequence<_Indices...>> { using type = tuple< common_reference_t<_TQual>, _UQual>>...>; @@ -1139,8 +1139,9 @@ struct _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual, index_sequ template <_Tuple_like _TTuple, _Tuple_like _UTuple, template class _TQual, template class _UQual> requires (_Is_specialization_v<_TTuple, tuple> || _Is_specialization_v<_UTuple, tuple>) && is_same_v<_TTuple, decay_t<_TTuple>> && is_same_v<_UTuple, decay_t<_UTuple>> - && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) - && requires { typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; } + && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) && requires { + typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; + } struct basic_common_reference<_TTuple, _UTuple, _TQual, _UQual> { using type = typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; }; @@ -1150,9 +1151,8 @@ struct _Tuple_like_common_type; template requires requires { - typename tuple< - common_type_t, tuple_element_t<_Indices, _UTuple>>...>; - } + typename tuple, tuple_element_t<_Indices, _UTuple>>...>; + } struct _Tuple_like_common_type<_TTuple, _UTuple, index_sequence<_Indices...>> { using type = tuple, tuple_element_t<_Indices, _UTuple>>...>; }; @@ -1160,8 +1160,9 @@ struct _Tuple_like_common_type<_TTuple, _UTuple, index_sequence<_Indices...>> { template <_Tuple_like _TTuple, _Tuple_like _UTuple> requires (_Is_specialization_v<_TTuple, tuple> || _Is_specialization_v<_UTuple, tuple>) && is_same_v<_TTuple, decay_t<_TTuple>> && is_same_v<_UTuple, decay_t<_UTuple>> - && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) - && requires { typename _Tuple_like_common_type<_TTuple, _UTuple>::type; } + && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) && requires { + typename _Tuple_like_common_type<_TTuple, _UTuple>::type; + } struct common_type<_TTuple, _UTuple> { using type = typename _Tuple_like_common_type<_TTuple, _UTuple>::type; }; diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 17872f91f7..8703f28b12 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -492,11 +492,11 @@ _INLINE_VAR constexpr bool is_compound_v = !is_fundamental_v<_Ty>; CLASS(const noexcept) \ CLASS(volatile noexcept) \ CLASS(const volatile noexcept) \ - CLASS(&noexcept) \ + CLASS(& noexcept) \ CLASS(const& noexcept) \ CLASS(volatile& noexcept) \ CLASS(const volatile& noexcept) \ - CLASS(&&noexcept) \ + CLASS(&& noexcept) \ CLASS(const&& noexcept) \ CLASS(volatile&& noexcept) \ CLASS(const volatile&& noexcept) @@ -747,8 +747,8 @@ struct has_unique_object_representations : bool_constant<__has_unique_object_rep _EXPORT_STD template _INLINE_VAR constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); -// TRANSITION, Clang 16 and VSO-1690654 -#if defined(__clang__) || defined(__EDG__) +// TRANSITION, VSO-1690654 +#ifdef __EDG__ template struct _Is_aggregate_impl : bool_constant<__is_aggregate(_Ty)> {}; @@ -2267,10 +2267,9 @@ concept convertible_to = && requires { static_cast<_To>(_STD declval<_From>()); }; template -concept _Ref_wrap_common_reference_exists_with = - _Is_specialization_v<_RefWrap, reference_wrapper> - && requires { typename common_reference_t; } - && convertible_to<_RefWrapQ, common_reference_t>; +concept _Ref_wrap_common_reference_exists_with = _Is_specialization_v<_RefWrap, reference_wrapper> && requires { + typename common_reference_t; +} && convertible_to<_RefWrapQ, common_reference_t>; template class _RefWrapQual, template class _TyQual> requires (_Ref_wrap_common_reference_exists_with<_RefWrap, _Ty, _RefWrapQual<_RefWrap>, _TyQual<_Ty>> diff --git a/stl/inc/utility b/stl/inc/utility index b9c40d0387..1a27f5e42e 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -202,8 +202,9 @@ concept _Pair_like = _Tuple_like<_Ty> && tuple_size_v> == 2; #ifdef __clang__ // TRANSITION, LLVM-59827 template -concept _Can_construct_from_pair_like = _Pair_like<_PairLike> && (!_Is_subrange_v>) - && is_constructible_v<_Ty1, decltype(_STD get<0>(_STD declval<_PairLike>()))> +concept _Can_construct_from_pair_like = _Pair_like<_PairLike> + && (!_Is_subrange_v>) &&is_constructible_v<_Ty1, + decltype(_STD get<0>(_STD declval<_PairLike>()))> && is_constructible_v<_Ty2, decltype(_STD get<1>(_STD declval<_PairLike>()))>; #endif // __clang__ #endif // _HAS_CXX23 @@ -525,9 +526,8 @@ _NODISCARD constexpr bool operator>=(const pair<_Ty1, _Ty2>& _Left, const pair<_ template class _TQual, template class _UQual> requires requires { - typename pair, _UQual<_Uty1>>, - common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; - } + typename pair, _UQual<_Uty1>>, common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; + } struct basic_common_reference, pair<_Uty1, _Uty2>, _TQual, _UQual> { using type = pair, _UQual<_Uty1>>, common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; }; diff --git a/stl/inc/vector b/stl/inc/vector index e73ad36a88..b0942c2d2b 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -2316,7 +2316,7 @@ _NODISCARD _CONSTEXPR20 bool operator<(const vector<_Ty, _Alloc>& _Left, const v const auto _Last = _First + (_STD min)(_Left._Myvec.size(), _Right._Myvec.size()); for (; _First != _Last; ++_First, (void) ++_Other) { - using _Comp = _Vbase_compare_three_way; + using _Comp = _Vbase_compare_three_way; const auto _Result = _Comp{}(*_First, *_Other); if (_Result < 0) { @@ -2941,8 +2941,8 @@ public: this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); #else // ^^^ _ITERATOR_DEBUG_LEVEL == 0 / _ITERATOR_DEBUG_LEVEL != 0 vvv this->_Orphan_all(); - auto& _Al = this->_Getal(); - auto& _Right_al = _Right._Getal(); + auto& _Al = this->_Getal(); + auto& _Right_al = _Right._Getal(); constexpr auto _Pocma_val = _Choose_pocma_v<_Alvbase>; if constexpr (_Pocma_val == _Pocma_values::_Propagate_allocators) { using _Alproxy_type = _Rebind_alloc_t<_Alvbase, _Container_proxy>; @@ -2951,14 +2951,14 @@ public: _Alproxy_type _Oldal(_Al); _Alproxy_type _Right_proxy_al(_Right_al); _Container_proxy_ptr<_Alvbase> _Proxy(_Right_proxy_al, _Leave_proxy_unbound{}); - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); _Proxy._Bind(_Oldal, this); this->_Swap_proxy_and_iterators(_Right); return *this; } } else if constexpr (_Pocma_val == _Pocma_values::_No_propagate_allocators) { - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _Right._Mysize; if (_Right._Myvec.empty()) { // we took _Right's buffer, so zero out size @@ -2971,7 +2971,7 @@ public: return *this; } - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); this->_Swap_proxy_and_iterators(_Right); @@ -3024,7 +3024,7 @@ public: this->_Mysize = _Right._Mysize; #else // ^^^ _ITERATOR_DEBUG_LEVEL == 0 / _ITERATOR_DEBUG_LEVEL != 0 vvv this->_Orphan_all(); - auto& _Al = this->_Getal(); + auto& _Al = this->_Getal(); auto& _Right_al = _Right._Getal(); if constexpr (_Choose_pocca_v<_Alvbase>) { if (_Al != _Right_al) { @@ -3033,14 +3033,14 @@ public: _Alproxy_type _Oldal(_Al); _Alproxy_type _Right_proxy_al(_Right_al); _Container_proxy_ptr<_Alvbase> _Proxy(_Right_proxy_al, _Leave_proxy_unbound{}); - this->_Myvec = _Right._Myvec; + this->_Myvec = _Right._Myvec; this->_Mysize = _Right._Mysize; _Proxy._Bind(_Oldal, this); return *this; } } - this->_Myvec = _Right._Myvec; + this->_Myvec = _Right._Myvec; this->_Mysize = _Right._Mysize; #endif // _ITERATOR_DEBUG_LEVEL == 0 diff --git a/stl/inc/xmemory b/stl/inc/xmemory index fe585cbb6a..e569a652bb 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -1420,7 +1420,7 @@ using _Container_base = _Container_base0; using _Iterator_base = _Iterator_base0; #else // _ITERATOR_DEBUG_LEVEL == 0 using _Container_base = _Container_base12; -using _Iterator_base = _Iterator_base12; +using _Iterator_base = _Iterator_base12; #endif // _ITERATOR_DEBUG_LEVEL == 0 struct _Leave_proxy_unbound { @@ -1828,7 +1828,7 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_copy( // In pre-concepts world, _Uninitialized_copy should only ever be called with an iterator // and sentinel of the same type, so `_Get_unwrapped` is fine to call. auto _UFirst = _Get_unwrapped(_STD move(_First)); - auto _ULast = _Get_unwrapped(_STD move(_Last)); + auto _ULast = _Get_unwrapped(_STD move(_Last)); #endif // ^^^ !__cpp_lib_concepts ^^^ constexpr bool _Can_memmove = _Sent_copy_cat::_Bitcopy_constructible @@ -2499,7 +2499,7 @@ _EXPORT_STD inline constexpr from_range_t from_range; template concept _Container_compatible_range = - (_RANGES input_range<_Rng>) && convertible_to<_RANGES range_reference_t<_Rng>, _Elem>; + (_RANGES input_range<_Rng>) &&convertible_to<_RANGES range_reference_t<_Rng>, _Elem>; template <_RANGES input_range _Rng> using _Range_key_type = remove_const_t::first_type>; diff --git a/stl/inc/xstring b/stl/inc/xstring index 1eda9bedeb..b7fcb187ec 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -2315,7 +2315,7 @@ struct _String_constructor_rvalue_allocator_tag { #if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395 template concept _Contiguous_range_of = - (_RANGES contiguous_range<_Rng>) && same_as>, _Ty>; + (_RANGES contiguous_range<_Rng>) &&same_as>, _Ty>; #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) _EXPORT_STD template , class _Alloc = allocator<_Elem>> diff --git a/stl/inc/xutility b/stl/inc/xutility index b8b7a0a847..82888aab50 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -311,9 +311,9 @@ struct pointer_traits<_Ty*> { #ifdef __cpp_lib_concepts template concept _Has_to_address = requires(const _Ty& _Val) { - typename pointer_traits<_Ty>; - pointer_traits<_Ty>::to_address(_Val); - }; + typename pointer_traits<_Ty>; + pointer_traits<_Ty>::to_address(_Val); +}; #else // ^^^ Use concept / use variable template vvv template inline constexpr bool _Has_to_address = false; // determines whether pointer_traits<_Ty> has to_address @@ -592,10 +592,9 @@ template