This commit is contained in:
Stephan T. Lavavej 2023-08-10 17:44:26 -07:00 коммит произвёл GitHub
Родитель 9ad382e2f5
Коммит 036ea5953b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
36 изменённых файлов: 75 добавлений и 109 удалений

Просмотреть файл

@ -49,7 +49,7 @@ option(STL_USE_ANALYZE "Pass the /analyze flag to MSVC" OFF)
set(VCLIBS_EXPLICIT_MACHINE "")
if("${VCLIBS_TARGET_ARCHITECTURE}" MATCHES "^x86$")
if("${VCLIBS_TARGET_ARCHITECTURE}" STREQUAL "x86")
set(VCLIBS_TARGET_ARCHITECTURE "x86")
set(VCLIBS_I386_OR_AMD64 "i386")
set(VCLIBS_X86_OR_X64 "x86")
@ -58,22 +58,22 @@ if("${VCLIBS_TARGET_ARCHITECTURE}" MATCHES "^x86$")
# runtime dynamic linking by setting our own _STL_WIN32_WINNT back to Windows XP.
add_compile_definitions(_X86_ _VCRT_WIN32_WINNT=0x0501 _STL_WIN32_WINNT=0x0501)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/arch:IA32>)
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^x64$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "x64")
set(VCLIBS_TARGET_ARCHITECTURE "x64")
set(VCLIBS_I386_OR_AMD64 "amd64")
set(VCLIBS_X86_OR_X64 "x64")
add_compile_definitions(_AMD64_ _VCRT_WIN32_WINNT=0x0501 _STL_WIN32_WINNT=0x0501)
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^armv7$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "armv7")
set(VCLIBS_TARGET_ARCHITECTURE "arm")
set(VCLIBS_I386_OR_AMD64 "arm")
set(VCLIBS_X86_OR_X64 "arm")
add_compile_definitions(_ARM_ _VCRT_WIN32_WINNT=0x0602 _STL_WIN32_WINNT=0x0602)
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^arm64$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64")
set(VCLIBS_TARGET_ARCHITECTURE "arm64")
set(VCLIBS_I386_OR_AMD64 "arm64")
set(VCLIBS_X86_OR_X64 "arm64")
add_compile_definitions(_ARM64_ _VCRT_WIN32_WINNT=0x0A00 _STL_WIN32_WINNT=0x0A00)
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^arm64ec$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64ec")
set(VCLIBS_TARGET_ARCHITECTURE "arm64ec")
set(VCLIBS_I386_OR_AMD64 "arm64ec")
set(VCLIBS_X86_OR_X64 "arm64") # Yes, really: `%VCToolsInstallDir%lib\arm64ec` only contains the Link Options

Просмотреть файл

@ -549,5 +549,5 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[lit]: https://llvm.org/docs/CommandGuide/lit.html
[lit result codes]: https://llvm.org/docs/CommandGuide/lit.html#test-status-results
[opencode@microsoft.com]: mailto:opencode@microsoft.com
[redistributables]: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
[natvis documentation]: https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects
[redistributables]: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist
[natvis documentation]: https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects

Просмотреть файл

@ -84,7 +84,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
} else {
Write-Host 'AdminUser password supplied; switching to AdminUser.'
# https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
# https://learn.microsoft.com/en-us/sysinternals/downloads/psexec
$PsToolsZipUrl = 'https://download.sysinternals.com/files/PSTools.zip'
Write-Host "Downloading: $PsToolsZipUrl"
$ExtractedPsToolsPath = DownloadAndExtractZip -Url $PsToolsZipUrl

Просмотреть файл

@ -19,13 +19,13 @@ if(DEFINED STL_BINARY_DIR)
string(TOLOWER "${VCLIBS_TARGET_ARCHITECTURE}" VCLIBS_TARGET_ARCHITECTURE)
if("${VCLIBS_TARGET_ARCHITECTURE}" MATCHES "^x86$")
if("${VCLIBS_TARGET_ARCHITECTURE}" STREQUAL "x86")
set(VCLIBS_I386_OR_AMD64 "i386")
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^x64$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "x64")
set(VCLIBS_I386_OR_AMD64 "amd64")
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^armv7$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "armv7")
set(VCLIBS_I386_OR_AMD64 "arm")
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^arm64$")
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64")
set(VCLIBS_I386_OR_AMD64 "arm64")
else()
message(FATAL_ERROR "Could not determine target architecture: VCLIBS_TARGET_ARCHITECTURE: ${VCLIBS_TARGET_ARCHITECTURE}")

