]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/bits/allocator.h
Relocation (= move+destroy)
[thirdparty/gcc.git] / libstdc++-v3 / include / bits / allocator.h
index d9d1d26e13aafd5f79a71078303b26747665063a..9f018ea239c6cb40282f75ade1eb807a8054946e 100644 (file)
@@ -88,11 +88,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       template<typename _Up, typename... _Args>
        void
        construct(_Up* __p, _Args&&... __args)
+       noexcept(noexcept(::new((void *)__p)
+                           _Up(std::forward<_Args>(__args)...)))
        { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
 
       template<typename _Up>
        void
-       destroy(_Up* __p) { __p->~_Up(); }
+       destroy(_Up* __p)
+       noexcept(noexcept(__p->~_Up()))
+       { __p->~_Up(); }
 #endif
     };