disable String(int) ctor
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Tue, 22 Sep 2015 19:00:16 +0000 (22:00 +0300)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Sun, 27 Sep 2015 11:54:11 +0000 (14:54 +0300)
MSVC and GCC compilers interprets cv::String a(0) as a valid
statement with conversion of "int" argument to "const char*".
This patch forbids this expected behaviour.

modules/core/include/opencv2/core/cvstd.hpp

index dff0b20..edae954 100644 (file)
@@ -576,6 +576,8 @@ private:
 
     char* allocate(size_t len); // len without trailing 0
     void deallocate();
+
+    String(int); // disabled and invalid. Catch invalid usages like, commandLineParser.has(0) problem
 };
 
 //! @} core_basic