зеркало из https://github.com/microsoft/STL.git
Move `<ranges>` and `<format>` into C++20 (#2518)
* In `<yvals_core.h>`, don't require `_HAS_CXX23` to define `__cpp_lib_format` and `__cpp_lib_ranges`. Change the feature-test macro test consistently. * Change test matrices for all tests that touch `<ranges>` and `<format>` to run in 20 mode instead of latest-only. * Don't use the `span` constructor added by P1989 to C++23 in `P0896R4_views_split`, which now must run in c++20 mode where that constructor is unavailable. Fixes #1814. * Implement `__msvc_int128.hpp` to complete WG21-P1522 and provide integer-class types `_Signed128` and `_Unsigned128` to be the distance / size types of `iota_view<64-bit integral>`.
This commit is contained in:
Родитель
823dbe3b44
Коммит
53d4f93525
|
@ -3,6 +3,7 @@
|
|||
|
||||
set(HEADERS
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_all_public_headers.hpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_int128.hpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_system_error_abi.hpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_tzdb.hpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_xlocinfo_types.hpp
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -40,8 +40,7 @@
|
|||
#include <yvals_core.h>
|
||||
#if _STL_COMPILER_PREPROCESSOR
|
||||
#ifndef __cpp_lib_format
|
||||
#pragma message("The contents of <format> are available only in c++latest mode;")
|
||||
#pragma message("see https://github.com/microsoft/STL/issues/1814 for details.")
|
||||
#pragma message("The contents of <format> are available only with C++20 or later.")
|
||||
#else // ^^^ !defined(__cpp_lib_format) / defined(__cpp_lib_format) vvv
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"Version": "1.0",
|
||||
"BuildAsHeaderUnits": [
|
||||
// "__msvc_all_public_headers.hpp", // for testing, not production
|
||||
"__msvc_int128.hpp",
|
||||
"__msvc_system_error_abi.hpp",
|
||||
"__msvc_tzdb.hpp",
|
||||
"__msvc_xlocinfo_types.hpp",
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <yvals_core.h>
|
||||
#if _STL_COMPILER_PREPROCESSOR
|
||||
#ifndef __cpp_lib_ranges
|
||||
#pragma message("The contents of <ranges> are available only in c++latest mode;")
|
||||
#pragma message("see https://github.com/microsoft/STL/issues/1814 for details.")
|
||||
#pragma message("The contents of <ranges> are available only with C++20 or later.")
|
||||
#else // ^^^ !defined(__cpp_lib_ranges) / defined(__cpp_lib_ranges) vvv
|
||||
#include <__msvc_int128.hpp>
|
||||
#include <iosfwd>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
|
@ -953,7 +953,9 @@ namespace ranges {
|
|||
} // namespace views
|
||||
|
||||
template <class _Ty>
|
||||
using _Iota_diff_t = conditional_t<is_integral_v<_Ty>, conditional_t<(sizeof(_Ty) < sizeof(int)), int, long long>,
|
||||
using _Iota_diff_t = conditional_t<is_integral_v<_Ty>,
|
||||
conditional_t<sizeof(_Ty) < sizeof(int), int,
|
||||
conditional_t<sizeof(_Ty) < sizeof(long long), long long, _Signed128>>,
|
||||
iter_difference_t<_Ty>>;
|
||||
|
||||
// clang-format off
|
||||
|
@ -981,6 +983,7 @@ namespace ranges {
|
|||
};
|
||||
|
||||
template <incrementable _Wi>
|
||||
requires integral<_Iota_diff_t<_Wi>> // TRANSITION, LWG-3670
|
||||
struct _Ioterator_category_base<_Wi> {
|
||||
using iterator_category = input_iterator_tag;
|
||||
|
||||
|
|
|
@ -740,21 +740,49 @@ concept indirectly_writable = requires(_It&& __i, _Ty&& __t) {
|
|||
};
|
||||
|
||||
template <class _Ty>
|
||||
concept _Integer_like = _Is_nonbool_integral<remove_cv_t<_Ty>>;
|
||||
inline constexpr bool _Integer_class = requires {
|
||||
typename _Ty::_Signed_type;
|
||||
typename _Ty::_Unsigned_type;
|
||||
};
|
||||
|
||||
template <class _Ty>
|
||||
concept _Integer_like = _Is_nonbool_integral<remove_cv_t<_Ty>> || _Integer_class<_Ty>;
|
||||
|
||||
template <class _Ty>
|
||||
concept _Signed_integer_like = _Integer_like<_Ty> && static_cast<_Ty>(-1) < static_cast<_Ty>(0);
|
||||
|
||||
template <bool _Is_integer_class>
|
||||
struct _Make_unsigned_like_impl {
|
||||
template <class _Ty>
|
||||
using _Apply = typename _Ty::_Unsigned_type;
|
||||
};
|
||||
template <>
|
||||
struct _Make_unsigned_like_impl<false> {
|
||||
template <class _Ty>
|
||||
using _Apply = make_unsigned_t<_Ty>;
|
||||
};
|
||||
|
||||
template <class _Ty>
|
||||
using _Make_unsigned_like_t = make_unsigned_t<_Ty>;
|
||||
using _Make_unsigned_like_t = typename _Make_unsigned_like_impl<_Integer_class<_Ty>>::template _Apply<_Ty>;
|
||||
|
||||
template <_Integer_like _Ty>
|
||||
_NODISCARD constexpr auto _To_unsigned_like(const _Ty _Value) noexcept {
|
||||
return static_cast<_Make_unsigned_like_t<_Ty>>(_Value);
|
||||
}
|
||||
|
||||
template <bool _Is_integer_class>
|
||||
struct _Make_signed_like_impl {
|
||||
template <class _Ty>
|
||||
using _Apply = typename _Ty::_Signed_type;
|
||||
};
|
||||
template <>
|
||||
struct _Make_signed_like_impl<false> {
|
||||
template <class _Ty>
|
||||
using _Apply = make_signed_t<_Ty>;
|
||||
};
|
||||
|
||||
template <class _Ty>
|
||||
using _Make_signed_like_t = make_signed_t<_Ty>;
|
||||
using _Make_signed_like_t = typename _Make_signed_like_impl<_Integer_class<_Ty>>::template _Apply<_Ty>;
|
||||
|
||||
template <_Integer_like _Ty>
|
||||
_NODISCARD constexpr auto _To_signed_like(const _Ty _Value) noexcept {
|
||||
|
@ -2697,10 +2725,8 @@ namespace ranges {
|
|||
inline constexpr bool enable_view =
|
||||
derived_from<_Ty, view_base> || _Derived_from_specialization_of<_Ty, view_interface>;
|
||||
|
||||
#ifdef __cpp_lib_ranges // TRANSITION, GH-1814
|
||||
template <class _Ty>
|
||||
concept view = range<_Ty> && movable<_Ty> && enable_view<_Ty>;
|
||||
#endif // TRANSITION, GH-1814
|
||||
|
||||
template <class _Rng, class _Ty>
|
||||
concept output_range = range<_Rng> && output_iterator<iterator_t<_Rng>, _Ty>;
|
||||
|
@ -3032,20 +3058,16 @@ namespace ranges {
|
|||
_NODISCARD constexpr _Derived& _Cast() noexcept {
|
||||
static_assert(derived_from<_Derived, view_interface>,
|
||||
"view_interface's template argument D must derive from view_interface<D> (N4849 [view.interface]/2).");
|
||||
#ifdef __cpp_lib_ranges // TRANSITION, GH-1814
|
||||
static_assert(view<_Derived>,
|
||||
"view_interface's template argument must model the view concept (N4849 [view.interface]/2).");
|
||||
#endif // TRANSITION, GH-1814
|
||||
return static_cast<_Derived&>(*this);
|
||||
}
|
||||
|
||||
_NODISCARD constexpr const _Derived& _Cast() const noexcept {
|
||||
static_assert(derived_from<_Derived, view_interface>,
|
||||
"view_interface's template argument D must derive from view_interface<D> (N4849 [view.interface]/2).");
|
||||
#ifdef __cpp_lib_ranges // TRANSITION, GH-1814
|
||||
static_assert(view<_Derived>,
|
||||
"view_interface's template argument must model the view concept (N4849 [view.interface]/2).");
|
||||
#endif // TRANSITION, GH-1814
|
||||
return static_cast<const _Derived&>(*this);
|
||||
}
|
||||
|
||||
|
|
|
@ -206,11 +206,9 @@ _STL_DISABLE_CLANG_WARNINGS
|
|||
#endif // _DEBUG
|
||||
|
||||
#ifdef _ENABLE_STL_INTERNAL_CHECK
|
||||
#define _STL_INTERNAL_CHECK(...) _STL_VERIFY(__VA_ARGS__, "STL internal check: " #__VA_ARGS__)
|
||||
#define _STL_INTERNAL_STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
#define _STL_INTERNAL_CHECK(...) _STL_VERIFY(__VA_ARGS__, "STL internal check: " #__VA_ARGS__)
|
||||
#else // ^^^ _ENABLE_STL_INTERNAL_CHECK ^^^ // vvv !_ENABLE_STL_INTERNAL_CHECK vvv
|
||||
#define _STL_INTERNAL_CHECK(...) _Analysis_assume_(__VA_ARGS__)
|
||||
#define _STL_INTERNAL_STATIC_ASSERT(...)
|
||||
#endif // _ENABLE_STL_INTERNAL_CHECK
|
||||
|
||||
#ifndef _ENABLE_ATOMIC_REF_ALIGNMENT_CHECK
|
||||
|
|
|
@ -1295,9 +1295,9 @@
|
|||
#define __cpp_lib_endian 201907L
|
||||
#define __cpp_lib_erase_if 202002L
|
||||
|
||||
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395 and GH-1814
|
||||
#if defined(__cpp_lib_concepts) // TRANSITION, GH-395
|
||||
#define __cpp_lib_format 202110L
|
||||
#endif // _HAS_CXX23 && defined(__cpp_lib_concepts)
|
||||
#endif // defined(__cpp_lib_concepts)
|
||||
|
||||
#define __cpp_lib_generic_unordered_lookup 201811L
|
||||
#define __cpp_lib_int_pow2 202002L
|
||||
|
@ -1325,9 +1325,9 @@
|
|||
#define __cpp_lib_math_constants 201907L
|
||||
#define __cpp_lib_polymorphic_allocator 201902L
|
||||
|
||||
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395 and GH-1814
|
||||
#if defined(__cpp_lib_concepts) // TRANSITION, GH-395
|
||||
#define __cpp_lib_ranges 202110L
|
||||
#endif // _HAS_CXX23 && defined(__cpp_lib_concepts)
|
||||
#endif // defined(__cpp_lib_concepts)
|
||||
|
||||
#define __cpp_lib_remove_cvref 201711L
|
||||
#define __cpp_lib_semaphore 201907L
|
||||
|
@ -1503,5 +1503,11 @@ compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have recei
|
|||
#define _STL_UNREACHABLE __assume(false)
|
||||
#endif // __clang__
|
||||
|
||||
#ifdef _ENABLE_STL_INTERNAL_CHECK
|
||||
#define _STL_INTERNAL_STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
#else // ^^^ _ENABLE_STL_INTERNAL_CHECK ^^^ // vvv !_ENABLE_STL_INTERNAL_CHECK vvv
|
||||
#define _STL_INTERNAL_STATIC_ASSERT(...)
|
||||
#endif // _ENABLE_STL_INTERNAL_CHECK
|
||||
|
||||
#endif // _STL_COMPILER_PREPROCESSOR
|
||||
#endif // _YVALS_CORE_H_
|
||||
|
|
|
@ -450,6 +450,7 @@ tests\P1423R3_char8_t_remediation
|
|||
tests\P1425R4_queue_stack_constructors
|
||||
tests\P1502R1_standard_library_header_units
|
||||
tests\P1518R2_stop_overconstraining_allocators
|
||||
tests\P1522R1_difference_type
|
||||
tests\P1614R2_spaceship
|
||||
tests\P1645R1_constexpr_numeric
|
||||
tests\P1659R3_ranges_alg_ends_with
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\usual_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\usual_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/utf-8"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
# This is `concepts_latest_matrix.lst` with `/execution-charset:.932` added.
|
||||
# This is `concepts_20_matrix.lst` with `/execution-charset:.932` added.
|
||||
# clang is excluded since it doesn't support non-UTF-8 execution charsets.
|
||||
|
||||
RUNALL_INCLUDE ..\prefix.lst
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/w14640 /Zc:threadSafeInit- /EHsc /std:c++latest /execution-charset:.932"
|
||||
PM_CL="/w14640 /Zc:threadSafeInit- /EHsc /execution-charset:.932"
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /Zc:noexceptTypes-"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=1 /permissive-"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /Zc:char8_t- /Zc:preprocessor"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /Zc:wchar_t-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=1 /permissive-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=2 /permissive- /fp:except /Zc:preprocessor"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /permissive-"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /analyze:only /analyze:autolog-"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=1 /permissive-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /fp:strict"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=1 /permissive-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /permissive"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /permissive- /analyze:only /analyze:autolog-"
|
||||
PM_CL="/permissive- /Za /MD"
|
||||
PM_CL="/permissive- /Za /MDd"
|
||||
# PM_CL="/permissive- /BE /c /MD"
|
||||
# PM_CL="/permissive- /BE /c /MTd"
|
||||
# PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /permissive- /D_HAS_CXX23 /MD"
|
||||
# PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /permissive- /D_HAS_CXX23 /MTd /fp:strict"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++20 /permissive- /Zc:noexceptTypes-"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest /permissive-"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive- /Zc:char8_t- /Zc:preprocessor"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive- /Zc:wchar_t-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest /permissive-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++20 /permissive- /fp:except /Zc:preprocessor"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive-"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive- /analyze:only /analyze:autolog-"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest /permissive-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive- /fp:strict"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest /permissive-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /permissive"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /permissive- /analyze:only /analyze:autolog-"
|
||||
PM_CL="/std:c++20 /permissive- /Za /MD"
|
||||
PM_CL="/std:c++latest /permissive- /Za /MDd"
|
||||
# PM_CL="/std:c++20 /permissive- /BE /c /MD"
|
||||
# PM_CL="/std:c++latest /permissive- /BE /c /MTd"
|
||||
# PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /std:c++latest /permissive- /MD"
|
||||
# PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /std:c++latest /permissive- /D_HAS_CXX23 /MTd /fp:strict"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/utf-8"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
static_assert(ranges::_Advanceable<long long>);
|
||||
|
||||
template <class W, class B>
|
||||
concept CanViewIota = requires(W w, B b) {
|
||||
views::iota(w, b);
|
||||
|
@ -49,8 +51,10 @@ constexpr void test_integral() {
|
|||
|
||||
if constexpr (sizeof(T) < sizeof(int)) {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, int>);
|
||||
} else {
|
||||
} else if constexpr (sizeof(T) < sizeof(long long)) {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, long long>);
|
||||
} else {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, std::_Signed128>);
|
||||
}
|
||||
|
||||
// iota_view is always a simple-view, i.e., const and non-const are always valid ranges with the same iterators:
|
||||
|
@ -73,7 +77,9 @@ constexpr void test_integral() {
|
|||
|
||||
using I = ranges::iterator_t<R>;
|
||||
static_assert(same_as<typename I::iterator_concept, random_access_iterator_tag>);
|
||||
static_assert(same_as<typename iterator_traits<I>::iterator_category, input_iterator_tag>);
|
||||
if constexpr (integral<iter_difference_t<I>>) {
|
||||
static_assert(same_as<typename iterator_traits<I>::iterator_category, input_iterator_tag>);
|
||||
}
|
||||
|
||||
assert(I{} == I{T{0}});
|
||||
static_assert(is_nothrow_default_constructible_v<I>);
|
||||
|
@ -211,8 +217,10 @@ constexpr void test_integral() {
|
|||
|
||||
if constexpr (sizeof(T) < sizeof(int)) {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, int>);
|
||||
} else {
|
||||
} else if constexpr (sizeof(T) < sizeof(long long)) {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, long long>);
|
||||
} else {
|
||||
static_assert(same_as<ranges::range_difference_t<R>, std::_Signed128>);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -285,7 +285,7 @@ constexpr bool instantiation_test() {
|
|||
instantiator::call<test_range<forward_iterator_tag, Common::yes, CanView::yes, Copyability::copyable>>();
|
||||
|
||||
{ // ensure we get something contiguous
|
||||
for (string_view sv : "127..0..0..1"sv | views::split(".."sv)) {
|
||||
for (ranges::contiguous_range auto sv : "127..0..0..1"sv | views::split(".."sv)) {
|
||||
assert(!sv.empty());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\strict_winsdk_concepts_20_matrix.lst
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\strict_concepts_20_matrix.lst
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\concepts_latest_matrix.lst
|
||||
RUNALL_INCLUDE ..\concepts_20_matrix.lst
|
||||
|
|
|
@ -736,7 +736,7 @@ STATIC_ASSERT(__cpp_lib_filesystem == 201703L);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support and GH-1814
|
||||
#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
|
||||
#ifndef __cpp_lib_format
|
||||
#error __cpp_lib_format is not defined
|
||||
#elif __cpp_lib_format != 202110L
|
||||
|
@ -1336,7 +1336,7 @@ STATIC_ASSERT(__cpp_lib_polymorphic_allocator == 201902L);
|
|||
STATIC_ASSERT(__cpp_lib_quoted_string_io == 201304L);
|
||||
#endif
|
||||
|
||||
#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support and GH-1814
|
||||
#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
|
||||
#ifndef __cpp_lib_ranges
|
||||
#error __cpp_lib_ranges is not defined
|
||||
#elif __cpp_lib_ranges != 202110L
|
||||
|
@ -1350,7 +1350,7 @@ STATIC_ASSERT(__cpp_lib_ranges == 202110L);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support and GH-1814
|
||||
#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
|
||||
#ifndef __cpp_lib_ranges_starts_ends_with
|
||||
#error __cpp_lib_ranges_starts_ends_with is not defined
|
||||
#elif __cpp_lib_ranges_starts_ends_with != 202106L
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
# When updating this file, also update tests\P0645R10_text_formatting_legacy_text_encoding\env.lst to match
|
||||
|
||||
RUNALL_INCLUDE .\prefix.lst
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/w14640 /Zc:threadSafeInit- /EHsc /std:c++latest /D_HAS_CXX23"
|
||||
|
|
Загрузка…
Ссылка в новой задаче