Archived

This forum has been archived. Please start a new discussion on GitHub.

"Explicit specialization" compiling problem

Hello.

I am new to ICE and to distributed application development in general. I actually found out about it today (10 November), in the comp.object.corba newsgroup, while I was trying to learn more about CORBA. I then went to ZeroC's website and took a closer look at ICE. I must say I liked what I saw. From the little I have seen of CORBA, if I had to classify ICE in one word, I'd say it is neat.

So I am now in the process of reading the PDF documentation (nicely written, by the way) and, after going through the introductory material, I finally got to the "Hello World Application". I followed the steps with excitement, but could not get past building the server because of compiler errors. I am using the compiler that comes with Visual C++ 2005 Express Edition Beta and although I understand it is not part of the supported platforms, I was curious about the error. Here is what it gives me:


D:\Ney\ICE>cl /c /EHs /MD Server.cpp Printer.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.40607.16 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

Server.cpp
C:\ICE\include\IceUtil\Handle.h(141) : error C2299: 'IceUtil::Handle<T>::Handle' : behavior change: an explicit specialization c
annot be a copy constructor or copy assignment operator
C:\ICE\include\IceUtil\Handle.h(239) : see reference to class template instantiation 'IceUtil::Handle<T>' being compiled

So, apparently, there has been some compiler behavior change with regards to explicit template specialization. I reckon that does not happen with the compiler that is bundled in Visual Studio .NET 2003. Could anyone confirm that?

Just out of curiosity, I decided to have a look at the source code of the offending header (<iceroot>\include\IceUtil\Handle.h, line 141) and found the following comment there:

// COMPILERBUG: Is VC++ or GNU C++ right here???

I wonder whether the problem I am facing has been an issue before. Anyway, what is important is that, if the diagnostic of the new VC++ compiler is correct, i.e. explicit specializations cannot be made for copy constructors and assignment operators, then the source code will have to be updated. I tried finding any relevant evidence in the C++ standard, but could not.

I would appreciate if somebody could provide some input on this as well as answer to my question as to whether the problem also happens with the compiler that comes with Visual Studio .NET 2003.

Best regards,

Comments

  • bernard
    bernard Jupiter, FL
    We support Visual C++ 6, 7.0 and 7.1 (7.1 = VS .NET 2003) ... so obviously this code compiles properly with these compilers!

    I suspect some ifdefs will need to be updated for the new compiler.

    Best regards,
    Bernard