boost::urls::grammar::ref

Return a reference to a character set

Synopsis

Declared in <boost/url/grammar/charset.hpp>
template<CharSet CS>
constexpr
/* implementation-defined */
ref(CS const& cs) noexcept
requires is_charset<CS>::value &&
    ! std::is_same<CS,
        implementation_defined::charset_ref<CS> >::value;


Description

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.

Return Value

The character set as a reference type

Template Parameters

Name Description
CharSet The character set type

Parameters

Name Description
cs The character set to use

Created with MrDocs