Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 带ICU的正则表达式不适用于命名子表达式?_C++_Boost_Icu_Boost Regex - Fatal编程技术网

C++ 带ICU的正则表达式不适用于命名子表达式?

C++ 带ICU的正则表达式不适用于命名子表达式?,c++,boost,icu,boost-regex,C++,Boost,Icu,Boost Regex,命名子表达式是否应该与正则表达式ICU包装器一起工作? 看起来他们不是。例如,代码: boost::u32regex someRegex = boost::make_u32regex( "(?<subExprName>.*)$" ); boost::match_results<std::string::const_iterator> mr; if( boost::u32regex_search( "sometext", mr, someRegex ) ) auto

命名子表达式是否应该与正则表达式ICU包装器一起工作? 看起来他们不是。例如,代码:

boost::u32regex someRegex = boost::make_u32regex( "(?<subExprName>.*)$" );
boost::match_results<std::string::const_iterator> mr;
if( boost::u32regex_search( "sometext", mr, someRegex ) )
    auto subExpr = mr[ "subExprName" ];
成功搜索后()/match()为我修复了它,但这一行调用了两个专用于实现的方法,它们恰好位于类的公共部分。我现在正在使用Boost1.64,但我怀疑这与特定版本无关


在boost正则表达式中命名的子表达式是否“过时”,因为AFAIK标准中没有这样的子表达式?这对我来说是个坏消息。

我认为它们不会过时。这听起来像是u32regex的错误/疏忽。考虑向维护者报告。您在这里发布的内容可能足以满足拉取请求。@sehe,谢谢您,我在搜索时读了一些帖子,这让我很担心。据报道:我认为它们不会过时。这听起来像是u32regex的错误/疏忽。考虑向维护者报告。您在这里发布的内容可能足以满足拉取请求。@sehe,谢谢您,我在搜索时读了一些帖子,这让我很担心。据报道,这将促进:
mr.set_named_subs( someRegex.get_named_subs() );