Skip to content

Incompatible with GCC 4.8.2 #56

Closed
@GuillaumeHolley

Description

@GuillaumeHolley

Hi,

I recently started playing with zstr in one of my projects and I noticed the library does not compile with GCC 4.8.2. I know that GCC 4.8.2 is reaaaaally old now, I think almost 10 years old, but unfortunately my users also use very old compilers...

Anyway, here is the issue (one issue at 2 places):

zstr.hpp: In member function ‘void zstr::ifstream::open(std::string, std::ios_base::openmode)’:
zstr.hpp:429:31: error: use of deleted function ‘std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)’
         std::istream::operator=(std::istream(new istreambuf(_fs.rdbuf())));

zstr.hpp: In member function ‘void zstr::ofstream::open(std::string, std::ios_base::openmode, int)’:
zstr.hpp:467:31: error: use of deleted function ‘std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)’
         std::ostream::operator=(std::ostream(new ostreambuf(_fs.rdbuf(), default_buff_size, level)));

If I compile with GCC 5.4.0 everything is fine. Would there be any way to work around that?

Thank you,
Guillaume

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions