Both the type_traits and function_types library discard parameter
const-qualifiers when decomposing function types. Is this a bug or a
feature? If a feature, then it's surprising enough behaviour that I think
it warrants some documentation in both libraries. For the record, I'm
using gcc 4.7.3 on Cygwin 1.7.22 in Windows 7, and here's a reproducible
example of what I'm talking about:
#include
#include
#include
#include
#include
using namespace boost;
typedef void (foo)(int const);
int main()
{
typedef function_traits<foo>::arg1_type traits_deduced_type;
BOOST_MPL_ASSERT(( is_same ));
//Errors:
//BOOST_MPL_ASSERT(( is_same ));
typedef boost::function_types::parameter_types<foo> ftypes_params;
typedef boost::mpl::at >::type
ftypes_deduced_type;
BOOST_MPL_ASSERT(( is_same ));
//Errors:
//BOOST_MPL_ASSERT(( is_same ));
return 0;
}
Mostafa