]> OCCT Git - occt-copy.git/commitdiff
0032430: Coding Rules - eliminate CLang warning -Wdeprecated-copy
authorkgv <kgv@opencascade.com>
Fri, 11 Jun 2021 11:52:37 +0000 (14:52 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 16 Jun 2021 12:24:11 +0000 (15:24 +0300)
Introduced Standard_DELETE alias to C++11 feature "=delete".

src/Extrema/Extrema_ExtCC.hxx
src/Extrema/Extrema_ExtCS.hxx
src/Extrema/Extrema_GenExtCS.hxx
src/Extrema/Extrema_GenExtPS.hxx
src/Extrema/Extrema_GenExtSS.hxx
src/Standard/Standard_Macro.hxx

index 9521c2833e034730ad46504a81da840f6649e84f..f3a41288ff1e5854ab0d799591ab61a77d9b9515 100644 (file)
@@ -143,8 +143,8 @@ protected:
 private:
 
   // disallow copies
-  Extrema_ExtCC            (Extrema_ExtCC& );
-  Extrema_ExtCC& operator= (Extrema_ExtCC& );
+  Extrema_ExtCC            (Extrema_ExtCC& ) Standard_DELETE;
+  Extrema_ExtCC& operator= (Extrema_ExtCC& ) Standard_DELETE;
 
 private:
 
index 689a8f67fa66368fcfcf536925bb7f7294067094..f0f138f81cfb0b07f175ced8c198a48f4685c3ba 100644 (file)
@@ -87,8 +87,8 @@ private:
 private:
 
   // disallow copies
-  Extrema_ExtCS            (Extrema_ExtCS& );
-  Extrema_ExtCS& operator= (Extrema_ExtCS& );
+  Extrema_ExtCS            (Extrema_ExtCS& ) Standard_DELETE;
+  Extrema_ExtCS& operator= (Extrema_ExtCS& ) Standard_DELETE;
 
 private:
 
index 758850aed96a56a3e834cda2b9649d4854b60cff..6b141077d261a364e505f4b0103dd32aba703aa7 100644 (file)
@@ -108,8 +108,8 @@ private:
 private:
 
   // disallow copies
-  Extrema_GenExtCS            (const Extrema_GenExtCS& );
-  Extrema_GenExtCS& operator= (const Extrema_GenExtCS& );
+  Extrema_GenExtCS            (const Extrema_GenExtCS& ) Standard_DELETE;
+  Extrema_GenExtCS& operator= (const Extrema_GenExtCS& ) Standard_DELETE;
 
 private:
 
index 3f64783bd32fbc9a7340036db7e7643d5173c052..fc14c4874d82085f183166256506083b18decc52 100644 (file)
@@ -110,8 +110,8 @@ private:
 private:
 
   // disallow copies
-  Extrema_GenExtPS            (const Extrema_GenExtPS& );
-  Extrema_GenExtPS& operator= (const Extrema_GenExtPS& );
+  Extrema_GenExtPS            (const Extrema_GenExtPS& ) Standard_DELETE;
+  Extrema_GenExtPS& operator= (const Extrema_GenExtPS& ) Standard_DELETE;
 
 private:
 
index 5e3e5ed0b42c6cd241add40859712e8f1b541312..c8fb24a06a3c97660949b8b5d562d53619f22319 100644 (file)
@@ -89,8 +89,8 @@ public:
 private:
 
   // disallow copies
-  Extrema_GenExtSS            (const Extrema_GenExtSS& );
-  Extrema_GenExtSS& operator= (const Extrema_GenExtSS& );
+  Extrema_GenExtSS            (const Extrema_GenExtSS& ) Standard_DELETE;
+  Extrema_GenExtSS& operator= (const Extrema_GenExtSS& ) Standard_DELETE;
 
 private:
 
index 86cd3bad9cefcbc845acb1e2adbe81909f457155..b634410eb37be447b2097ebf050bbcefbfbe3f91 100644 (file)
   #define Standard_OVERRIDE
 #endif
 
+//! @def Standard_DELETE
+//! Alias for C++11 keyword "=delete" marking methods to be deleted.
+#if defined(__cplusplus) && (__cplusplus >= 201100L)
+  // part of C++11 standard
+  #define Standard_DELETE =delete
+#elif defined(_MSC_VER) && (_MSC_VER >= 1800)
+  // implemented since VS2013
+  #define Standard_DELETE =delete
+#else
+  #define Standard_DELETE
+#endif
+
 //! @def Standard_FALLTHROUGH
 //! Should be used in a switch statement immediately before a case label,
 //! if code associated with the previous case label may fall through to that