Add specialization for << operator for writing std::string to FileStorage
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 29 Mar 2013 12:27:12 +0000 (16:27 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 29 Mar 2013 12:27:12 +0000 (16:27 +0400)
modules/core/include/opencv2/core/cvstd.inl.hpp

index 88d114a..2c6ee79 100644 (file)
@@ -125,6 +125,11 @@ template<> inline void operator >> (const FileNode& n, std::string& value)
     value = val;
 }
 
+template<> inline FileStorage& operator << (FileStorage& fs, const std::string& value)
+{
+    return fs << cv::String(value);
+}
+
 #endif // OPENCV_NOSTL
 } // cv