Skip to content

No match for fs::path operator+= when compiling with Boost 1.78 #23846

@achow101

Description

@achow101

With Boost 1.78 (installed on my system), I get a compiler error:

./fs.h: In function ‘fs::path fs::operator+(fs::path, fs::path)’:
./fs.h:91:8: error: no match for ‘operator+=’ (operand types are ‘fs::path’ and ‘std::remove_reference<fs::path&>::type’ {aka ‘fs::path’})
   91 |     p1 += std::move(p2);
      |     ~~~^~~~~~~~~~~~~~~~

It appears that in Boost 1.78, operator+= became a template function, and our path class which subclasses boost::filesystem::path::path no longer has an operator+= which will work with it.

I also opened an issue with boost: boostorg/filesystem#223

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions