OSDN Git Service

2010-05-17 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 May 2010 10:19:31 +0000 (10:19 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 May 2010 10:19:31 +0000 (10:19 +0000)
* include/std/functional (result_of): Move...
* include/std/type_traits: ... here.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
line number.

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

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/functional
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc

index ae20b11..b0782ce 100644 (file)
@@ -1,3 +1,10 @@
+2010-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/std/functional (result_of): Move...
+       * include/std/type_traits: ... here.
+       * testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
+       line number.
+
 2010-05-12  Jason Merrill  <jason@redhat.com>
 
        * testsuite/20_util/auto_ptr/assign_neg.cc: Expect template
index 00b9494..7de7edf 100644 (file)
@@ -169,17 +169,6 @@ namespace std
     : _Weak_result_type_impl<typename remove_cv<_Functor>::type>
     { };
 
-  template<typename _Signature>
-    class result_of;
-
-  template<typename _Functor, typename... _ArgTypes>
-    struct result_of<_Functor(_ArgTypes...)>
-    {
-      typedef
-        decltype( std::declval<_Functor>()(std::declval<_ArgTypes>()...) )
-        type;
-    };
-
   /// Determines if the type _Tp derives from unary_function.
   template<typename _Tp>
     struct _Derives_from_unary_function : __sfinae_types
index a2748c5..9831851 100644 (file)
@@ -638,7 +638,6 @@ namespace std
       typedef typename
         common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
     };
-  // @} group metaprogramming
 
   /// declval
   template<typename _Tp>
@@ -656,6 +655,20 @@ namespace std
                    "declval() must not be used!");
       return __declval_protector<_Tp>::__delegate();
     }
+
+  /// result_of
+  template<typename _Signature>
+    class result_of;
+
+  template<typename _Functor, typename... _ArgTypes>
+    struct result_of<_Functor(_ArgTypes...)>
+    {
+      typedef
+        decltype( std::declval<_Functor>()(std::declval<_ArgTypes>()...) )
+        type;
+    };
+
+  // @} group metaprogramming
 }
 
 #endif  // __GXX_EXPERIMENTAL_CXX0X__
index bd42478..c3b5022 100644 (file)
@@ -19,7 +19,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 655 }
+// { dg-error "static assertion failed" "" { target *-*-* } 654 }
 // { dg-error "instantiated from here" "" { target *-*-* } 30 }
 // { dg-excess-errors "In function" }