Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -5190,7 +5190,7 @@ _FwdIt shift_right(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Iter_diff_t<_FwdIt> _P
}
#endif // _HAS_CXX20

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
namespace ranges {
class _Shift_left_fn : private _Not_quite_object {
public:
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -4114,7 +4114,7 @@ public:
};
#endif // _HAS_CXX20

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
template <class _Ty>
struct _Pointer_of_helper {};

Expand Down
2 changes: 1 addition & 1 deletion stl/inc/numeric
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ _CONSTEXPR20 void iota(_FwdIt _First, _FwdIt _Last, _Ty _Val) {
}
}

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
namespace ranges {
template <class _Out, class _Ty>
using iota_result = out_value_result<_Out, _Ty>;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ _INLINE_VAR constexpr bool _Is_cpp17_random_iter_v = is_convertible_v<_Iter_cat_

template <class _Iter>
_INLINE_VAR constexpr bool _Is_ranges_random_iter_v =
#if defined(__cpp_lib_concepts)
#ifdef __cpp_lib_concepts
random_access_iterator<_Iter> ||
#endif
_Is_cpp17_random_iter_v<_Iter>;
Expand Down
26 changes: 15 additions & 11 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,13 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#endif // __cpp_impl_coroutine

#if _HAS_CXX20
#if !defined(__EDG__) || defined(__INTELLISENSE__) // TRANSITION, EDG concepts support
#if !defined(__EDG__) || defined(__INTELLISENSE__) // TRANSITION, GH-395
#define __cpp_lib_concepts 202002L
#endif // !defined(__EDG__) || defined(__INTELLISENSE__)

#if defined(__cpp_lib_concepts)
#ifdef __cpp_lib_concepts // TRANSITION, GH-395
#define __cpp_lib_algorithm_iterator_requirements 202207L
#endif
#endif // __cpp_lib_concepts

#define __cpp_lib_assume_aligned 201811L
#define __cpp_lib_atomic_flag_test 201907L
Expand Down Expand Up @@ -1421,9 +1421,9 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_endian 201907L
#define __cpp_lib_erase_if 202002L

#if defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifdef __cpp_lib_concepts // TRANSITION, GH-395
#define __cpp_lib_format 202110L
#endif // defined(__cpp_lib_concepts)
#endif // __cpp_lib_concepts

#define __cpp_lib_generic_unordered_lookup 201811L
#define __cpp_lib_int_pow2 202002L
Expand All @@ -1449,12 +1449,16 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_latch 201907L
#define __cpp_lib_list_remove_return_type 201806L
#define __cpp_lib_math_constants 201907L
#define __cpp_lib_move_iterator_concept 202207L
#define __cpp_lib_polymorphic_allocator 201902L

#if defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifdef __cpp_lib_concepts // TRANSITION, GH-395
Comment thread
StephanTLavavej marked this conversation as resolved.
#define __cpp_lib_move_iterator_concept 202207L
#endif // __cpp_lib_concepts

#define __cpp_lib_polymorphic_allocator 201902L

#ifdef __cpp_lib_concepts // TRANSITION, GH-395
#define __cpp_lib_ranges 202110L
#endif // defined(__cpp_lib_concepts)
#endif // __cpp_lib_concepts

#define __cpp_lib_remove_cvref 201711L
#define __cpp_lib_semaphore 201907L
Expand Down Expand Up @@ -1549,7 +1553,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#endif // language mode
#endif // _M_CEE

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#define __cpp_lib_optional 202110L // P0798R8 Monadic Operations For optional
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_optional 202106L // P2231R1 Completing constexpr In optional And variant
Expand All @@ -1563,7 +1567,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_shared_ptr_arrays 201611L // P0497R0 Fixing shared_ptr For Arrays
#endif // _HAS_CXX20

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#define __cpp_lib_shift 202202L // P2440R1 ranges::shift_left, ranges::shift_right
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_shift 201806L // P0769R2 shift_left(), shift_right()
Expand Down
6 changes: 3 additions & 3 deletions tests/std/tests/GH_000545_include_compare/test_ranges.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <version> // TRANSITION, EDG support for concepts
#ifdef __cpp_lib_concepts // TRANSITION, EDG support for concepts
#include <version> // TRANSITION, GH-395
#ifdef __cpp_lib_concepts // TRANSITION, GH-395

#include <ranges>

// Testing LWG-3330 "Include <compare> from most library headers" by intentionally NOT including <compare>

static_assert(std::is_eq(std::partial_ordering::equivalent));

#endif // TRANSITION, EDG support for concepts
#endif // TRANSITION, GH-395

void test_ranges() {}
2 changes: 1 addition & 1 deletion tests/std/tests/P0220R1_string_view/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ constexpr bool test_case_contiguous_constructor() {
}

constexpr bool test_case_range_constructor() {
#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
const array expectedData{'n', 'o', ' ', 'n', 'u', 'l', 'l'};
// Also tests the corresponding deduction guide:
same_as<string_view> auto sv = basic_string_view(expectedData);
Expand Down
3 changes: 1 addition & 2 deletions tests/std/tests/P0980R1_constexpr_strings/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ struct string_view_convertible {
}
};

// TRANSITION, EDG concepts support
template <class Range1, class Range2>
constexpr bool equalRanges(const Range1& range1, const Range2& range2) noexcept {
#ifdef __cpp_lib_concepts
#ifdef __cpp_lib_concepts // TRANSITION, GH-395 (equalRanges should be replaced by direct calls to ranges::equal)
return ranges::equal(range1, range2);
#else // ^^^ __cpp_lib_concepts ^^^ / vvv !__cpp_lib_concepts vvv
return equal(begin(range1), end(range1), begin(range2), end(range2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ STATIC_ASSERT(__cpp_lib_adaptor_iterator_pair_constructor == 202106L);
STATIC_ASSERT(__cpp_lib_addressof_constexpr == 201603L);
#endif

#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_algorithm_iterator_requirements
#error __cpp_lib_algorithm_iterator_requirements is not defined
#elif __cpp_lib_algorithm_iterator_requirements != 202207L
Expand All @@ -44,7 +44,7 @@ STATIC_ASSERT(__cpp_lib_algorithm_iterator_requirements == 202207L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_allocate_at_least
#error __cpp_lib_allocate_at_least is not defined
#elif __cpp_lib_allocate_at_least != 202106L
Expand Down Expand Up @@ -444,7 +444,7 @@ STATIC_ASSERT(__cpp_lib_clamp == 201603L);
STATIC_ASSERT(__cpp_lib_complex_udls == 201309L);
#endif

#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, GH-395
#ifndef __cpp_lib_concepts
#error __cpp_lib_concepts is not defined
#elif __cpp_lib_concepts != 202002L
Expand Down Expand Up @@ -756,7 +756,7 @@ STATIC_ASSERT(__cpp_lib_execution == 201603L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_expected
#error __cpp_lib_expected is not defined
#elif __cpp_lib_expected != 202202L
Expand Down Expand Up @@ -800,7 +800,7 @@ STATIC_ASSERT(__cpp_lib_filesystem == 201703L);
#endif
#endif

#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_format
#error __cpp_lib_format is not defined
#elif __cpp_lib_format != 202110L
Expand Down Expand Up @@ -1260,7 +1260,7 @@ STATIC_ASSERT(__cpp_lib_memory_resource == 201603L);
#endif
#endif

#if _HAS_CXX20
#if _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
Comment thread
StephanTLavavej marked this conversation as resolved.
#ifndef __cpp_lib_move_iterator_concept
#error __cpp_lib_move_iterator_concept is not defined
#elif __cpp_lib_move_iterator_concept != 202207L
Expand Down Expand Up @@ -1332,7 +1332,7 @@ STATIC_ASSERT(__cpp_lib_not_fn == 201603L);
STATIC_ASSERT(__cpp_lib_null_iterators == 201304L);
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_optional
#error __cpp_lib_optional is not defined
#elif __cpp_lib_optional != 202110L
Expand Down Expand Up @@ -1362,7 +1362,7 @@ STATIC_ASSERT(__cpp_lib_optional == 201606L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_out_ptr
#error __cpp_lib_out_ptr is not defined
#elif __cpp_lib_out_ptr != 202106L
Expand Down Expand Up @@ -1412,7 +1412,7 @@ STATIC_ASSERT(__cpp_lib_polymorphic_allocator == 201902L);
STATIC_ASSERT(__cpp_lib_quoted_string_io == 201304L);
#endif

#if _HAS_CXX20 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX20 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges
#error __cpp_lib_ranges is not defined
#elif __cpp_lib_ranges != 202110L
Expand All @@ -1426,7 +1426,7 @@ STATIC_ASSERT(__cpp_lib_ranges == 202110L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_chunk
#error __cpp_lib_ranges_chunk is not defined
#elif __cpp_lib_ranges_chunk != 202202L
Expand All @@ -1440,7 +1440,7 @@ STATIC_ASSERT(__cpp_lib_ranges_chunk == 202202L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_chunk_by
#error __cpp_lib_ranges_chunk_by is not defined
#elif __cpp_lib_ranges_chunk_by != 202202L
Expand All @@ -1454,7 +1454,7 @@ STATIC_ASSERT(__cpp_lib_ranges_chunk_by == 202202L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_contains
#error __cpp_lib_ranges_contains is not defined
#elif __cpp_lib_ranges_contains != 202207L
Expand All @@ -1468,7 +1468,7 @@ STATIC_ASSERT(__cpp_lib_ranges_contains == 202207L);
#endif
#endif

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_iota
#error __cpp_lib_ranges_iota is not defined
#elif __cpp_lib_ranges_iota != 202202L
Expand All @@ -1482,7 +1482,7 @@ STATIC_ASSERT(__cpp_lib_ranges_iota == 202202L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_join_with
#error __cpp_lib_ranges_join_with is not defined
#elif __cpp_lib_ranges_join_with != 202202L
Expand All @@ -1496,7 +1496,7 @@ STATIC_ASSERT(__cpp_lib_ranges_join_with == 202202L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_ranges_slide
#error __cpp_lib_ranges_slide is not defined
#elif __cpp_lib_ranges_slide != 202202L
Expand All @@ -1510,7 +1510,7 @@ STATIC_ASSERT(__cpp_lib_ranges_slide == 202202L);
#endif
#endif

#if _HAS_CXX23 && !defined(__EDG__) // TRANSITION, EDG concepts support
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#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
Expand Down Expand Up @@ -1662,7 +1662,7 @@ STATIC_ASSERT(__cpp_lib_shared_timed_mutex == 201402L);
#endif
#endif

#if _HAS_CXX23 && defined(__cpp_lib_concepts)
#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#ifndef __cpp_lib_shift
#error __cpp_lib_shift is not defined
#elif __cpp_lib_shift != 202202L
Expand Down