boostorg / boostorg/program_options

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

未关闭
#69 7 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
136
派生
117
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 Boost.Program_options 的值解析开始,并阅读链接的邮件列表报告以及 lexical_cast issue #25,以了解所述行为。跟踪 filesystem::path 参数的转换方式,然后验证包含空格的路径能够被接受,同时不改变现有的命令行处理方式;payload 未指定要运行的源文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。