[#boost-urls-grammar-unsigned_rule]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::unsigned&lowbar;rule
:relfileprefix: ../../../
:mrdocs:

Match an unsigned decimal

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/unsigned_rule.hpp#L52[boost&sol;url&sol;grammar&sol;unsigned&lowbar;rule&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class Unsigned&gt;
struct unsigned&lowbar;rule;
----

== Types

[cols=1]
|===
| Name
| xref:boost/urls/grammar/unsigned_rule/value_type.adoc[`value&lowbar;type`] 
|===

== Member Functions

[cols=1]
|===
| Name
| xref:boost/urls/grammar/unsigned_rule/parse.adoc[`parse`] 
|===

== Description

Extra leading zeroes are disallowed&period;

== Value Type
[,cpp]
----
using value_type = Unsigned;
----
== Example
Rules are used with the function xref:boost/urls/grammar/unsigned_rule/parse.adoc[`parse`]&period;

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

[cols=2]
|===
| Name
| Description
| *Unsigned*
| The unsigned integer type used to store the result&period;
|===

== See Also

xref:boost/urls/grammar/parse-09.adoc[`grammar&colon;&colon;parse`]&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
