Add support for retrieving the arity of a function type without partial

specialization. Document and test this


[SVN r14694]
This commit is contained in:
Douglas Gregor committed 2002-08-05 13:57:24 +00:00
1 parent 8f8e96630c
commit 1ba525e29d
3 files changed
+71 -2

No files matched your search

+3 -1
View File
@@ -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);