In visual C 7 The result are: c:\develop\FreeSearch\IndexBuilder\test.cpp(13) : error C2059: syntax error : '<' c:\develop\FreeSearch\IndexBuilder\test.cpp(14) : see reference to class template instantiation 'Y' being compiled c:\develop\FreeSearch\IndexBuilder\test.cpp(13) : error C2065: 'U' : undeclared identifier c:\develop\FreeSearch\IndexBuilder\test.cpp(13) : error C2238: unexpected token(s) preceding ';' c:\develop\FreeSearch\IndexBuilder\test.cpp(16) : error C2955: 'X' : use of class template requires template argument list c:\develop\FreeSearch\IndexBuilder\test.cpp(7) : see declaration of 'X' c:\develop\FreeSearch\IndexBuilder\test.cpp(16) : error C2955: 'X' : use of class template requires template argument list c:\develop\FreeSearch\IndexBuilder\test.cpp(7) : see declaration of 'X' c:\develop\FreeSearch\IndexBuilder\test.cpp(17) : error C2955: 'Y' : use of class template requires template argument list c:\develop\FreeSearch\IndexBuilder\test.cpp(14) : see declaration of 'Y' c:\develop\FreeSearch\IndexBuilder\test.cpp(17) : error C2955: 'Y' : use of class template requires template argument list c:\develop\FreeSearch\IndexBuilder\test.cpp(14) : see declaration of 'Y' c:\develop\FreeSearch\IndexBuilder\test.cpp(21) : error C2512: 'X' : no appropriate default constructor available with [ T=int ] c:\develop\FreeSearch\IndexBuilder\test.cpp(23) : fatal error C1903: unable to recover from previous error(s); stopping compilation Results
"Fernando Cacciola" <[EMAIL PROTECTED]> wrote in message b1493b$h35$[EMAIL PROTECTED]">news:b1493b$h35$[EMAIL PROTECTED]... > > "Fernando Cacciola" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I've fixed Optional for MSV6.0 > > Once the regression tests are updated, I'll see if I can fix it for the > > other compilers too. > > > I'm looking at the new regression tests. VC6.0 finally works, but not so > VC7.0 > I don't have VC >=7.0, so I'm trying to guess the problem. > > Could someone with access to vc7.0/7.1 try the following and report the > compiler output? My guess is that vc7.0 (at least) still has problems when > both non-template and (explicit?) template copy-ctors are present. > > template<class T> > struct X > { > X ( X const& ) ; > template<class U> X ( X<U> const& ) ; > } ; > > template<class T> > struct Y > { > Y ( Y const& ) ; > explicit template<class U> Y ( Y<U> const& ) ; > } ; > > void eat ( X ) ; > void eat ( Y ) ; > > int main() > { > X<int> x1 ; > X<int> x2 = x1; > eat(x1); > > Y<int> y1 ; > Y<int> y2 = y1; > eat(y1); > } > > TIA, > > -- > Fernando Cacciola > > > > > _______________________________________________ > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost > _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost