2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

Use bp::get() instead of Hana literals in example, so as not to break non-Hana

builds.
This commit is contained in:
Zach Laine
2024-02-11 16:54:41 -06:00
parent b6b77bac3c
commit f99ae3b94a

View File

@@ -2833,8 +2833,9 @@ namespace rule_construction_example {
namespace bp = boost::parser;
auto doubles_to_type = [](auto & ctx) {
using namespace bp::literals;
_val(ctx) = type_t(_attr(ctx)[0_c] * _attr(ctx)[1_c]);
_val(ctx) = type_t(
bp::get(_attr(ctx), bp::llong<0>{}) *
bp::get(_attr(ctx), bp::llong<1>{}));
};
bp::rule<struct type_tag, type_t> type = "type";