diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-02-24 16:21:55 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-02-25 13:04:32 -0500 |
commit | ec15da7c33055c37ba58cb778a4414aae49f16ba (patch) | |
tree | f8f6e536d68589d03c58f5e12891623a3657a26e /libstdc++-v3/include | |
parent | 55c4b3f486200bcfd6c5c333754e6abb7acd470c (diff) | |
download | gcc-ec15da7c33055c37ba58cb778a4414aae49f16ba.zip gcc-ec15da7c33055c37ba58cb778a4414aae49f16ba.tar.gz gcc-ec15da7c33055c37ba58cb778a4414aae49f16ba.tar.bz2 |
libstdc++: LWG 3325 Constrain return type of transformation function for transform_view
libstdc++-v3/ChangeLog:
LWG 3325 Constrain return type of transformation function for
transform_view
* include/std/ranges (transform_view): Constrain the return type of the
transformation function as per LWG 3325.
* testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/ranges | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index ffdd336..442d1d0 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -1540,6 +1540,8 @@ namespace views template<input_range _Vp, copy_constructible _Fp> requires view<_Vp> && is_object_v<_Fp> && regular_invocable<_Fp&, range_reference_t<_Vp>> + && std::__detail::__can_reference<invoke_result_t<_Fp&, + range_reference_t<_Vp>>> class transform_view : public view_interface<transform_view<_Vp, _Fp>> { private: |