Skip to content

std/boost remove_filename different output #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marakew opened this issue Jan 4, 2023 · 1 comment
Closed

std/boost remove_filename different output #271

marakew opened this issue Jan 4, 2023 · 1 comment

Comments

@marakew
Copy link

marakew commented Jan 4, 2023

https://wandbox.org/permlink/iQDub9HJdmdSzqj6

C:/windows/disk/path/some/div/run.exe
"C:/windows/disk/path/some/div/"
"C:/windows/disk/path/some/div"
std parent_path "C:/windows/disk/path/some/div"
boost parent_path "C:/windows/disk/path/some"

is it boost correct or std correct ?

@Lastique
Copy link
Member

Lastique commented Jan 4, 2023

They both are. Boost.Filesystem v3 is not equivalent to std::filesystem.

@Lastique Lastique closed this as completed Jan 4, 2023
Lastique added a commit that referenced this issue Feb 5, 2023
v4 remove_filename works similar to std::filesystem, i.e. preserves
the trailing directory separator after removing the filename.
v3 remove_filename works as before. Its behavior is also useful in
v4, so added a new method remove_filename_and_trailing_separators
with the same behavior.

Also added replace_filename that was previously missing.

remove_filename discrepancy from std::filesystem was reported in:

#271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants