Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<ranges>: Temporarily disable join_view for non-forward_ranges, pending resolution of LWG-3698 #2727

Merged
merged 4 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -3068,6 +3068,14 @@ namespace ranges {
requires view<_Vw> && input_range<range_reference_t<_Vw>>
class join_view : public _Join_view_base<_Vw> {
// clang-format on

#ifndef _USE_JOIN_VIEW_INPUT_RANGE
static_assert(forward_range<_Vw>,
"Using join_view with input-only ranges is temporarily disabled because of a bug that makes join_view "
"misbehave for certain ranges. See https://cplusplus.github.io/LWG/issue3698. You can define "
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
"_USE_JOIN_VIEW_INPUT_RANGE to suppress this diagnostic.");
#endif // _USE_JOIN_VIEW_INPUT_RANGE

private:
template <bool _Const>
using _InnerRng = range_reference_t<_Maybe_const<_Const, _Vw>>;
Expand Down
2 changes: 1 addition & 1 deletion tests/libcxx/usual_matrix.lst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RUNALL_INCLUDE ..\universal_prefix.lst
RUNALL_CROSSLIST
# TRANSITION, LLVM-53957: _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS belongs to llvm-project/libcxx/test/support/msvc_stdlib_force_include.h
PM_CL="/EHsc /MTd /std:c++latest /permissive- /FImsvc_stdlib_force_include.h /wd4643 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER /D_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS"
PM_CL="/EHsc /MTd /std:c++latest /permissive- /FImsvc_stdlib_force_include.h /wd4643 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER /D_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS /D_USE_JOIN_VIEW_INPUT_RANGE"
RUNALL_CROSSLIST
PM_CL="/analyze:autolog- /Zc:preprocessor"
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing"
2 changes: 2 additions & 0 deletions tests/std/tests/P0896R4_views_join/test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#define _USE_JOIN_VIEW_INPUT_RANGE

#include <algorithm>
#include <array>
#include <cassert>
Expand Down