Просмотреть файл

@ -4148,9 +4148,7 @@ _FwdIt2 remove_copy_if(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _P
_REQUIRE_CPP17_MUTABLE_ITERATOR(_FwdIt2);
return _STD remove_copy_if(_First, _Last, _Dest, _Pass_fn(_Pred));
}
#endif // _HAS_CXX17
#if _HAS_CXX17
_EXPORT_STD template <class _ExPo, class _FwdIt, class _Ty, _Enable_if_execution_policy_t<_ExPo> = 0>
_NODISCARD_REMOVE_ALG _FwdIt remove(_ExPo&& _Exec, _FwdIt _First, _FwdIt _Last, const _Ty& _Val) noexcept; // terminates

Просмотреть файл

@ -18,7 +18,7 @@
#ifdef _M_CEE_PURE
// no intrinsics for /clr:pure
#elif defined(_M_ARM64) || defined(_M_ARM64EC)
// https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#base-requirements
// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#base-requirements
// Both floating-point and NEON support are presumed to be present in hardware.
#define _FMP_USING_STD_FMA
#elif defined(__clang__) // ^^^ defined(_M_ARM64) || defined(_M_ARM64EC) ^^^

Просмотреть файл

@ -21,10 +21,10 @@ _STL_DISABLE_CLANG_WARNINGS
_STD_BEGIN
#if _HAS_DEPRECATED_UNCAUGHT_EXCEPTION
_EXPORT_STD extern "C++" _CXX17_DEPRECATE_UNCAUGHT_EXCEPTION _CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
_EXPORT_STD extern "C++" _CXX17_DEPRECATE_UNCAUGHT_EXCEPTION _NODISCARD _CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
uncaught_exception() noexcept;
#endif // _HAS_DEPRECATED_UNCAUGHT_EXCEPTION
_EXPORT_STD extern "C++" _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL uncaught_exceptions() noexcept;
_EXPORT_STD extern "C++" _NODISCARD _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL uncaught_exceptions() noexcept;
_STD_END

Просмотреть файл

