Add specialization for << operator for writing std::string to FileStorage
This commit is contained in:
@@ -125,6 +125,11 @@ template<> inline void operator >> (const FileNode& n, std::string& value)
|
|||||||
value = val;
|
value = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<> inline FileStorage& operator << (FileStorage& fs, const std::string& value)
|
||||||
|
{
|
||||||
|
return fs << cv::String(value);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // OPENCV_NOSTL
|
#endif // OPENCV_NOSTL
|
||||||
} // cv
|
} // cv
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user