Hello,

I pulled the most recent code and tried to re-compile Chrono, on WSL Win10.
The compile was fine when using c++17, but when enforcing strict C++11
standard, there is an istream error compiling ChArchiveBinary.

https://github.com/projectchrono/chrono/blob/main/src/chrono/serialization/ChArchiveBinary.cpp#L291

error: invalid conversion from ‘const char*’ to
‘std::basic_istream<char>::char_type* {aka char*}’

[  0%] Building CXX object
src/chrono/CMakeFiles/ChronoEngine.dir/serialization/ChArchiveBinary.cpp.o

/mnt/c/Projects/chrono/chrono/src/chrono/serialization/ChArchiveBinary.cpp:
In member function ‘std::istream& chrono::ChArchiveInBinary::read(T&) [with
T = std::__cxx11::basic_string<char>; std::istream =
std::basic_istream<char>]’:

/mnt/c/Projects/chrono/chrono/src/chrono/serialization/ChArchiveBinary.cpp:291:35:
error: invalid conversion from ‘const char*’ to
‘std::basic_istream<char>::char_type* {aka char*}’ [-fpermissive]

     return m_istream.read(val.data(), str_len);

                           ~~~~~~~~^~

In file included from /opt/..
/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/sstream:38:

                 from
/mnt/c/Projects/chrono/chrono/src/chrono/serialization/ChArchive.h:17,

                 from
/mnt/c/Projects/chrono/chrono/src/chrono/serialization/ChArchiveBinary.h:18,

                 from
/mnt/c/Projects/chrono/chrono/src/chrono/serialization/ChArchiveBinary.cpp:1:


Thank you,
Haifei

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/CANVSHr3780o3LzuXdxNp8EhQNWRmcSkZ0LnRFhef8axRVKstyQ%40mail.gmail.com.

Reply via email to