Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-09-24 21:10:50


Why doesn't the following compile? I get the error "foo: function does
not take 1 arguments" on VC8.

#include <boost/call_traits.hpp>

template < typename P1 >
void foo ( typename ::boost::call_traits < P1 >::param_type p1 )
{
}

int main ( )
{
    foo ( 42 ); // error here
    return 0;
}

(Background info: I would like to use this technique to generate
optimized forwarding functions that do not know anything about the
function being forwarded to. Overloads taking any number of params
would be generated with the boost preprocessor library.)

-Jason


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk