public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Add noexcept to unique_ptr accessors
@ 2021-09-16 22:00 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-09-16 22:00 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
	(__uniq_ptr_impl::_M_deleter): Add noexcept.

Tested powerpc64le-linux. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1288 bytes --]

commit 869107c9c9752c9a53cdb06179c1e6be6d2e5f44
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Sep 14 09:34:30 2021

    libstdc++: Add noexcept to unique_ptr accessors
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
            (__uniq_ptr_impl::_M_deleter): Add noexcept.

diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h
index 62ec1b52ecd..da582176e84 100644
--- a/libstdc++-v3/include/bits/unique_ptr.h
+++ b/libstdc++-v3/include/bits/unique_ptr.h
@@ -169,10 +169,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	return *this;
       }
 
-      pointer&   _M_ptr() { return std::get<0>(_M_t); }
-      pointer    _M_ptr() const { return std::get<0>(_M_t); }
-      _Dp&       _M_deleter() { return std::get<1>(_M_t); }
-      const _Dp& _M_deleter() const { return std::get<1>(_M_t); }
+      pointer&   _M_ptr() noexcept { return std::get<0>(_M_t); }
+      pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
+      _Dp&       _M_deleter() noexcept { return std::get<1>(_M_t); }
+      const _Dp& _M_deleter() const noexcept { return std::get<1>(_M_t); }
 
       void reset(pointer __p) noexcept
       {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-16 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 22:00 [committed] libstdc++: Add noexcept to unique_ptr accessors Jonathan Wakely

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).