Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

grammar::unsigned_rule

Match an unsigned decimal.

Synopsis

Defined in header <boost/url/grammar/unsigned_rule.hpp>

template<
    class Unsigned>
struct unsigned_rule
Description

Extra leading zeroes are disallowed.

Value Type
using value_type = Unsigned;
Example

Rules are used with the function parse.

result< unsigned short > rv = parse( "32767", unsigned_rule< unsigned short >{} );
BNF
unsigned      = "0" / ( ["1"..."9"] *DIGIT )
Template Parameters

Type

Description

Unsigned

The unsigned integer type used to store the result.

See Also

grammar::parse.

Convenience header <boost/url/grammar.hpp>


PrevUpHomeNext