Open netcan opened 4 years ago
https://netcan.github.io/2020/09/16/C-%E5%85%83%E7%BC%96%E7%A8%8B%E4%B9%8BParser-Combinator/
引子 前不久在 CppCon 上看到一个 Talk:constexpr All the things,这个演讲主题令我非常震撼,在编译期解析 json 字符串,进而提出了编译期构造正则表达式(编译期构建 FSM),现场掌声一片,而背后依靠的是 C++ 强大的 constexpr 特性,从而大大提高了编译期计算威力。 早在 C++11 的时候就有 constexpr 特性,那时候约束比较多,只能有一
You should use s.data() not s.begin() for string_view
s.data()
s.begin()
没有 Parser_t 的定义呀
参考https://github.com/netcan/recipes/blob/master/cpp/metaproggramming/parser_combinator/ParserCombinator.hpp#L36
https://netcan.github.io/2020/09/16/C-%E5%85%83%E7%BC%96%E7%A8%8B%E4%B9%8BParser-Combinator/
引子 前不久在 CppCon 上看到一个 Talk:constexpr All the things,这个演讲主题令我非常震撼,在编译期解析 json 字符串,进而提出了编译期构造正则表达式(编译期构建 FSM),现场掌声一片,而背后依靠的是 C++ 强大的 constexpr 特性,从而大大提高了编译期计算威力。 早在 C++11 的时候就有 constexpr 特性,那时候约束比较多,只能有一