Boost logo

Boost Users :

Subject: [Boost-users] How to use mpl::count and function_types
From: Allan Nielsen (a_at_[hidden])
Date: 2011-11-23 12:29:20


Hi

I'm trying to count the number of parameters in a function-type:

    cout << boost::mpl::count< boost::function_types::parameter_types<
void() > >::value << endl;
    cout << boost::mpl::count< boost::function_types::parameter_types<
void(int) > >::value << endl;
    cout << boost::mpl::count< boost::function_types::parameter_types<
void(int, int) > >::value << endl;

This prints:
0
0
0

I would have expected:
0
1
2

What have I done wrong?

--
Allan W. Nielsen

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net