Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-03-15 12:54:35


"David B. Held" wrote:
>
> This code fails on bcc 5.5.1:

And for the gcc, too.

> template <typename U>
> foo(boost::call_traits<U>::param_type v)
> { }

There is a 'typename' missing, but that won't help AFAICS.

> [C++ Error] CallTraits.cpp(20): E2285 Could not find a match for
> 'foo::foo(X)'
>
> Any ideas?

The compiler has no idea how to deduce U as - depending on U -
param_type could change. What happens if two different U's would be a
valid match? IIUC the standard forbids type-deduction is these cases to
avoid non-portable code, so if any other compiler would work, it would
IMHO not be standard conformant code.

Regards, Daniel

-- 
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

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