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
9 changes: 6 additions & 3 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -3246,11 +3246,14 @@ _NODISCARD constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const

namespace ranges {
// clang-format off
template <class _From, class _To>
concept _Uses_nonqualification_pointer_conversion =
is_pointer_v<_From> && is_pointer_v<_To>
&& !convertible_to<remove_pointer_t<_From>(*)[], remove_pointer_t<_To>(*)[]>;

template <class _From, class _To>
concept _Convertible_to_non_slicing = convertible_to<_From, _To>
&& !(is_pointer_v<decay_t<_From>>
&& is_pointer_v<decay_t<_To>>
&& _Not_same_as<remove_pointer_t<decay_t<_From>>, remove_pointer_t<decay_t<_To>>>);
&& !_Uses_nonqualification_pointer_conversion<decay_t<_From>, decay_t<_To>>;

template <class _Ty>
concept _Pair_like = !is_reference_v<_Ty> && requires(_Ty __t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ using std::output_iterator_tag, std::input_iterator_tag, std::forward_iterator_t

int main() {} // COMPILE-ONLY

void test_LWG_3470() {
int a[] = {1, 2, 3};
int* b[] = {&a[2], &a[0], &a[1]};
[[maybe_unused]] auto c = std::ranges::subrange<const int* const*>(b);
Comment thread
fsb4000 marked this conversation as resolved.
}

struct empty {};

namespace test_view_interface {
Expand Down