Commit 1041daba by Paolo Carlini Committed by Paolo Carlini

functional (result_of): Move...

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.

From-SVN: r159478
parent 233961db
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
......
......@@ -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
......
......@@ -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__
......
......@@ -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" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment