如何在Spirit x3中做no_case
How to do no_case in Spirit x3
我有一个问题,IDK如何做no_case在精神X3。在Spirit中没有_case,但是当我使用它时,我得到:
// If you get an error no matching function for call to 'as_parser' // here, for either p or s, then p or s is not a parser or there is // no suitable conversion from p to a parser.
这是可能的我很困惑,我正试图混合苹果和橙子(qi和x3,例如IDK x3::parse和qi::parse之间的差异)
所以我的问题是如何做到这一点:
bool parsed = phrase_parse(first, last, no_case[char_('a')], space);
(没有no_case也可以)
是的,你可能把x3和qi混在一起了。下面是最简单的例子:
Live On Coliru
#include <boost/spirit/home/x3.hpp>
#include <cassert>
namespace x3 = boost::spirit::x3;
int main() {
std::string const input = "A";
auto first = input.begin(), last = input.end();
bool parsed = x3::phrase_parse(first, last, x3::no_case[x3::char_('a')], x3::space);
return parsed? 0:1;
}
相关文章:
- "error: no matching function for call to"构造函数错误
- 调用专用模板时出错"no matching function for call to [...]"
- c++20[[no.unique_address]]中的新功能是什么
- 以线程安全的方式调用"QQuickPaintedItem::updateImage(const QImage&image)"(no QThread)
- "no matching function for call to 'Vector::Vector'"错误
- Android NDK clang 编译器错误在 Windows 上显示'No such file or directory'
- 处理"no operator found"
- 我在 ifstream input_file(文件名)行中收到错误"no matching function to call";
- 如何解决"no Qt platform plugin could be initialized"问题?
- "Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
- 为什么当我在 std::string 中打开文件名的 fstream 时出现"no matching function"错误?
- 已解决 - C++ 的崇高文本中的"fatal error: opencv: no such file or directory"
- do while 循环中的 if 语句以 yes 或 no 结尾
- 从 TVector2 类派生复杂类:"No matching function for call to Complex::Complex()"
- 错误消息:使用"string* +="后"no match for 'operator+='"
- Eulers 项目问题 no 345 听不懂几行代码
- "No-Const Pointer to Const "调用功能
- 在 C++ 的 Switch Case 中创建对象后对对象调用方法
- 如何在 c++ 中将 s1 和 s2 与 no if 语句进行比较
- "No such file or directory" C++标头问题