This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PR libstdc++/68222 Hide safe iterator operators
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 7 Aug 2018 23:39:19 +0100
- Subject: Re: PR libstdc++/68222 Hide safe iterator operators
- References: <5b2fbf84-6530-8aa8-0730-e892e681a12f@gmail.com>
On 02/08/18 22:16 +0200, François Dumont wrote:
+#if __cplusplus >= 201103L
+ /** @brief Copy assignment. */
+ _Safe_tagged_iterator&
+ operator=(const _Safe_tagged_iterator&) = default;
+
+ /** @brief Move assignment. */
+ _Safe_tagged_iterator&
+ operator=(_Safe_tagged_iterator&&) = default;
+#else
+ /**
+ * @brief Copy assignment.
+ */
+ _Safe_tagged_iterator&
+ operator=(const _Safe_tagged_iterator& __x) _GLIBCXX_NOEXCEPT
This _GLIBCXX_NOEXCEPT can be removed, because it expands to nothing
for C++98 mode.
+ {
+ _Safe_base::operator=(__x);
+ return *this;
+ }
+#endif