forked from boostorg/type_traits
Add support for retrieving the arity of a function type without partial
specialization. Document and test this [SVN r14694]
This commit is contained in:
1 parent
8f8e96630c
commit
1ba525e29d
3 files changed
+71
-2
No files matched your search
@@ -45,11 +45,13 @@ struct is_double<double>
|
||||
|
||||
int test_main(int, char*[])
|
||||
{
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
typedef int F2(float, double);
|
||||
|
||||
typedef boost::function_traits<F2> traits;
|
||||
|
||||
BOOST_TEST(traits::arity == 2);
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
BOOST_TEST(is_int<traits::result_type>::value);
|
||||
BOOST_TEST(is_float<traits::arg1_type>::value);
|
||||
BOOST_TEST(is_double<traits::arg2_type>::value);
|
||||
|
||||
Reference in new issue
Block a user