]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR libstdc++/61909
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2014 18:17:28 +0000 (18:17 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Oct 2014 18:17:28 +0000 (18:17 +0000)
* include/std/functional (__is_location_invariant): Treat all
trivially copyable types as location invariant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216047 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/functional

index 6b4444aa2c56a50944dee7f79f61d31e704e0fa5..69ec7fff36d99369651f56c1b28d771a8391c70b 100644 (file)
@@ -7,6 +7,10 @@
        * include/std/atomic (atomic): Add assertion for trivially copyable.
        * testsuite/29_atomics/atomic/60695.cc: Adjust line number.
 
+       PR libstdc++/61909
+       * include/std/functional (__is_location_invariant): Treat all
+       trivially copyable types as location invariant.
+
 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
 
        PR libstdc++/60132
index 15247bf41d928ff91d53dff9d1b29fd7a075840d..bed1eea018f6e9fe470e6e9a6657c5aabdf36052 100644 (file)
@@ -1743,11 +1743,12 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
   /**
    *  Trait identifying "location-invariant" types, meaning that the
    *  address of the object (or any of its members) will not escape.
-   *  Also implies a trivial copy constructor and assignment operator.
+   *  Trivially copyable types are location-invariant and users can
+   *  specialize this trait for other types.
    */
   template<typename _Tp>
     struct __is_location_invariant
-    : __or_<is_pointer<_Tp>, is_member_pointer<_Tp>>::type
+    : is_trivially_copyable<_Tp>::type
     { };
 
   class _Undefined_class;