aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-10-23 09:03:25 -0400
committerPatrick Palka <ppalka@redhat.com>2020-10-23 09:03:25 -0400
commit50106208ff65fe8076329169cd97460a03e27388 (patch)
tree0ad1664ec7c607e912c42e4b3018e7584f805689
parent9e3b9ddb996f18d541a3e03611d46c3a6c0c0b5f (diff)
downloadgcc-50106208ff65fe8076329169cd97460a03e27388.zip
gcc-50106208ff65fe8076329169cd97460a03e27388.tar.gz
gcc-50106208ff65fe8076329169cd97460a03e27388.tar.bz2
libstdc++: Apply proposed resolutions for LWG 3428, 3447
libstdc++-v3/ChangeLog: * include/std/ranges (single_view::single_view): Mark the in place constructor explicit as per LWG 3428. (take_view): Remove the constraint on the deduction guide's template parameter as per LWG 3447.
-rw-r--r--libstdc++-v3/include/std/ranges9
1 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 4d3a494..a3e5354 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -205,9 +205,11 @@ namespace ranges
: _M_value(std::move(__t))
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3428. single_view's in place constructor should be explicit
template<typename... _Args>
requires constructible_from<_Tp, _Args...>
- constexpr
+ constexpr explicit
single_view(in_place_t, _Args&&... __args)
: _M_value{in_place, std::forward<_Args>(__args)...}
{ }
@@ -1801,7 +1803,10 @@ namespace views
}
};
- template<range _Range>
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3447. Deduction guides for take_view and drop_view have different
+ // constraints
+ template<typename _Range>
take_view(_Range&&, range_difference_t<_Range>)
-> take_view<views::all_t<_Range>>;