public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc/devel/ranger] libstdc++: Make "implicit expression variants" more explicit (P2102R0)
Date: Wed, 17 Jun 2020 18:56:20 +0000 (GMT)	[thread overview]
Message-ID: <20200617185620.028EF398E818@sourceware.org> (raw)

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>;


                 reply	other threads:[~2020-06-17 18:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617185620.028EF398E818@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).