boostorg / boostorg/program_options

Support for <boost/std>::filesystem::path

Open
#69 7 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

Description

Basically the same issue from the mailing list which is open since Boost 1.35: http://boost.2283326.n4.nabble.com/program-options-Problem-with-paths-that-have-spaces-td2576490.html

Problem: You cannot take a `*::filesystem::path` param that contains spaces.

Reason: BPO uses `lexical_casts` which uses stream extraction stopping on first whitespace

Possible solution: Special case for types having a ctor accepting a string and using that.

Related issue: https://github.com/boostorg/lexical_cast/issues/25 but won't be fixed there. Consider: `lexical_cast("\"/home/my user\"")` is considered OK but calling a program with `./foobar "\"/home/my user\""` is not OK. So this is a BPO issue

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Boost.Program_options value parsing and read the linked mailing-list report plus lexical_cast issue #25 for the stated behavior. Trace how filesystem::path arguments are converted, then verify that paths containing spaces are accepted without changing the existing command-line handling; the payload names no source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.