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 version of Boost is under active development. You are currently in the master branch. The current version is 1.91.0.
The type of each element in the list.
using value_type = std::pair< string_view, param_list >;
|
Name |
Description |
|---|---|
|
A constant iterator to the list. |
|
|
The type of each element in the list. |
|
Name |
Description |
|---|---|
|
Return a const iterator to the beginning of the list. |
|
|
Return a const iterator to the beginning of the list. |
|
|
Return a const iterator to the end of the list. |
|
|
Return a const iterator to the end of the list. |
|
|
Default constructor. |
This container allows iteration of the parameter list in an HTTP extension. The parameter list is a series of name/value pairs with each pair starting with a semicolon. The value is optional.
If a parsing error is encountered while iterating the string, the behavior of the container will be as if a string containing only characters up to but excluding the first invalid character was used to construct the list.
param-list = *( OWS ";" OWS param ) param = token OWS [ "=" OWS ( token / quoted- string ) ]
To use this class, construct with the string to be parsed and then use
begin and end, or range-for to iterate each
item:
for ( auto const & param : param_list{ ";level=9;no_context_takeover;bits=15" }) { std::cout << ";" << param.first; if (! param.second.empty()) std::cout << "=" << param.second; std::cout << "\n" ; }
The first element of the pair is the extension token, and the second element of the pair is an iterable container holding the extension's name/value parameters.