Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
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.

system::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