mirror of
https://github.com/boostorg/parser.git
synced 2026-01-19 04:22:13 +00:00
add "constexpr" to switch_parser constructor
so switch(predicate)(valA, parserA)(valB, parserB) can result in a constexpr object.
This commit is contained in:
@@ -8525,9 +8525,9 @@ namespace boost { namespace parser {
|
||||
template<typename SwitchValue, typename OrParser>
|
||||
struct switch_parser
|
||||
{
|
||||
switch_parser() {}
|
||||
switch_parser(SwitchValue switch_value) : switch_value_(switch_value) {}
|
||||
switch_parser(SwitchValue switch_value, OrParser or_parser) :
|
||||
constexpr switch_parser() {}
|
||||
constexpr switch_parser(SwitchValue switch_value) : switch_value_(switch_value) {}
|
||||
constexpr switch_parser(SwitchValue switch_value, OrParser or_parser) :
|
||||
switch_value_(switch_value), or_parser_(or_parser)
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user