diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 946875f5b1..5faede3ae8 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -7697,7 +7697,7 @@ std::string base64::make_base64_header(const char * dt) bool base64::read_base64_header(std::vector const & header, std::string & dt) { std::istringstream iss(header.data()); - return static_cast(iss >> dt); + return !!(iss >> dt);//the "std::basic_ios::operator bool" differs between C++98 and C++11. The "double not" syntax is portable and covers both cases with equivalent meaning } /****************************************************************************