Boost C++ Libraries 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.
grammar::ref (2 of 2 overloads)

Return a reference to a character set.


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

    class CharSet>
constexpr implementation-defined
    CharSet const& cs);

This function returns a character set which references the specified object. This is used to reduce the number of bytes of storage (sizeof) required by a combinator when it stores a copy of the object.

Ownership of the object is not transferred; the caller is responsible for ensuring the lifetime of the object is extended until it is no longer referenced. For best results, ref should only be used with compile-time constants.

Convenience header <boost/url/grammar.hpp>