Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2003-05-08 05:25:55


> We have been using call_traits from Boost version 1.29.0 in
> conjunction with MSVC 7.0. When attempting to recompile this code
> under MSVC 7.1, using either Boost 1.29.0 or 1.30.0, we now
> encounter compilation errors. A simple example of the usage pattern
> is:
> class A
> {
> public:
> template<typename _Source>
> void doSomething
> (
> typename boost::call_traits<_Source>::param_type value
> )
> {
> }
> };
> The new compiler generates the error message:
>
> c:\Documents and Settings\rbowen\My
> Documents\Projects\CallTraitsTest\CallTraitsTest.cpp(34) : error
> C2783: 'void A::doSomething
> (boost::call_traits<_Source>::param_type)' : could not deduce
> template argument for '_Source'
> c:\Documents and Settings\rbowen\My
> Documents\Projects\CallTraitsTest\CallTraitsTest.cpp(11) : see
> declaration of 'A::doSomething'
>
> As an experiment, I manually included the older logic for
> call_traits by cutting and pasting the relevant classes into my
> source from 'detail/ob_call_traits.hpp' and still encountered the
> same error.
>
> Has anyone else experienced this? Is this (yet another) MS compiler
> bug?

No it is a correct error: call_traits can not be used in deduced contexts,
sorry :-(

John.


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