Skip to content

Commit

Permalink
Revert "<ranges>: Temporarily disable join_view for non-`forward_…
Browse files Browse the repository at this point in the history
…range`s, pending resolution of LWG-3698 (microsoft#2727)"

This reverts commit 2966813.
  • Loading branch information
cpplearner committed Feb 14, 2023
1 parent d4f1e09 commit 4ccfc5e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
13 changes: 0 additions & 13 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -3566,19 +3566,6 @@ namespace ranges {
_EXPORT_STD template <input_range _Vw>
requires view<_Vw> && input_range<range_reference_t<_Vw>>
class join_view : public _Join_view_base<_Vw> {

#ifndef _USE_JOIN_VIEW_INPUT_RANGE
static_assert(forward_range<_Vw>,
"Due to a design flaw, join_view can misbehave "
"with some input-only ranges (see https://wg21.link/lwg3698). "
"We believe that WG21 will be unable to fix this problem without breaking ABI. "
"To minimize breakage when a fix is implemented, "
"we are temporarily disabling potentially problematic cases. "
"You can define _USE_JOIN_VIEW_INPUT_RANGE to suppress this error, "
"but be aware that you will almost certainly need to recompile "
"when we release a fix.");
#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 @@ -3,7 +3,7 @@

RUNALL_INCLUDE ..\universal_prefix.lst
RUNALL_CROSSLIST
PM_CL="/EHsc /MTd /std:c++latest /permissive- /utf-8 /FImsvc_stdlib_force_include.h /wd4643 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER /D_USE_JOIN_VIEW_INPUT_RANGE"
PM_CL="/EHsc /MTd /std:c++latest /permissive- /utf-8 /FImsvc_stdlib_force_include.h /wd4643 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER"
RUNALL_CROSSLIST
PM_CL="/analyze:autolog- /Zc:preprocessor /wd6262"
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call"
2 changes: 0 additions & 2 deletions tests/std/tests/P0896R4_views_join/test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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

0 comments on commit 4ccfc5e

Please sign in to comment.