|
Boost Users : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-08-11 23:53:33
AMDG
Bill McLean wrote:
>
>
> I have spent a couple of hours trying to resolve the following error when
> building our system. We have some code that has been compiling and working
> with GCC with no issues. However building it with MS VC20005 SP1 creates the
> following error. We are using boost 1.34.1:
>
>
>
> Error 2 error C2666:
> 'boost::variant<T0_,T1,T2,T3,T4,T5,T6,T7>::convert_construct' : 2 overloads
> have similar conversions
> c:\projects\ardev\currentdev\externallibs\boost\boost\variant\variant.hpp
> 1342
>
>
>
> I have searched the Boost list archives and found this post for boost
> 1.33.1:
>
>
>
> http://lists.boost.org/Archives/boost/2006/03/102375.php
>
>
>
> The author of this post Peter Schreegle did not receive a reply. He attached
> the below code and build log. It appears that this an issue for variants
> under visual studio 2005 SP1. Does anyone know if this is an issue for VS
> 2008? Is this issue for boost 1.35.0 being built by VS 2005 or VS 2008?
>
Aaargh. This is a compiler bug.
msvc generates incorrect copy constructors and assignment operators
in the presence of a base class with a templated constructor/assignment
operator.
If you create a copy constructor and assignment operator yourself, it
ought to
work.
In Christ,
Steven Watanabe
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