Skip to content

Strange interaction with {fmt} and std::filesystem/std::experimental::filesystem #729

Closed
@LarsGullik

Description

@LarsGullik

I have a small test that gives weird results:

(test transcribed so might contain errors)

#include <cassert>

int main()
{
    auto d = std::string{"somedir/somepath"};
    auto p = std::experimental::filesystem::path(d);

   auto s = fmt::format("{}", p);

   assert(d == p.native());
   assert(s == p.native()); // Fails.
}

s ends up having some weird contents that I cannot see how it gets.
(this is with GCC-8 in C++14 mode.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions