[gcc(refs/users/marxin/heads/marxin-gcc-benchmark-branch)] libstdc++: Make "implicit expression variants" more explicit (P2102R0)
Martin Liska
marxin@gcc.gnu.org
Mon Mar 30 10:06:52 GMT 2020
https://gcc.gnu.org/g:d6dfa3dafc0a69a84002f1c0be17a70b0996cc72
commit d6dfa3dafc0a69a84002f1c0be17a70b0996cc72
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Feb 17 13:20:57 2020 +0000
libstdc++: Make "implicit expression variants" more explicit (P2102R0)
* include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
const-qualified expression variations.
* include/std/concepts (copyable): Likewise.
Diff:
---
libstdc++-v3/ChangeLog | 4 ++++
libstdc++-v3/include/bits/iterator_concepts.h | 3 +++
libstdc++-v3/include/std/concepts | 3 ++-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2dca4b50dd7..c9660084179 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,9 @@
2020-02-17 Jonathan Wakely <jwakely@redhat.com>
+ * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
+ const-qualified expression variations.
+ * include/std/concepts (copyable): Likewise.
+
* include/std/type_traits (__is_standard_integer): New helper trait.
* include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
(cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h
index 04c862a4b97..792b3262106 100644
--- a/libstdc++-v3/include/bits/iterator_concepts.h
+++ b/libstdc++-v3/include/bits/iterator_concepts.h
@@ -693,7 +693,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _In, typename _Out>
concept indirectly_copyable_storable = indirectly_copyable<_In, _Out>
+ && indirectly_writable<_Out, iter_value_t<_In>&>
&& indirectly_writable<_Out, const iter_value_t<_In>&>
+ && indirectly_writable<_Out, iter_value_t<_In>&&>
+ && indirectly_writable<_Out, const iter_value_t<_In>&&>
&& copyable<iter_value_t<_In>>
&& constructible_from<iter_value_t<_In>, iter_reference_t<_In>>
&& assignable_from<iter_value_t<_In>&, iter_reference_t<_In>>;
diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts
index db614899942..acc9dd2599d 100644
--- a/libstdc++-v3/include/std/concepts
+++ b/libstdc++-v3/include/std/concepts
@@ -251,7 +251,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
concept copyable = copy_constructible<_Tp> && movable<_Tp>
- && assignable_from<_Tp&, const _Tp&>;
+ && assignable_from<_Tp&, _Tp&> && assignable_from<_Tp&, const _Tp&>
+ && assignable_from<_Tp&, const _Tp>;
template<typename _Tp>
concept semiregular = copyable<_Tp> && default_initializable<_Tp>;
More information about the Libstdc++-cvs
mailing list