Salome HOME
Fix compilation errors on Windows
[tools/libbatch.git] / src / Core / Batch_Versatile.hxx
index 96b4b6016c9dc6ff941709eba32f152894dd96d4..1b628e288f60bddc30066784c7b5676ee6938c3b 100644 (file)
@@ -43,6 +43,7 @@
 #include "Batch_CoupleType.hxx"
 #include "Batch_TypeMismatchException.hxx"
 #include "Batch_ListIsFullException.hxx"
+#include "Batch_RunTimeException.hxx"
 
 namespace Batch {
 
@@ -57,6 +58,10 @@ namespace Batch {
     Versatile(DiscriminatorType discriminator, size_type maxsize, std::string name);
     Versatile(const Versatile & V);
 
+    // Use of default constructor is forbidden but we cannot declare it private because
+    // compilation fails with VC8 on Windows
+    Versatile() { throw RunTimeException("Forbidden constructor"); }
+
     // Destructor
     virtual ~Versatile();
 
@@ -104,8 +109,7 @@ namespace Batch {
 
   private:
 
-    // Forbid the use of default constructor and affectation operator
-    Versatile() {}
+    // Forbid the use of affectation operator
     void operator= (const Versatile & V) {}
 
   };