Skip to content

Gcc compilation error after upgrade to v4 #247

@egorpugin

Description

@egorpugin
In file included from /root/.sw/storage/pkg/03/34/516e/src/sdir/include/toml11/comments.hpp:4,
                 from /root/.sw/storage/pkg/03/34/516e/src/sdir/include/toml.hpp:28,
                 from /__w/sw/sw/src/sw/driver/driver.cpp:28:
/root/.sw/storage/pkg/03/34/516e/src/sdir/include/toml11/fwd/comments_fwd.hpp: In function 'std::ostream& toml::operator<<(std::ostream&&, const discard_comments&)':
/root/.sw/storage/pkg/03/34/516e/src/sdir/include/toml11/fwd/comments_fwd.hpp:447:85: error: cannot bind non-const lvalue reference of type 'std::ostream&' {aka 'std::basic_ostream<char>&'} to an rvalue of type 'std::ostream' {aka 'std::basic_ostream<char>'}
  447 | inline std::ostream& operator<<(std::ostream&& os, const discard_comments&) {return os;}

It seems this should be https://github.com/ToruNiina/toml11/blob/main/include/toml11/fwd/comments_fwd.hpp#L447
std::ostream& os not std::ostream&& os.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions