optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 33 forks source link

common: Logger compile error #265

Closed roccoarpa closed 2 years ago

roccoarpa commented 2 years ago

On actual master, Linux gnu gcc 4.8.5 reports the following error :

error: use of deleted function ‘bitpit::LoggerBuffer::LoggerBuffer(const bitpit::LoggerBuffer&)’
       m_fileVerbosityThreshold(other.m_fileVerbosityThreshold)
                                                              ^
In file included from /bitpit/src/common/logger.cpp:39:0:
/src/common/logger.hpp:79:7: note: ‘bitpit::LoggerBuffer::LoggerBuffer(const bitpit::LoggerBuffer&)’ is implicitly deleted because the default definition would be ill-formed:
 class LoggerBuffer : public std::streambuf
       ^
In file included from /usr/include/c++/4.8.2/ios:43:0,
                 from /usr/include/c++/4.8.2/istream:38,
                 from /usr/include/c++/4.8.2/fstream:38,
                 from /bitpit/src/common/logger.cpp:30:
/usr/include/c++/4.8.2/streambuf:802:7: error: ‘std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]’ is private
       basic_streambuf(const basic_streambuf& __sb)

More recent version of compiler does not report the same error (verified no error with gcc 7.3, gcc 9.3)

andrea-iob commented 2 years ago

I've just successfully built the master branch of bitpit with gcc 4.8.5. I would say the big was fixed by #317.