Re: VC7.1/8 Explicit templated constructor invoked instead of copy ctor

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I know you! ;-)
You are one of the boost guys (In my work, our base libraries are largely based in boost). BTW.. are you working in regression tests
for boost 1.34 ?

Best regards vecino...

--
Cholo Lennon
Bs.As.
ARG


"Fernando Cacciola" <fernando_cacciola@xxxxxxxxxxx> wrote in message news:#70HD2TRHHA.464@xxxxxxxxxxxxxxxxxxxxxxx
Hi Cholo Lennon,

You're right, VC8 is having problems with template and explicit
keyword (I've tried your sample with C++ Builder 6 (at this time an
old compiler) and Comeau online compiler, both compile successfully).
At the moment I don't see a workaround better than defining a copy
ctor in 'derived' (using static_cast to force the use of correct
ctor). I must say that I tried some workarround using another base
class, metaprogramming, etc, but without success. Another compiler
bug to notify....
Thanks for confirming it.
Fortunately the workaround is viable in our real code base.

--
Cholo Lennon
Bs.As.
ARG

Bs. As., ARG?? Me too!
Slowly we're getting momentum in these english-speaking newsgroups ;)

Fernando




.



Relevant Pages

  • Re: VC7.1/8 Explicit templated constructor invoked instead of copy ctor
    ... old compiler) and Comeau online compiler, ... copy ctor in 'derived'. ... the templated constructor is a better match because the copy constructor requires an implicit conversion from ... And is there any workaround which doesn't require 'derived' to implement itself a copy-ctor? ...
    (microsoft.public.vc.language)
  • Re: MSVC++ 13.10(VS2003) compler bug, help me with workaround
    ... it'll be the folks over there. ... No problem not in boost::bind library, problem in the compiler. ... Boost is very demanding in terms of compliance with the C++ Standard rules ... Boost people are more likely to know about a workaround than ...
    (microsoft.public.vc.language)
  • Re: INTERNAL COMPILER ERROR: compiler file msc1.cpp, line 1794
    ... It may cause buffer overflow in the compiler. ... > Thanks Victor, I appreciate all you efforts to help me out but what I am ... > looking for is some kind of workaround to avoid the ICE without requiring ... > reasons for the additional and apparently superfluous include directive:) ...
    (microsoft.public.vc.language)
  • preprocessor implementation GURU question
    ... I'm trying to resolve a disagreement between friends --Digital Mars ... The problem arose when I was trying to compile a boost example program ... compiler shouldn't be adding a space. ... involve concatenation, as it does not cause tokens to merge. ...
    (comp.lang.cpp)
  • Re: Copy constructors
    ... One of these days I must explore the "boost" library, ... I expect the boost::noncopyable class does the same thing, as the compiler ... can't generate the defaults in derived classes if the base class versions ... the empty base class optimization. ...
    (microsoft.public.vc.language)