Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
grammar::ref (1 of 2 overloads)

Return a reference to a rule.

Synopsis

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

template<
    class Rule>
constexpr implementation-defined
ref(
    Rule const& r);
Description

This function returns a rule 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.

Parameters

Name

Description

r

The rule to use

Convenience header <boost/url/grammar.hpp>


PrevUpHomeNext