Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Alphabetical

Synopsis

template <class Result, class Remaining, class Pos>
struct accept;

This is a template metaprogramming value.

Table 2. Arguments

Name

Type

Result

template metaprogramming value

Remaining

string

Pos

source position


Description

Values representing a successful parser application. It behaves as a lazy template metafunction: when it is evaluated as a metafunction, it returns itself with its arguments evaluated. See expression semantics for further details.

[Note] Note

Note that for backward compatibility when Result::type is not defined, accept<....>::type does not evaluate Result. For example accept<int, BOOST_METAPARSE_STRING("foo"), start>::type is accept<int, BOOST_METAPARSE_STRING("foo")::type, start::type>. Using types that are not template metaprogramming values as Result is deprecated and will not work in future versions of the library.

Expressions semantics

For any r template metaprogramming value, s compile-time string and p source position the following are equivalent:

accept<r, s, p>::type

accept<r, s::type, p::type>

Header

#include <boost/metaparse/accept.hpp>

Operations


PrevUpHomeNext