mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 12:07:36 +02:00
adds const correctness, disables variadic tests, for now
[SVN r38203]
This commit is contained in:
@ -41,23 +41,23 @@ struct object_nc : boost::noncopyable {};
|
|||||||
struct fobj
|
struct fobj
|
||||||
{
|
{
|
||||||
// Handle nullary separately to exercise result_of support
|
// Handle nullary separately to exercise result_of support
|
||||||
template<typename T>
|
template <typename Sig>
|
||||||
struct result;
|
struct result;
|
||||||
|
|
||||||
template<typename T0>
|
template <class Self, typename T0>
|
||||||
struct result<fobj(T0)>
|
struct result< Self(T0) >
|
||||||
{
|
{
|
||||||
typedef int type;
|
typedef int type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T0, typename T1>
|
template <class Self, typename T0, typename T1>
|
||||||
struct result<fobj(T0, T1)>
|
struct result< Self(T0, T1) >
|
||||||
{
|
{
|
||||||
typedef int type;
|
typedef int type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T0, typename T1, typename T2>
|
template <class Self, typename T0, typename T1, typename T2>
|
||||||
struct result<fobj(T0, T1, T2)>
|
struct result< Self(T0, T1, T2) >
|
||||||
{
|
{
|
||||||
typedef int type;
|
typedef int type;
|
||||||
};
|
};
|
||||||
@ -86,11 +86,11 @@ struct fobj_nc
|
|||||||
: boost::noncopyable
|
: boost::noncopyable
|
||||||
{
|
{
|
||||||
// Handle nullary separately to exercise result_of support
|
// Handle nullary separately to exercise result_of support
|
||||||
template<typename T>
|
template <typename Sig>
|
||||||
struct result;
|
struct result;
|
||||||
|
|
||||||
template<typename T0>
|
template <class Self, typename T0>
|
||||||
struct result<fobj_nc(T0)>
|
struct result< Self(T0)>
|
||||||
{
|
{
|
||||||
typedef int type;
|
typedef int type;
|
||||||
};
|
};
|
||||||
@ -342,15 +342,17 @@ void result_type_tests()
|
|||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
fusion::result_of::invoke<int (*)(), fusion::vector0 >::type, int
|
fusion::result_of::invoke<int (*)(), fusion::vector0 >::type, int
|
||||||
>::value ));
|
>::value ));
|
||||||
BOOST_TEST(( is_same<
|
// disabled until boost::result_of supports it
|
||||||
fusion::result_of::invoke<int (*)(...), fusion::vector1<int> >::type, int
|
// BOOST_TEST(( is_same<
|
||||||
>::value ));
|
// fusion::result_of::invoke<int (*)(...), fusion::vector1<int> >::type, int
|
||||||
|
// >::value ));
|
||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
fusion::result_of::invoke<int (members::*)(), fusion::vector1<members*> >::type, int
|
fusion::result_of::invoke<int (members::*)(), fusion::vector1<members*> >::type, int
|
||||||
>::value ));
|
>::value ));
|
||||||
BOOST_TEST(( is_same<
|
// disabled until boost::result_of supports it
|
||||||
fusion::result_of::invoke<int (members::*)(...), fusion::vector2<members*,int> >::type, int
|
// BOOST_TEST(( is_same<
|
||||||
>::value ));
|
// fusion::result_of::invoke<int (members::*)(...), fusion::vector2<members*,int> >::type, int
|
||||||
|
// >::value ));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
Reference in New Issue
Block a user