Patchwork [v3] use noexcept in pointer_traits

login
register
mail settings
Submitter Jonathan Wakely
Date June 14, 2011, 10:13 p.m.
Message ID <BANLkTinNz2AqSpkAqYfZOn1fs0pX4-CJkA@mail.gmail.com>
Download mbox | patch
Permalink /patch/100443/
State New
Headers show

Comments

Jonathan Wakely - June 14, 2011, 10:13 p.m.
I missed the "noexcept" qualifier off this function when I added it recently.

2011-06-14  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/ptr_traits.h (pointer_traits<T*>::pointer_to): Use
	noexcept.

Tested x86_64-linux and committed to trunk

Patch

Index: include/bits/ptr_traits.h
===================================================================
--- include/bits/ptr_traits.h	(revision 175056)
+++ include/bits/ptr_traits.h	(working copy)
@@ -211,7 +211,7 @@ 
        *  @return @c addressof(r)
       */
       static pointer
-      pointer_to(typename __ptrtr_not_void<element_type>::__type& __r)
+      pointer_to(typename __ptrtr_not_void<element_type>::__type& __r) noexcept
       { return std::addressof(__r); }
     };