Skip to content

Warning: Moving a temporary object prevents copy elison with g++ 13.2.1 #229

@marascio

Description

@marascio

Compiling using g++ 13.2.1 generates the following warning at parser.hpp line 2585: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]. See below for full context:

toml11/toml/parser.hpp: In instantiation of ‘toml::basic_value<C, M, V> toml::parse(const std::filesystem::__cxx11::path&) [with Comment = discard_comments; Table = std::unordered_map; Array = std::vector]’:
xxxx.cc:137:30:   required from here
toml11/toml/parser.hpp:2585:40: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
 2585 |     return parse<Comment, Table, Array>(ifs, std::move(fpath.string()));

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