re PR libstdc++/61909 (Small function optimization not applied to small objects)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 9 Oct 2014 18:17:28 +0000 (19:17 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 9 Oct 2014 18:17:28 +0000 (19:17 +0100)
PR libstdc++/61909
* include/std/functional (__is_location_invariant): Treat all
trivially copyable types as location invariant.

From-SVN: r216047

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;