@ -59,10 +59,10 @@ namespace experimental {
using promise_type = typename _Ret::promise_type;
};
template <typename _Ret, typename... _Ts>
template <class _Ret, class... _Ts>
struct coroutine_traits : _Coroutine_traits_sfinae<_Ret> {};
template <typename _PromiseT = void>
template <class _PromiseT = void>
struct coroutine_handle;
template <>
@ -126,7 +126,7 @@ namespace experimental {
_Resumable_frame_prefix* _Ptr = nullptr;
};
template <typename _PromiseT>
template <class _PromiseT>
struct coroutine_handle : coroutine_handle<> { // general form
using coroutine_handle<>::coroutine_handle;
@ -226,7 +226,7 @@ namespace experimental {
// _Resumable_helper_traits class isolates front-end from public surface
// naming changes
template <typename _Ret, typename... _Ts>
template <class _Ret, class... _Ts>
struct _Resumable_helper_traits {
using _Traits = coroutine_traits<_Ret, _Ts...>;
using _PromiseT = typename _Traits::promise_type;

Просмотреть файл

@ -129,7 +129,9 @@ _NODISCARD constexpr bool _Is_arithmetic_fmt_type(_Basic_format_arg_type _Ty) {
return _Ty > _Basic_format_arg_type::_None && _Ty <= _Basic_format_arg_type::_Long_double_type;
}
struct _Auto_id_tag {};
struct _Auto_id_tag {
explicit _Auto_id_tag() = default;
};
// clang-format off
template <class _Ty, class _CharT>
@ -956,7 +958,7 @@ _NODISCARD constexpr bool _Is_execution_charset_self_synchronizing() {
// We care about this because if a charset is self-synchronizing then we can search through it
// for formatting control characters _without_ generally decoding the format string.
switch (_MSVC_EXECUTION_CHARACTER_SET) {
// See: https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
// See: https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
case 874: // Thai (Windows)
case 1250: // ANSI Central European; Central European (Windows)
case 1251: // ANSI Cyrillic; Cyrillic (Windows)
@ -1680,7 +1682,7 @@ public:
_Dynamic_specs._Dynamic_width_index = _Verify_dynamic_arg_index_in_range(_Arg_id);
}
constexpr void _On_dynamic_width(const _Auto_id_tag) {
constexpr void _On_dynamic_width(_Auto_id_tag) {
_Dynamic_specs._Dynamic_width_index = _Verify_dynamic_arg_index_in_range(_Parse_ctx.next_arg_id());
}
@ -1689,7 +1691,7 @@ public:
_Dynamic_specs._Dynamic_precision_index = _Verify_dynamic_arg_index_in_range(_Arg_id);
}
constexpr void _On_dynamic_precision(const _Auto_id_tag) {
constexpr void _On_dynamic_precision(_Auto_id_tag) {
_Dynamic_specs._Dynamic_precision_index = _Verify_dynamic_arg_index_in_range(_Parse_ctx.next_arg_id());
}
@ -3975,7 +3977,7 @@ public:
_Specs._Dynamic_width_index = _Verify_dynamic_arg_index_in_range(_Arg_id);
}
constexpr void _On_dynamic_width(const _Auto_id_tag) {
constexpr void _On_dynamic_width(_Auto_id_tag) {
_Specs._Dynamic_width_index = _Verify_dynamic_arg_index_in_range(_Parse_ctx.next_arg_id());
}

Просмотреть файл

@ -108,7 +108,7 @@ namespace stdext {
float _Max_buckets = 0.0F; // current maximum bucket size
};
template <class _Kty, class _Ty, class _Tr = hash_compare<_Kty, less<_Kty>>,
template <class _Kty, class _Ty, class _Tr = hash_compare<_Kty, _STD less<_Kty>>,
class _Alloc = allocator<pair<const _Kty, _Ty>>>
class hash_map : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false>> {
// hash table of {key, mapped} values, unique keys
@ -297,7 +297,7 @@ namespace stdext {
return !(_Left == _Right);
}
template <class _Kty, class _Ty, class _Tr = hash_compare<_Kty, less<_Kty>>,
template <class _Kty, class _Ty, class _Tr = hash_compare<_Kty, _STD less<_Kty>>,
class _Alloc = allocator<pair<const _Kty, _Ty>>>
class hash_multimap : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true>> {
// hash table of {key, mapped} values, non-unique keys

Просмотреть файл

@ -85,7 +85,7 @@ namespace stdext {
float _Max_buckets = 0.0F; // current maximum bucket size
};
template <class _Kty, class _Tr = hash_compare<_Kty, less<_Kty>>, class _Alloc = allocator<_Kty>>
template <class _Kty, class _Tr = hash_compare<_Kty, _STD less<_Kty>>, class _Alloc = allocator<_Kty>>
class hash_set : public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, false>> { // hash table of key values, unique keys
public:
using _Mybase = _Hash<_Hset_traits<_Kty, _Tr, _Alloc, false>>;
@ -230,7 +230,7 @@ namespace stdext {
return !(_Left == _Right);
}
template <class _Kty, class _Tr = hash_compare<_Kty, less<_Kty>>, class _Alloc = allocator<_Kty>>
template <class _Kty, class _Tr = hash_compare<_Kty, _STD less<_Kty>>, class _Alloc = allocator<_Kty>>
class hash_multiset
: public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, true>> { // hash table of key values, non-unique keys
public:

Просмотреть файл

@ -36,9 +36,7 @@ public:
}
#endif // defined(__FORCE_INSTANCE)
explicit __CLR_OR_THIS_CALL basic_istream(_Mysb* _Strbuf, bool _Isstd = false)
: _Chcount(0) {
explicit __CLR_OR_THIS_CALL basic_istream(_Mysb* _Strbuf, bool _Isstd = false) : _Chcount(0) {
_Myios::init(_Strbuf, _Isstd);
}

Просмотреть файл

@ -1466,8 +1466,6 @@ struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
_STD_END
_STDEXT_BEGIN
using _STD size_t;
template <class _Ptr>
class _DEPRECATE_STDEXT_ARR_ITERS checked_array_iterator { // wrap a pointer with checking
private:

Просмотреть файл

@ -656,7 +656,13 @@ struct _Circ_buf { // holds historical values for generators
}
size_t _Base(size_t _Ix = 0) const noexcept {
return (_Ix += _Idx) < _Nw ? (_Ix + _Nw) : (_Ix - _Nw);
_Ix += _Idx;
if (_Ix < _Nw) {
return _Ix + _Nw;
} else {
return _Ix - _Nw;
}
}
unsigned int _Idx;
@ -999,7 +1005,7 @@ public:
};
#if _HAS_TR1_NAMESPACE
_CONSTEVAL double _Cx_exp2(const int _Exp) noexcept {
constexpr double _Cx_exp2(const int _Exp) noexcept {
double _Ret = 1.0;
for (int _Count = _Exp; _Count > 0; --_Count) {
_Ret *= 2.0;

Просмотреть файл

@ -181,7 +181,7 @@ struct _Big_uint128 {
uint64_t _Upper;
uint64_t _Lower;
constexpr bool operator<(const _Big_uint128 _Rhs) const noexcept {
_NODISCARD constexpr bool operator<(const _Big_uint128 _Rhs) const noexcept {
if (_Upper != _Rhs._Upper) {
return _Upper < _Rhs._Upper;
}

Просмотреть файл

@ -1541,9 +1541,7 @@ struct _Fold_common_reference<void_t<common_reference_t<_Ty1, _Ty2>>, _Ty1, _Ty2
template <class _Ty1, class _Ty2, class _Ty3, class... _Rest>
struct common_reference<_Ty1, _Ty2, _Ty3, _Rest...> : _Fold_common_reference<void, _Ty1, _Ty2, _Ty3, _Rest...> {};
#endif // _HAS_CXX20
#if _HAS_CXX20
_EXPORT_STD template <class _Ty>
struct type_identity {
using type = _Ty;

Просмотреть файл

@ -8,14 +8,13 @@
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR
#include <__msvc_bit_utils.hpp>
#include <__msvc_sanitizer_annotate_container.hpp>
#include <xmemory>
#if _HAS_CXX17
#include <xpolymorphic_allocator.h>
#endif // _HAS_CXX17
#include <__msvc_sanitizer_annotate_container.hpp>
#pragma pack(push, _CRT_PACKING)
#pragma warning(push, _STL_WARNING_LEVEL)
#pragma warning(disable : _STL_DISABLED_WARNINGS)

Просмотреть файл

@ -28,12 +28,14 @@ _EXPORT_STD struct once_flag { // opaque data structure for call_once()
void* _Opaque;
};
#ifdef _CRTBLD
// Returns BOOL, nonzero to indicate success, zero for failure
using _Execute_once_fp_t = int(__stdcall*)(void*, void*, void**);
// Returns BOOL, nonzero to indicate success, zero for failure
extern "C++" _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Execute_once(
once_flag& _Flag, _Execute_once_fp_t _Callback, void* _Pv) noexcept;
#endif // _CRTBLD
template <class _Ty>
union _Immortalizer_impl { // constructs _Ty, never destroys

Просмотреть файл

@ -32,10 +32,6 @@ _STL_DISABLE_CLANG_WARNINGS
#ifdef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
namespace stdext {
using _STD basic_string;
using _STD less;
using _STD size_t;
template <class _Kty>
_NODISCARD size_t hash_value(const _Kty& _Keyval) noexcept {
if constexpr (_STD is_pointer_v<_Kty> || _STD is_null_pointer_v<_Kty>) {
@ -46,7 +42,7 @@ namespace stdext {
}
template <class _Elem, class _Traits, class _Alloc>
_NODISCARD size_t hash_value(const basic_string<_Elem, _Traits, _Alloc>& _Str) noexcept {
_NODISCARD size_t hash_value(const _STD basic_string<_Elem, _Traits, _Alloc>& _Str) noexcept {
return _STD _Hash_array_representation(_Str.c_str(), _Str.size());
}
@ -58,7 +54,7 @@ namespace stdext {
return _STD _Hash_array_representation(_Str, _CSTD wcslen(_Str));
}
template <class _Kty, class _Pr = less<_Kty>>
template <class _Kty, class _Pr = _STD less<_Kty>>
class hash_compare { // traits class for hash containers
public:
enum { // parameters for hash table

Просмотреть файл

@ -9,6 +9,7 @@
#define _XSTRING_
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR
#include <__msvc_sanitizer_annotate_container.hpp>
#include <iosfwd>
#include <xmemory>
@ -16,8 +17,6 @@
#include <xpolymorphic_allocator.h>
#endif // _HAS_CXX17
#include <__msvc_sanitizer_annotate_container.hpp>
#pragma pack(push, _CRT_PACKING)
#pragma warning(push, _STL_WARNING_LEVEL)
#pragma warning(disable : _STL_DISABLED_WARNINGS)
@ -684,7 +683,7 @@ template <class _Elem>
class _String_bitmap<_Elem, false> { // _String_bitmap for wchar_t/unsigned short/char16_t/char32_t/etc. types
public:
static_assert(is_unsigned_v<_Elem>,
"Standard char_traits is only provided for char, wchar_t, char16_t, and char32_t. See N5687 [char.traits]. "
"Standard char_traits is only provided for char, wchar_t, char16_t, and char32_t. See N4950 [char.traits]. "
"Visual C++ accepts other unsigned integral types as an extension.");
constexpr bool _Mark(const _Elem* _First, const _Elem* const _Last) noexcept {

Просмотреть файл

@ -59,23 +59,15 @@ struct _Mtx_internal_imp_t {
};
// Size and alignment for _Cnd_internal_imp_t
#ifdef _CRT_WINDOWS
#ifdef _WIN64
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 16;
_INLINE_VAR constexpr size_t _Cnd_internal_imp_alignment = 8;
#else // ^^^ defined(_WIN64) / !defined(_WIN64) vvv
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 8;
_INLINE_VAR constexpr size_t _Cnd_internal_imp_alignment = 4;
#endif // ^^^ !defined(_WIN64) ^^^
#else // ^^^ defined(_CRT_WINDOWS) / !defined(_CRT_WINDOWS) vvv
#ifdef _WIN64
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 72;
_INLINE_VAR constexpr size_t _Cnd_internal_imp_alignment = 8;
#else // ^^^ defined(_WIN64) / !defined(_WIN64) vvv
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 40;
_INLINE_VAR constexpr size_t _Cnd_internal_imp_alignment = 4;
#endif // ^^^ !defined(_WIN64) ^^^
#endif // ^^^ !defined(_CRT_WINDOWS) ^^^
#if defined(_CRT_WINDOWS) // for Windows-internal code
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 2 * sizeof(void*);
#elif defined(_WIN64) // ordinary 64-bit code
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 72;
#else // vvv ordinary 32-bit code vvv
_INLINE_VAR constexpr size_t _Cnd_internal_imp_size = 40;
#endif // ^^^ ordinary 32-bit code ^^^
_INLINE_VAR constexpr size_t _Cnd_internal_imp_alignment = alignof(void*);
using _Mtx_t = _Mtx_internal_imp_t*;

Просмотреть файл

@ -19,7 +19,10 @@ _STL_DISABLE_CLANG_WARNINGS
_EXTERN_C
#ifdef _CRTBLD
_CRTIMP2_PURE long __cdecl _Xtime_diff_to_millis2(const _timespec64*, const _timespec64*);
#endif // _CRTBLD
_CRTIMP2_PURE long long __cdecl _Xtime_get_ticks();
#ifdef _CRTBLD

Просмотреть файл

@ -1020,12 +1020,6 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define _STL_OPTIMIZE_SYSTEM_ERROR_OPERATORS 1
#endif // _STL_OPTIMIZE_SYSTEM_ERROR_OPERATORS
#ifdef __cpp_consteval
#define _CONSTEVAL consteval
#else // ^^^ supports consteval / no consteval vvv
#define _CONSTEVAL constexpr
#endif // ^^^ no consteval ^^^
// Controls whether the STL will force /fp:fast to enable vectorization of algorithms defined
// in the standard as special cases; such as reduce, transform_reduce, inclusive_scan, exclusive_scan
#ifndef _STD_VECTORIZE_WITH_FLOAT_CONTROL

Просмотреть файл

@ -18,7 +18,7 @@
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - see docs.microsoft.com
// DWORD dwCmpFlags - see https://aka.ms/stl/comparestringex
// LPCSTR lpStringn - multibyte string to be compared
// int cchCountn - char (byte) count (NOT including null terminator)
// (-1 if null terminated)

Просмотреть файл

@ -14,7 +14,7 @@
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - see docs.microsoft.com
// DWORD dwCmpFlags - see https://aka.ms/stl/comparestringex
// LPCWSTR lpStringn - wide string to be compared
// int cchCountn - wide char (word) count (NOT including null terminator)
// (-1 if null terminated)

Просмотреть файл

@ -14,7 +14,7 @@
//
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwMapFlags - see docs.microsoft.com
// DWORD dwMapFlags - see https://aka.ms/stl/lcmapstringex
// LPCSTR lpSrcStr - pointer to string to be mapped
// int cchSrc - wide char (word) count of input string
// (including null terminator if any)

Просмотреть файл

@ -12,7 +12,7 @@
//
// Entry:
// LPCWSTR locale_name - locale context for the comparison.
// DWORD map_flags - see docs.microsoft.com
// DWORD map_flags - see https://aka.ms/stl/lcmapstringex
// LPCWSTR source - pointer to string to be mapped
// int source_count - wide char (word) count of input string
// (including null terminator if any)

Просмотреть файл

@ -12,8 +12,7 @@
#include "primitives.hpp"
struct _Cnd_internal_imp_t { // condition variable implementation for ConcRT
typename std::_Aligned_storage<Concurrency::details::stl_condition_variable_max_size,
Concurrency::details::stl_condition_variable_max_alignment>::type cv;
typename std::_Aligned_storage<_Cnd_internal_imp_size, _Cnd_internal_imp_alignment>::type cv;
[[nodiscard]] Concurrency::details::stl_condition_variable_win7* _get_cv() noexcept {
// get pointer to implementation
@ -21,9 +20,6 @@ struct _Cnd_internal_imp_t { // condition variable implementation for ConcRT
}
};
static_assert(sizeof(_Cnd_internal_imp_t) == _Cnd_internal_imp_size, "incorrect _Cnd_internal_imp_size");
static_assert(alignof(_Cnd_internal_imp_t) == _Cnd_internal_imp_alignment, "incorrect _Cnd_internal_imp_alignment");
void _Cnd_init_in_situ(const _Cnd_t cond) { // initialize condition variable in situ
Concurrency::details::create_stl_condition_variable(cond->_get_cv());
}

Просмотреть файл

@ -19,19 +19,13 @@ extern "C" [[noreturn]] _CRTIMP2_PURE void _Thrd_abort(const char* msg) { // abo
abort();
}
#if defined(_THREAD_CHECK) || defined(_DEBUG)
#define _THREAD_CHECKX 1
#else // defined(_THREAD_CHECK) || defined(_DEBUG)
#define _THREAD_CHECKX 0
#endif // defined(_THREAD_CHECK) || defined(_DEBUG)
#if _THREAD_CHECKX
#ifdef _DEBUG
#define _THREAD_QUOTX(x) #x
#define _THREAD_QUOT(x) _THREAD_QUOTX(x)
#define _THREAD_ASSERT(expr, msg) ((expr) ? (void) 0 : _Thrd_abort(__FILE__ "(" _THREAD_QUOT(__LINE__) "): " msg))
#else // ^^^ _THREAD_CHECKX / !_THREAD_CHECKX vvv
#else // ^^^ defined(_DEBUG) / !defined(_DEBUG) vvv
#define _THREAD_ASSERT(expr, msg) ((void) 0)
#endif // ^^^ !_THREAD_CHECKX ^^^
#endif // ^^^ !defined(_DEBUG) ^^^
// TRANSITION, ABI: preserved for binary compatibility
enum class __stl_sync_api_modes_enum { normal, win7, vista, concrt };

Просмотреть файл

@ -51,15 +51,5 @@ namespace Concurrency {
inline void create_stl_condition_variable(stl_condition_variable_win7* p) {
new (p) stl_condition_variable_win7;
}
#if defined(_CRT_WINDOWS) // for Windows-internal code
const size_t stl_condition_variable_max_size = 2 * sizeof(void*);
#elif defined(_WIN64) // ordinary 64-bit code
const size_t stl_condition_variable_max_size = 72;
#else // vvv ordinary 32-bit code vvv
const size_t stl_condition_variable_max_size = 40;
#endif // ^^^ ordinary 32-bit code ^^^
const size_t stl_condition_variable_max_alignment = alignof(void*);
} // namespace details
} // namespace Concurrency

Просмотреть файл

@ -5,7 +5,8 @@
#include <exception>
_STD_BEGIN
_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL uncaught_exception() noexcept { // report if handling a throw
_CXX17_DEPRECATE_UNCAUGHT_EXCEPTION _NODISCARD _CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
uncaught_exception() noexcept {
return __uncaught_exception();
}

Просмотреть файл

@ -5,7 +5,7 @@
#include <exception>
_STD_BEGIN
_CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL uncaught_exceptions() noexcept { // report number of throws being handled
_NODISCARD _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL uncaught_exceptions() noexcept {
return __uncaught_exceptions();
}

Просмотреть файл

@ -185,14 +185,14 @@ _END_EXTERN_C_UNLESS_PURE
#pragma float_control(except, on, push)
#endif
template <typename T>
template <class T>
[[nodiscard]] T _Xfe_overflow(const T sign) noexcept {
static_assert(_STD is_floating_point_v<T>, "Expected is_floating_point_v<T>.");
constexpr T huge = _STD numeric_limits<T>::max();
return _STD copysign(huge, sign) * huge;
}
template <typename T>
template <class T>
[[nodiscard]] T _Xfe_underflow(const T sign) noexcept {
static_assert(_STD is_floating_point_v<T>, "Expected is_floating_point_v<T>.");
constexpr T tiny = _STD numeric_limits<T>::min();

Просмотреть файл

@ -25,7 +25,7 @@ using limits = numeric_limits<Ty>;
#ifdef _M_FP_STRICT
// According to:
// https://docs.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior
// https://learn.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior
// Under the default /fp:precise mode:
// The compiler generates code intended to run in the default floating-point environment and assumes that the
// floating-point environment is not accessed or modified at runtime.

Просмотреть файл

@ -50,7 +50,7 @@ constexpr bool test_one(Rng&& rng) {
// ... with lvalue argument
STATIC_ASSERT(CanViewElements<Rng&>);
constexpr bool is_view = ranges::view<remove_cvref_t<Rng>>;
if constexpr (CanViewElements<Rng&>) { // Validate lvalue
{ // Validate lvalue
constexpr bool is_noexcept = !is_view || is_nothrow_copy_constructible_v<V>;
STATIC_ASSERT(same_as<decltype(views::elements<0>(rng)), R>);

Просмотреть файл

@ -202,7 +202,7 @@ constexpr bool test_one(Rng&& rng, Expected&& expected) {
STATIC_ASSERT(noexcept(as_const(rng) | views::as_const));
}
{ //... with rvalue argument
{ // ... with rvalue argument
STATIC_ASSERT(same_as<decltype(views::as_const(move(rng))), ReconstructedRefView>);
STATIC_ASSERT(noexcept(views::as_const(move(rng))));