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
This commit is contained in:
parent
233961db33
commit
1041dabaa2
4 changed files with 22 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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" }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue