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 is the documentation for an old version of Boost. Click here to view this page for the latest version.

The Boost Parameter Library Reference Documentation

Authors: David Abrahams
Daniel Wallin
Contact: dave@boost-consulting.com, daniel@boostpro.com
Organization: BoostPro Computing
Date: 2005-07-17
Copyright: Copyright David Abrahams, Daniel Wallin 2005-2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Boost


Contents


1   Preliminaries

This section covers some basic information you'll need to know in order to understand this reference.

1.1   Namespaces

In this document, all unqualified identifiers should be assumed to be defined in namespace boost::parameter unless otherwise specified.

1.2   Exceptions

No operation described in this document throws an exception unless otherwise specified.

1.3   Thread Safety

All components of this library can be used safely from multiple threads without synchronization.1

1.4   Typography

Names written in sans serif type represent concepts.

In code blocks, italic type represents unspecified text that satisfies the requirements given in the detailed description that follows the code block.

In a specification of the tokens generated by a macro, bold type is used to highlight the position of the expanded macro argument in the result.

The special character β represents the value of BOOST_PARAMETER_MAX_ARITY.


2   Terminology

keyword
The name of a function parameter.
keyword tag type
A type used to uniquely identify a function parameter. Typically its name will be the same as that of the parameter.
positional argument
An argument passed with no explicit keyword. Its parameter is determined in the usual C++ way: by position with respect to a parameter list.
tag type
Shorthand for “keyword tag type.”
keyword object
An instance of keyword <T> for some tag type T.
tagged reference

An object whose type is associated with a keyword tag type (the object's keyword), and that holds a reference (to the object's value).

As a shorthand, a “tagged reference to x” means a tagged reference whose value is x.

tagged default
A tagged reference whose value represents the value of a default argument.
tagged lazy default
A tagged reference whose value, when invoked with no arguments, computes a default argument value.
intended argument type
The intended argument type of a single-element ArgumentPack is the type of its element's value. The intended argument type of any other type X is X itself.

Note

In this reference, we will use concept names (and other names) to describe both types and objects, depending on context. So for example, “an ArgumentPack” can refer to a type that models ArgumentPack or an object of such a type.


3   Concepts

This section describes the generic type concepts used by the Parameter library.

3.1   ArgumentPack

An ArgumentPack is a collection of tagged references to the actual arguments passed to a function. Every ArgumentPack is also a valid MPL Forward Sequence and MPL Associative Sequence consisting of the keyword tag types in its tagged references. If BOOST_PARAMETER_CAN_USE_MP11 is defined, then every ArgumentPack is also a valid Boost.MP11 map whose keys are keyword tag types. The singular.cpp, compose.cpp, and mpl.cpp test programs demonstrate this functionality.

Requirements

In the table below,

Any exceptions thrown from the invocation of w's value will be propagated to the caller.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 210)

Content block expected for the "table" directive; none found.

.. table:: |ArgumentPack| requirements

Expression Type Requirements Semantics/Notes
x[u]
binding<
A, K

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 218)

Definition list ends without a blank line; unexpected unindent.

>::type

x contains an element b whose keyword is K Returns b's value (by reference).
x[u]
binding<
A, L, D

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 223)

Definition list ends without a blank line; unexpected unindent.

>::type

none If x contains an element b whose keyword is the same as u's, returns b's value (by reference). Otherwise, returns u's value.
x[w]
lazy_binding<
A, M, E

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 232)

Definition list ends without a blank line; unexpected unindent.

>::type

none If x contains an element b whose keyword is the same as w's, returns b's value (by reference). Otherwise, invokes w's value and returns the result.
x, z Model of ArgumentPack none Returns an ArgumentPack containing all the elements of both x and z.

3.2   ParameterSpec

A ParameterSpec describes the type requirements for arguments corresponding to a given keyword and indicates whether the argument is optional or required. The table below details the allowed forms and describes their condition for satisfaction by an actual argument type. In each row,

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 265)

Content block expected for the "table" directive; none found.

.. table:: |ParameterSpec| allowed forms and conditions of satisfaction

Type A required Condition A must satisfy
K no n/a
optional<K,F> no mpl::apply2<F,A,P>::type::value is true.
required<K,F> yes mpl::apply2<F,A,P>::type::value is true.

The information in a ParameterSpec is used to limit the arguments that will be matched by forwarding functions.


4   Class Templates

4.1   keyword

The type of every keyword object is a specialization of keyword.

Defined in:boost/parameter/keyword.hpp
template <typename Tag>
struct keyword
{
    typedef Tag tag;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`true_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::in_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , ArgumentPack
    >::type
        operator=(T const& value) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            typename boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::out_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >::type
          , boost::mpl::`if_`_<
                boost::`is_const`_<T>
              , boost::mpl::`false_`_
              , boost::mpl::true_
            >
          , boost::mpl::false_
        >::type
      , ArgumentPack
    >::type
        operator=(T& value) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`false_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::in_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , ArgumentPack
    >::type
        operator=(T const&& value) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`false_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::consume_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , ArgumentPack
    >::type
        operator=(T&& value) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`true_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::in_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , tagged default
    >::type
        operator|(T const& x) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            typename boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::out_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >::type
          , boost::mpl::`if_`_<
                boost::`is_const`_<T>
              , boost::mpl::`false_`_
              , boost::mpl::true_
            >
          , boost::mpl::false_
        >::type
      , tagged default
    >::type
        operator|(T& x) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`true_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::in_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , tagged default
    >::type
        operator|(T const&& x) const;

    template <typename T>
    constexpr typename boost::`enable_if`_<
        typename boost::mpl::`eval_if_`_<
            boost::`is_scalar`_<T>
          , boost::mpl::`false_`_
          , boost::mpl::`eval_if_`_<
                boost::`is_same`_<
                    typename Tag::qualifier
                  , boost::parameter::consume_reference
                >
              , boost::mpl::`true_`_
              , boost::mpl::`if_`_<
                    boost::`is_same`_<
                        typename Tag::qualifier
                      , boost::parameter::forward_reference
                    >
                  , boost::mpl::`true_`_
                  , boost::mpl::false_
                >
            >
        >::type
      , tagged default
    >::type constexpr
        operator|(T&& value) const;

    template <typename F>
    constexpr tagged lazy default operator||(F const&) const;

    template <typename F>
    constexpr tagged lazy default operator||(F&) const;

    static keyword<Tag> const& instance;

    static keyword<Tag>& get();
};

operator= .. parsed-literal:

template <typename T>
constexpr |ArgumentPack|_ operator=(T const& value) const;

template <typename T>
constexpr |ArgumentPack|_ operator=(T& value) const;

template <typename T>
constexpr |ArgumentPack|_ operator=(T const&& value) const;

template <typename T>
constexpr |ArgumentPack|_ operator=(T&& value) const;
Requires:one of the following:

*. The nested qualifier type of Tag must be forward_reference.

*. To use the const lvalue reference overload, T must be scalar, or the nested qualifier type of Tag must be in_reference.

*. To use the mutable lvalue reference overload, the nested qualifier type of Tag must be out_reference or in_out_reference, and T must not be const-qualified.

*. To use the const rvalue reference overload for non-scalar T, the nested qualifier type of Tag must be in_reference.

*. To use the mutable rvalue reference overload for non-scalar T, the nested qualifier type of Tag must be consume_reference or move_from_reference.

Returns:an ArgumentPack containing a single tagged reference to

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 576)

Field list ends without a blank line; unexpected unindent.

value with keyword Tag

operator| .. parsed-literal:

template <typename T>
constexpr *tagged default* operator|(T const& x) const;

template <typename T>
constexpr *tagged default* operator|(T& x) const;

template <typename T>
constexpr *tagged default* operator|(T const&& x) const;

template <typename T>
constexpr *tagged default* operator|(T&& x) const;
Requires:one of the following:

*. The nested qualifier type of Tag must be forward_reference.

*. To use the const lvalue reference overload, T must be scalar, or the nested qualifier type of Tag must be in_reference.

*. To use the mutable lvalue reference overload, the nested qualifier type of Tag must be out_reference or in_out_reference, and T must not be const-qualified.

*. To use the const rvalue reference overload for non-scalar T, the nested qualifier type of Tag must be in_reference.

*. To use the mutable rvalue reference overload for non-scalar T, the nested qualifier type of Tag must be consume_reference or move_from_reference.

Returns:a tagged default with value x and keyword Tag.

operator|| .. parsed-literal:

template <typename F>
constexpr *tagged lazy default* operator||(F const& g) const;

template <typename F>
constexpr *tagged lazy default* operator||(F& g) const;
Requires:g() must be valid, with type boost::result_of

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 627)

Field list ends without a blank line; unexpected unindent.

<F()>::type.2

Returns:a tagged lazy default with value g and keyword Tag.

instance .. parsed-literal:

static keyword<Tag> const& instance;
Returns:a “singleton instance”: the same object will be returned on each

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 639)

Field list ends without a blank line; unexpected unindent.

invocation of instance.

Thread Safety:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 642)

Field list ends without a blank line; unexpected unindent.

instance can be accessed from multiple threads simultaneously.

get .. parsed-literal:

static keyword<Tag>& get\();

Deprecated

This function has been deprecated in favor of instance.

Returns:a “singleton instance”: the same object will be returned on each

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 656)

Field list ends without a blank line; unexpected unindent.

invocation of get().

Thread Safety:get() can be called from multiple threads simultaneously.

4.2   template_keyword

This class template encapsulates a named template parameter. Every type generated by the |BOOST_PARAMETER_TEMPLATE_KEYWORD| macro is a specialization of template_keyword.

Defined in:boost/parameter/template_keyword.hpp
template <typename Tag, typename T>
struct template_keyword
{
    typedef Tag key_type;
    typedef T value_type;
    typedef implementation defined reference;
};

The test/ntp.cpp test program demonstrates proper usage of this class template.

4.3   parameters

Provides an interface for assembling the actual arguments to a forwarding function into an ArgumentPack, in which any positional arguments will be tagged according to the corresponding template argument to parameters.

Defined in:boost/parameter/parameters.hpp
template <typename ...PSpec>
struct parameters
{
    template <typename ...Args>
    struct match
    {
        typedef … type;
    };

    template <typename ...Args>
    ArgumentPack operator()(Args&&... args) const;
};
Requires:Each element in the PSpec parameter pack must be a model of

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 718)

Field list ends without a blank line; unexpected unindent.

ParameterSpec.

Note

In this section, R ## i and K ## i are defined as follows, for any argument type A ## i:

let D0 the set [d0, …, d ## j] of all deduced
parameter specs in the PSpec parameter pack
R ## i is the intended argument type of A ## i

if A ## i is a result type of keyword<T>:: operator=
then
K ## i is T
else
if some A ## j where ji is a result type of
keyword<T>:: operator=
or some P ## j in ji is deduced
then
if some parameter spec d ## j in D ## i
matches A ## i
then
K ## i is the keyword tag type of d ## j.
Di+1 is D ## i - [ d ## j]
else
K ## i is the keyword tag type of P ## i.
match
A |Metafunction|_ used to remove a forwarding function from overload resolution.
Returns:if all elements in Params... are satisfied (see below), then

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 752)

Field list ends without a blank line; unexpected unindent.

parameters<Params...>. Otherwise, match<Args...>::type is not defined.

Each element P in Params... is satisfied if either:

  • P is the unspecified default

  • or, P is a keyword tag type

  • or, P is optional <X,F> and either
    • X is not K ## i for any i,

    • or X is some K ## i and mpl::apply<F,R ## i

      >::type::value is true

  • or, P is required <X,F>, and
    • X is some K ## i, and
    • mpl::apply<F,R ## i >::type::value is true

operator()

template <typename ...Args>
ArgumentPack operator()(Args&&... args) const;
Returns:

An ArgumentPack containing, for each a ## i,

  • if a ## i is a single-element ArgumentPack, its element

  • Otherwise, a tagged reference with keyword K ## i and value

    a ## i

4.4   optional, required

These templates describe the requirements on a function parameter.

optional is defined in: boost/parameter/optional.hpp

required is defined in: boost/parameter/required.hpp

Both headers are included by: boost/parameter/preprocessor.hpp

Specializations model:
 ParameterSpec
template <typename Tag, typename Predicate = unspecified>
struct optional;

template <typename Tag, typename Predicate = unspecified>
struct required;

The default value of Predicate is an unspecified MPL Binary Metafunction Class that returns mpl::true_ for any argument. If BOOST_PARAMETER_CAN_USE_MP11 is defined, then the default value of Predicate is also a Boost.MP11-style quoted metafunction that returns mp11::mp_true for any argument.

4.5   deduced

This template is used to wrap the keyword tag argument to optional or required.

Defined in:boost/parameter/deduced.hpp
Included by:boost/parameter/preprocessor.hpp

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 836)

Duplicate substitution definition name: "preprocessor_header".
template <typename Tag>
struct deduced;
Requires:nothing

5   Metafunctions

A |Metafunction|_ is conceptually a function that operates on, and returns, C++ types.

5.1   binding

Returns the result type of indexing an argument pack with a keyword tag type or with a tagged default.

Defined in:boost/parameter/binding.hpp
template <typename A, typename K, typename D = void_>
struct binding
{
    typedef … type;
};
Requires:A must be a model of ArgumentPack.
Returns:the reference type of the tagged reference in A having

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 875)

Field list ends without a blank line; unexpected unindent.

keyword tag type K, if any. If no such tagged reference exists, returns D.

5.2   lazy_binding

Returns the result type of indexing an argument pack with a tagged lazy default.

Defined in:boost/parameter/binding.hpp
template <typename A, typename K, typename F>
struct lazy_binding
{
    typedef … type;
};
Requires:A must be a model of ArgumentPack.
Returns:the reference type of the tagged reference in A having

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 899)

Field list ends without a blank line; unexpected unindent.

keyword tag type K, if any. If no such tagged reference exists, returns boost::result_of<F()>::type.2

5.3   value_type

Returns the result type of indexing an argument pack with a keyword tag type or with a tagged default.

Defined in:boost/parameter/value_type.hpp
template <typename A, typename K, typename D = void_>
struct value_type
{
    typedef … type;
};
Requires:A must be a model of ArgumentPack.
Returns:the (possibly const-qualified) type of the tagged reference in

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 923)

Field list ends without a blank line; unexpected unindent.

A having keyword tag type K, if any. If no such tagged reference exists, returns D. Equivalent to:

typename boost::`remove_reference`_<
    typename |binding|_<A, K, D>::type
>::type

… when D is not a reference type.

5.4   lazy_value_type

Returns the result type of indexing an argument pack with a tagged lazy default.

Defined in:boost/parameter/value_type.hpp
template <typename A, typename K, typename F>
struct lazy_value_type
{
    typedef … type;
};
Requires:A must be a model of ArgumentPack.
Returns:the (possibly const-qualified) type of the tagged reference in

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 955)

Field list ends without a blank line; unexpected unindent.

A having keyword tag type K, if any. If no such tagged reference exists, returns boost::result_of<F()>::type.2

5.5   are_tagged_arguments

Defined in:boost/parameter/are_tagged_arguments.hpp
template <typename T0, typename ...Pack>
struct are_tagged_arguments  // : mpl::true_ or mpl::false_
{
};
Returns:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 973)

Field list ends without a blank line; unexpected unindent.

mpl::true_ if T0 and all elements in parameter pack Pack are tagged reference types, mpl::false_ otherwise.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 977)

Field list ends without a blank line; unexpected unindent.

When implementing a Boost.Parameter-enabled constructor for a container that conforms to the C++ standard, one needs to remember that the standard requires the presence of other constructors that are typically defined as templates, such as range constructors. To avoid overload ambiguities between the two constructors, use this metafunction in conjunction with disable_if to define the range constructor.

template <typename B>
class frontend : public B
{
    struct _enabler
    {
    };

 public:
    |BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|_(frontend, (B))

    template <typename Iterator>
    frontend(
        Iterator itr
      , Iterator itr_end
      , typename boost::`disable_if`_<
            are_tagged_arguments<Iterator>
          , _enabler
        >::type = _enabler()
    ) : B(itr, itr_end)
    {
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 984); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 984); backlink

Inline interpreted text or phrase reference start-string without end-string.

5.6   is_argument_pack

Defined in:boost/parameter/is_argument_pack.hpp
template <typename T>
struct is_argument_pack  // : mpl::true_ or mpl::false_
{
};
Returns:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1026)

Field list ends without a blank line; unexpected unindent.

mpl::true_ if T is a model of ArgumentPack, mpl::false_ otherwise.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1030)

Field list ends without a blank line; unexpected unindent.

To avoid overload ambiguities between a constructor that takes in an ArgumentPack and a templated conversion constructor, use this metafunction in conjunction with enable_if.

|BOOST_PARAMETER_NAME|_(a0)

template <typename T>
class backend0
{
    struct _enabler
    {
    };

    T a0;

 public:
    template <typename ArgPack>
    explicit backend0(
        ArgPack const& args
      , typename boost::`enable_if`_<
            is_argument_pack<ArgPack>
          , _enabler
        >::type = _enabler()
    ) : a0(args[_a0])
    {
    }

    template <typename U>
    backend0(
        backend0<U> const& copy
      , typename boost::`enable_if`_<
            boost::`is_convertible`_<U,T>
          , _enabler
        >::type = _enabler()
    ) : a0(copy.get_a0())
    {
    }

    T const& get_a0() const
    {
        return this->a0;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1034); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1034); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1034); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1034); backlink

Inline interpreted text or phrase reference start-string without end-string.

5.7   result_of::compose

Returns the result type of the |compose|_ function.

Defined in:boost/parameter/compose.hpp
template <typename ...TaggedArgs>
struct compose
  : boost::`enable_if`_<
        |are_tagged_arguments|_<T0,Pack...>
      , |ArgumentPack|_
    >
{
};

template <>
struct compose<>
{
    typedef empty ArgumentPack type;
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1087); backlink

Inline interpreted text or phrase reference start-string without end-string.
Requires:All elements in TaggedArgs must be tagged reference types, if

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1105)

Field list ends without a blank line; unexpected unindent.

specified.

Returns:the result type of the |compose|_ function.

6   Function Templates

6.1   compose

Defined in:boost/parameter/compose.hpp
template <typename ...Pack>
constexpr typename |result_of::compose|_<Pack...>::type
    compose(Pack const&... args);

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1121); backlink

Inline substitution_reference start-string without end-string.

This function facilitates easier variadic argument composition. It is used by the |BOOST_PARAMETER_NO_SPEC_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR|, |BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR|, |BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|, and |BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR| code generation macros. You can use it to write your own code generation macros if the ones provided by this library do not suffice.

Unlike the tagged reference comma operator, the compose() function is variadic, as mentioned before. However, the tagged reference comma operator can be invoked indefinitely and therefore does not limit the size of the resulting ArgumentPack, while the compose() function cannot take in more than |BOOST_PARAMETER_COMPOSE_MAX_ARITY| arguments for compilers that do not support perfect forwarding.

Requires:All elements in args must be tagged reference objects, if

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1146)

Field list ends without a blank line; unexpected unindent.

specified.

Returns:an ArgumentPack containing all elements in args, if

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1149)

Field list ends without a blank line; unexpected unindent.

specified; an empty ArgumentPack otherwise.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1152)

Field list ends without a blank line; unexpected unindent.
BOOST_PARAMETER_NAME(index)
BOOST_PARAMETER_NAME(name)

template <typename ArgumentPack>
int print_name_and_index(ArgumentPack const& args)
{
    std::cout << "index = " << args[_index];
    std::cout << "name = " << args[_name];
    std::cout << "; " << std::endl;
    return 0;
}

int y = print_name_and_index(compose(_index = 3, _name = "jones"));

The compose.cpp test program shows more examples using this function.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1170)

Duplicate substitution definition name: "compose_cpp".

7   Code Generation Macros

Macros in this section can be used to ease the writing of code using the Parameter library by eliminating repetitive boilerplate.

7.1   BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1192)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1195); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1228); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1228); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1228); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1228); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1272); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1272); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1272); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1272); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. Also, just as with a normal function, optional parameters have default values, whereas required parameters do not. Within the function body, either simply use the parameter name or pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument. Note that the second method doesn't require std::forward to preserve value categories.

BOOST_PARAMETER_FUNCTION((bool), evaluate, kw,
    (deduced
        (required
            (lrc, (std::`bitset`_<1>))
            (lr, (std::`bitset`_<2>))
        )
        (optional
            (rrc, (std::`bitset`_<3>), rvalue_const_bitset<2>())
            (rr, (std::`bitset`_<4>), rvalue_bitset<3>())
        )
    )
)
{
    BOOST_TEST_EQ(
        passed_by_lvalue_reference_to_const
      , U::evaluate_category<0>(lrc)
    );
    BOOST_TEST_EQ(
        passed_by_lvalue_reference
      , U::evaluate_category<1>(lr)
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference_to_const
      , U::evaluate_category<2>(std::`forward`_<rrc0_type>(rrc0))
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference
      , U::evaluate_category<3>(args[_rr0])
    );

    return true;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1291); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1291); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1291); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1291); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1291); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp, preprocessor_deduced.cpp, and preprocessor_eval_category.cpp test programs demonstrate proper usage of this macro.

Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1385)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1394)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            optional-specifier {optional-specifier}
        ')'
    ) | (
        '(' 'required'
            required-specifier {required-specifier}
        ')'
    )

optional-specifier ::=
    '('
        argument-name ',' restriction ',' default-value
    ')'

required-specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. default-value is any valid C++ expression; if necessary, user code can compute it in terms of previous-name ## _type, where previous-name is the argument-name in a previous specifier-group0 or specifier-group1. This expression will be invoked exactly once. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type. If restriction uses this form, then the type of the generated name argument-name ## _type will be computed in terms of the target type, and the generated reference argument-name (but not its corresponding entry in args) will be cast to that type.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## name
    boost_param_parameters_ ## __LINE__ ## name;

template <typename Args>
typename boost_param_result_ ## __LINE__ ## name<Args>::type
    boost_param_impl ## __LINE__ ## name(Args const&);

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **m**>(a ## **m**)
        )
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_0boost_ ## __LINE__ ## **name**(
        (ResultType(*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **m**
    );

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_0boost_ ## __LINE__ ## name(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    );

template <typename Args>
typename boost_param_result_ ## __LINE__ ## name<Args>::type
    boost_param_impl ## __LINE__ ## name(Args const& args)
{
    return boost_param_dispatch_0boost_ ## __LINE__ ## name(
        static_cast<
            typename boost_param_result_ ## __LINE__ ## name<
                Args
            >::type(*)()
        >(nullptr)
      , args
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **0**
            >::type
        >(args[ *keyword object of required parameter* ## **0**])
      , …
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **n**
            >::type
        >(args[ *keyword object of required parameter* ## **n**])
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **n**
    )
{
    return boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
        static_cast<ResultType(\*)()>(`nullptr`_)
      , (args, keyword object of optional parameter ## n + 1 =
            default value of optional parameter ## n + 1
        )
      , std::forward`_<*argument name* ## **0** ## _type>(
            *argument name* ## **0**
        )
      , …
      , std::`forward`_<*argument name* ## **n** ## _type>(
            *argument name* ## **n**
        )
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of optional parameter* ## **n + 1**
            >::type
        >(*default value of optional parameter* ## **n + 1**)
    );
}

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_0boost_ ## __LINE__ ## name(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    )

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1459); backlink

Inline substitution_reference start-string without end-string.

7.2   BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_namespace, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a member function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1663)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1666); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1699); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1699); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1699); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1699); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1743); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1743); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1743); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1743); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal static member function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. Also, just as with a normal function, optional parameters have default values, whereas required parameters do not. Within the function body, either simply use the parameter name or pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument. Note that the second method doesn't require std::forward to preserve value categories.

struct B
{
    BOOST_PARAMETER_MEMBER_FUNCTION((bool), static evaluate, kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>), rvalue_const_bitset<2>())
                (rr, (std::`bitset`_<4>), rvalue_bitset<3>())
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(lrc)
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(lr)
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(std::`forward`_<rrc0_type>(rrc0))
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(args[_rr0])
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1762); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1762); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1762); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1762); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1762); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B::evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
B::evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
B::evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
B::evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
B::evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

B::evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
B::evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp and preprocessor_eval_category.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1851)

Duplicate substitution definition name: "preprocessor".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1853)

Duplicate substitution definition name: "preprocessor_eval_cat".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1857)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. name may be qualified by the static keyword to declare the member function and its helpers as not associated with any object of the enclosing type. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1868)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            optional-specifier {optional-specifier}
        ')'
    ) | (
        '(' 'required'
            required-specifier {required-specifier}
        ')'
    )

optional-specifier ::=
    '('
        argument-name ',' restriction ',' default-value
    ')'

required-specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. default-value is any valid C++ expression; if necessary, user code can compute it in terms of previous-name ## _type, where previous-name is the argument-name in a previous specifier-group0 or specifier-group1. This expression will be invoked exactly once. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type. If restriction uses this form, then the type of the generated name argument-name ## _type will be computed in terms of the target type, and the generated reference argument-name (but not its corresponding entry in args) will be cast to that type.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## name
    boost_param_parameters_ ## __LINE__ ## name;

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return this->boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return this->boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **m**>(a ## **m**)
        )
    );
}

template <typename Args>
typename boost_param_result\_ ## __LINE__ ## **name**\ <Args>::type
    boost_param_impl ## __LINE__ ## **name**\ (Args const& args)
{
    return this->boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
        static_cast<
            typename boost_param_result\_ ## __LINE__ ## **name**\ <
                Args
            >::type(\*)()
        >(`nullptr`_)
      , args
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **0**
            >::type
        >(args[ *keyword object of required parameter* ## **0**])
      , …
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **n**
            >::type
        >(args[ *keyword object of required parameter* ## **n**])
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **n**
    )
{
    return this->boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
        static_cast<ResultType(\*)()>(`nullptr`_)
      , (args, keyword object of optional parameter ## n + 1 =
            default value of optional parameter ## n + 1
        )
      , std::forward`_<*argument name* ## **0** ## _type>(
            *argument name* ## **0**
        )
      , …
      , std::`forward`_<*argument name* ## **n** ## _type>(
            *argument name* ## **n**
        )
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of optional parameter* ## **n + 1**
            >::type
        >(*default value of optional parameter* ## **n + 1**)
    );
}

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_0boost_ ## __LINE__ ## name(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    )

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 1933); backlink

Inline substitution_reference start-string without end-string.

7.3   BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_ns, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a member function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2099)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2102); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2135); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2135); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2135); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2135); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2179); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2179); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2179); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2179); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal const member function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. Also, just as with a normal function, optional parameters have default values, whereas required parameters do not. Within the function body, either simply use the parameter name or pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument. Note that the second method doesn't require std::forward to preserve value categories.

struct B
{
    B()
    {
    }

    BOOST_PARAMETER_CONST_MEMBER_FUNCTION((bool), evaluate, kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>), rvalue_const_bitset<2>())
                (rr, (std::`bitset`_<4>), rvalue_bitset<3>())
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(lrc)
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(lr)
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(std::`forward`_<rrc0_type>(rrc0))
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(args[_rr0])
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2198); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2198); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2198); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2198); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2198); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B const b = B();
b.evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
b.evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
b.evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
b.evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
b.evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

b.evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
b.evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2291)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2295)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2304)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            optional-specifier {optional-specifier}
        ')'
    ) | (
        '(' 'required'
            required-specifier {required-specifier}
        ')'
    )

optional-specifier ::=
    '('
        argument-name ',' restriction ',' default-value
    ')'

required-specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. default-value is any valid C++ expression; if necessary, user code can compute it in terms of previous-name ## _type, where previous-name is the argument-name in a previous specifier-group0 or specifier-group1. This expression will be invoked exactly once. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type. If restriction uses this form, then the type of the generated name argument-name ## _type will be computed in terms of the target type, and the generated reference argument-name (but not its corresponding entry in args) will be cast to that type.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_const_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_const_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_const_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_const_ ## __LINE__ ## name
    boost_param_parameters_const_ ## __LINE__ ## name;

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_const_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_const_ ## __LINE__ ## name()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## name(
        boost_param_parameters_const_ ## __LINE__ ## name(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_const_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_const_ ## __LINE__ ## name()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## name(
        boost_param_parameters_const_ ## __LINE__ ## name()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **m**>(a ## **m**)
        )
    );
}

template <typename Args>
typename boost_param_result_const\_ ## __LINE__ ## **name**\ <Args>::type
    boost_param_impl_const ## __LINE__ ## **name**\ (Args const& args) const
{
    return this->
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
        static_cast<
            typename boost_param_result_const\_ ## __LINE__ ## **name**\ <
                Args
            >::type(\*)()
        >(`nullptr`_)
      , args
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **0**
            >::type
        >(args[ *keyword object of required parameter* ## **0**])
      , …
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **n**
            >::type
        >(args[ *keyword object of required parameter* ## **n**])
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **n**
    ) const
{
    return this->
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
        static_cast<ResultType(\*)()>(`nullptr`_)
      , (args, keyword object of optional parameter ## n + 1 =
            default value of optional parameter ## n + 1
        )
      , std::forward`_<*argument name* ## **0** ## _type>(
            *argument name* ## **0**
        )
      , …
      , std::`forward`_<*argument name* ## **n** ## _type>(
            *argument name* ## **n**
        )
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of optional parameter* ## **n + 1**
            >::type
        >(*default value of optional parameter* ## **n + 1**)
    );
}

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_const_0boost_ ## __LINE__ ## name(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    ) const

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2369); backlink

Inline substitution_reference start-string without end-string.

7.4   BOOST_PARAMETER_FUNCTION_CALL_OPERATOR(result, tag_namespace, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a function call operator that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2537)

Field list ends without a blank line; unexpected unindent.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is tag by default.

|BOOST_PARAMETER_NAME|_(y)
|BOOST_PARAMETER_NAME|_(z)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2541); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2541); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal function call operator header. Enclose the return type in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. This is especially useful when implementing multiple Boost.Parameter-enabled function call operator overloads.

class char_reader
{
    int index;
    char const* key;

 public:
    explicit char_reader(char const* k) : index(0), key(k)
    {
    }

    BOOST_PARAMETER_FUNCTION_CALL_OPERATOR((void), tag,
        (deduced
            (required
                (y, (int))
                (z, (char const*))
            )
        )
    )
    {
        this->index = y;
        this->key = z;
    }

    |BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
        (deduced
            (required
                (y, (bool))
                (z, (std::`map`_<char const\*,std::`string`_>))
            )
        )
    )
    {
        return y ? (
            (z.find(this->key)->second)[this->index]
        ) : this->key[this->index];
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2553); backlink

Inline substitution_reference start-string without end-string.

As with regular argument-dependent lookup, the value types of the arguments passed in determine which function call operator overload gets invoked.

char const* keys[] = {"foo", "bar", "baz"};
std::`map`_<char const\*,std::`string`_> k2s;
k2s[keys[0]] = std::`string`_("qux");
k2s[keys[1]] = std::`string`_("wmb");
k2s[keys[2]] = std::`string`_("zxc");
char_reader r(keys[0]);

// positional arguments
BOOST_TEST_EQ('q', (r(true, k2s)));
BOOST_TEST_EQ('f', (r(false, k2s)));

// named arguments
r(_z = keys[1], _y = 1);
BOOST_TEST_EQ('m', (r(_z = k2s, _y = true)));
BOOST_TEST_EQ('a', (r(_z = k2s, _y = false)));

// deduced arguments
r(keys[2], 2);
BOOST_TEST_EQ('c', (r(k2s, true)));
BOOST_TEST_EQ('z', (r(k2s, false)));

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2596); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2596); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2596); backlink

Inline interpreted text or phrase reference start-string without end-string.

The preprocessor.cpp and preprocessor_deduced.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2624)

Duplicate substitution definition name: "preprocessor".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2626)

Duplicate substitution definition name: "preprocessor_deduced".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2630)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator. *. tag_namespace is the namespace in which the keywords used by the function call operator resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2637)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            optional-specifier {optional-specifier}
        ')'
    ) | (
        '(' 'required'
            required-specifier {required-specifier}
        ')'
    )

optional-specifier ::=
    '('
        argument-name ',' restriction ',' default-value
    ')'

required-specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. default-value is any valid C++ expression; if necessary, user code can compute it in terms of previous-name ## _type, where previous-name is the argument-name in a previous specifier-group0 or specifier-group1. This expression will be invoked exactly once. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type. If restriction uses this form, then the type of the generated name argument-name ## _type will be computed in terms of the target type, and the generated reference argument-name (but not its corresponding entry in args) will be cast to that type.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## operator = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## operator
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## operator
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## operator
    boost_param_parameters_ ## __LINE__ ## operator;

template <typename A0, …, typename A ## n>
result operator()(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## operator::match<
        A0, …, A ## n
    >::type = boost_param_parameters_ ## __LINE__ ## operator()
)
{
    return this->boost_param_impl ## __LINE__ ## operator(
        boost_param_parameters_ ## __LINE__ ## operator()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result operator()(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## operator::match<
        A0, …, A ## m
    >::type = boost_param_parameters_ ## __LINE__ ## operator()
)
{
    return this->boost_param_impl ## __LINE__ ## operator(
        boost_param_parameters_ ## __LINE__ ## operator()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **m**>(a ## **m**)
        )
    );
}

template <typename Args>
typename boost_param_result\_ ## __LINE__ ## operator<Args>::type
    boost_param_impl ## __LINE__ ## operator(Args const& args)
{
    return this->boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
        static_cast<
            typename boost_param_result\_ ## __LINE__ ## operator<
                Args
            >::type(\*)()
        >(`nullptr`_)
      , args
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **0**
            >::type
        >(args[ *keyword object of required parameter* ## **0**])
      , …
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **n**
            >::type
        >(args[ *keyword object of required parameter* ## **n**])
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
        (ResultType(\*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **n**
    )
{
    return this->boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
        static_cast<ResultType(\*)()>(`nullptr`_)
      , (args, keyword object of optional parameter ## n + 1 =
            default value of optional parameter ## n + 1
        )
      , std::forward`_<*argument name* ## **0** ## _type>(
            *argument name* ## **0**
        )
      , …
      , std::`forward`_<*argument name* ## **n** ## _type>(
            *argument name* ## **n**
        )
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of optional parameter* ## **n + 1**
            >::type
        >(*default value of optional parameter* ## **n + 1**)
    );
}

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_0boost_ ## __LINE__ ## operator(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    )

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2702); backlink

Inline substitution_reference start-string without end-string.

7.5   BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a function call operator that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2868)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2871); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2904); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2904); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2904); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2904); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2948); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2948); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2948); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2948); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal const function call operator header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. Also, just as with a normal function, optional parameters have default values, whereas required parameters do not. Within the function body, either simply use the parameter name or pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument. Note that the second method doesn't require std::forward to preserve value categories.

struct B
{
    B()
    {
    }

    BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR((bool), kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>), rvalue_const_bitset<2>())
                (rr, (std::`bitset`_<4>), rvalue_bitset<3>())
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(lrc)
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(lr)
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(std::`forward`_<rrc0_type>(rrc0))
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(args[_rr0])
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2967); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2967); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2967); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2967); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 2967); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B const b = B();
b(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
b(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
b((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
b(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
b(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

b(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
b(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp, preprocessor_deduced.cpp, and preprocessor_eval_cat_8.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3062)

Duplicate substitution definition name: "preprocessor".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3064)

Duplicate substitution definition name: "preprocessor_deduced".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3070)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator. *. tag_namespace is the namespace in which the keywords used by the function call operator resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3077)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            optional-specifier {optional-specifier}
        ')'
    ) | (
        '(' 'required'
            required-specifier {required-specifier}
        ')'
    )

optional-specifier ::=
    '('
        argument-name ',' restriction ',' default-value
    ')'

required-specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. default-value is any valid C++ expression; if necessary, user code can compute it in terms of previous-name ## _type, where previous-name is the argument-name in a previous specifier-group0 or specifier-group1. This expression will be invoked exactly once. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type. If restriction uses this form, then the type of the generated name argument-name ## _type will be computed in terms of the target type, and the generated reference argument-name (but not its corresponding entry in args) will be cast to that type.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_const_ ## __LINE__ ## operator = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_const_ ## __LINE__ ## operator
{
    typedef result type;
};

struct boost_param_params_const_ ## __LINE__ ## operator
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_const_ ## __LINE__ ## operator
    boost_param_parameters_const_ ## __LINE__ ## operator;

template <typename A0, …, typename A ## n>
result operator()(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_const_ ## __LINE__ ## operator
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_const_ ## __LINE__ ## operator()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## operator(
        boost_param_parameters_const_ ## __LINE__ ## operator()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result operator()(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_const_ ## __LINE__ ## operator
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_const_ ## __LINE__ ## operator()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## operator(
        boost_param_parameters_const_ ## __LINE__ ## operator()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **m**>(a ## **m**)
        )
    );
}

template <typename Args>
typename boost_param_result_const\_ ## __LINE__ ## operator<Args>::type
    boost_param_impl_const ## __LINE__ ## operator(Args const& args) const
{
    return this->
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
        static_cast<
            typename boost_param_result_const\_ ## __LINE__ ## operator<
                Args
            >::type(\*)()
        >(`nullptr`_)
      , args
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **0**
            >::type
        >(args[ *keyword object of required parameter* ## **0**])
      , …
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of required parameter* ## **n**
            >::type
        >(args[ *keyword object of required parameter* ## **n**])
    );
}

template <
    typename ResultType
  , typename Args
  , typename *argument name* ## **0** ## _type
  , …
  , typename *argument name* ## **n** ## _type
>
ResultType
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
        (ResultType(\*)())
      , Args const& args
      , *argument name* ## **0** ## _type&& *argument name* ## **0**
      , …
      , *argument name* ## **n** ## _type&& *argument name* ## **n**
    ) const
{
    return this->
    boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
        static_cast<ResultType(\*)()>(`nullptr`_)
      , (args, keyword object of optional parameter ## n + 1 =
            default value of optional parameter ## n + 1
        )
      , std::forward`_<*argument name* ## **0** ## _type>(
            *argument name* ## **0**
        )
      , …
      , std::`forward`_<*argument name* ## **n** ## _type>(
            *argument name* ## **n**
        )
      , std::`forward`_<
            typename |value_type|_<
                Args
              , *keyword tag type of optional parameter* ## **n + 1**
            >::type
        >(*default value of optional parameter* ## **n + 1**)
    );
}

:vellipsis:`⋮

template <
    typename ResultType
  , typename Args
  , typename argument name ## 0 ## _type
  , …
  , typename argument name ## m ## _type
>
ResultType
    boost_param_dispatch_const_0boost_ ## __LINE__ ## operator(
        (ResultType(*)())
      , Args const& args
      , argument name ## 0 ## _type&& argument name ## 0
      , …
      , argument name ## m ## _type&& argument name ## m
    ) const

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3142); backlink

Inline substitution_reference start-string without end-string.

7.6   BOOST_PARAMETER_CONSTRUCTOR(cls, impl, tag_namespace, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a constructor that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3310)

Field list ends without a blank line; unexpected unindent.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is tag by default.

|BOOST_PARAMETER_NAME|_(y)
|BOOST_PARAMETER_NAME|_(z)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3314); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3314); backlink

Inline substitution_reference start-string without end-string.

In the base class, implement a delegate constructor template that takes in an ArgumentPack. You must pass the identifiers with leading underscores to args in order to extract the corresponding arguments.

class char_read_base
{
    int index;
    char const* key;

 public:
    template <typename Args>
    explicit char_read_base(Args const& args)
      : index(args[_y]), key(args[_z])
    {
    }

    |BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
        (deduced
            (required
                (y, (bool))
                (z, (std::`map`_<char const\*,std::`string`_>))
            )
        )
    )
    {
        return y ? (
            (z.find(this->key)->second)[this->index]
        ) : this->key[this->index];
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3323); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal constructor definition. Note the lack of an explicit body. Enclose the base type in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause.

struct char_reader : public char_read_base
{
    BOOST_PARAMETER_CONSTRUCTOR(char_reader, (char_read_base), tag,
        (deduced
            (required
                (y, (int))
                (z, (char const*))
            )
        )
    )
};

The following char_reader constructor calls are legal.

char const* keys[] = {"foo", "bar", "baz"};
std::`map`_<char const\*,std::`string`_> k2s;
k2s[keys[0]] = std::`string`_("qux");
k2s[keys[1]] = std::`string`_("wmb");
k2s[keys[2]] = std::`string`_("zxc");

// positional arguments
char_reader r0(0, keys[0]);
BOOST_TEST_EQ('q', (r0(true, k2s)));
BOOST_TEST_EQ('f', (r0(false, k2s)));

// named arguments
char_reader r1(_z = keys[1], _y = 1);
BOOST_TEST_EQ('m', (r1(_z = k2s, _y = true)));
BOOST_TEST_EQ('a', (r1(_z = k2s, _y = false)));

// deduced arguments
char_reader r2(keys[2], 2);
BOOST_TEST_EQ('c', (r2(k2s, true)));
BOOST_TEST_EQ('z', (r2(k2s, false)));

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3374); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3374); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3374); backlink

Inline interpreted text or phrase reference start-string without end-string.

The preprocessor.cpp and preprocessor_deduced.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3402)

Duplicate substitution definition name: "preprocessor".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3404)

Duplicate substitution definition name: "preprocessor_deduced".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3406)

Duplicate substitution definition name: "preprocessor_eval_cat".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3410)

Field list ends without a blank line; unexpected unindent.

*. cls is the name of the enclosing class. *. impl is the parenthesized implementation base class for cls. *. tag_namespace is the namespace in which the keywords used by the constructor resides. *. arguments is a list of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3417)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the delegate constructor in impl to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
struct boost_param_params_ ## __LINE__ ## ctor
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## ctor
    constructor_parameters ## __LINE__;

template <typename A0, …, typename A ## n>
cls(A0&& a0, …, A ## n && a ## n)
  : impl(
        constructor_parameters ## __LINE__(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    )
{
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
cls(A0&& a0, …, A ## m && a ## m)
  : impl(
        constructor_parameters ## __LINE__(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    )
{
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3473); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3473); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3473); backlink

Inline interpreted text or phrase reference start-string without end-string.

7.7   BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3524)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3527); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3560); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3560); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3560); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3560); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3604); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3604); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3604); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3604); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. However, unlike a normal function, default values must be specified within the function body. Also within the function body, you must pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument, but at least this doesn't require std::forward to preserve value categories.

BOOST_PARAMETER_BASIC_FUNCTION((bool), evaluate, kw,
    (deduced
        (required
            (lrc, (std::`bitset`_<1>))
            (lr, (std::`bitset`_<2>))
        )
        (optional
            (rrc, (std::`bitset`_<3>))
            (rr, (std::`bitset`_<4>))
        )
    )
)
{
    BOOST_TEST_EQ(
        passed_by_lvalue_reference_to_const
      , U::evaluate_category<0>(args[_lrc])
    );
    BOOST_TEST_EQ(
        passed_by_lvalue_reference
      , U::evaluate_category<1>(args[_lr])
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference_to_const
      , U::evaluate_category<2>(
            args[_rrc0 | rvalue_const_bitset<2>()]
        )
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference
      , U::evaluate_category<3>(args[_rr0 | rvalue_bitset<3>()])
    );

    return true;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3623); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3623); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3623); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3623); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3710)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3714)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3723)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the function body to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## name
    boost_param_parameters_ ## __LINE__ ## name;

template <typename Args>
typename boost_param_result_ ## __LINE__ ## name<Args>::type
    boost_param_impl ## name(Args const&);

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return boost_param_impl ## __LINE__ ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    );
}

template <typename Args>
typename boost_param_result_ ## __LINE__ ## name<Args>::type
    boost_param_impl ## __LINE__ ## name(Args const& args)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3778); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3778); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3778); backlink

Inline interpreted text or phrase reference start-string without end-string.

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.8   BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_ns, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a member function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3872)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3875); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3908); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3908); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3908); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3908); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3952); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3952); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3952); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3952); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal static member function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. However, unlike a normal function, default values must be specified within the function body. Also within the function body, you must pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument, but at least this doesn't require std::forward to preserve value categories.

struct B
{
    BOOST_PARAMETER_BASIC_MEMBER_FUNCTION((bool), static evaluate, kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>))
                (rr, (std::`bitset`_<4>))
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc0 | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr0 | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3971); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3971); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3971); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 3971); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B::evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
B::evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
B::evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
B::evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
B::evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

B::evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
B::evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 4064)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4068)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. name may be qualified by the static keyword to declare the member function and its helpers as not associated with any object of the enclosing type. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4079)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the function body to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## name
    boost_param_parameters_ ## __LINE__ ## name;

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return this->boost_param_impl ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_ ## __LINE__ ## name()
)
{
    return this->boost_param_impl ## name(
        boost_param_parameters_ ## __LINE__ ## name()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    );
}

template <typename Args>
typename boost_param_result_ ## __LINE__ ## name<Args>::type
    boost_param_impl ## name(Args const& args)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4134); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4134); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4134); backlink

Inline interpreted text or phrase reference start-string without end-string.

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.9   BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(result, name, tag_ns, args)

Defined in:boost/parameter/preprocessor.hpp

Generates a member function that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4224)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4227); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4260); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4260); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4260); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4260); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4304); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4304); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4304); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4304); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal const member function header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. However, unlike a normal function, default values must be specified within the function body. Also within the function body, you must pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument, but at least this doesn't require std::forward to preserve value categories.

struct B
{
    B()
    {
    }

    BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION((bool), evaluate, kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>))
                (rr, (std::`bitset`_<4>))
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc0 | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr0 | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4323); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4323); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4323); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4323); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B const b = B();
b.evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
b.evaluate(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
b.evaluate((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
b.evaluate(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
b.evaluate(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

b.evaluate(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
b.evaluate(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 4421)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4425)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated forwarding functions. *. tag_namespace is the namespace in which the keywords used by the function resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4434)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the function body to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_const_ ## __LINE__ ## name = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_const_ ## __LINE__ ## name
{
    typedef result type;
};

struct boost_param_params_const_ ## __LINE__ ## name
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_const_ ## __LINE__ ## name
    boost_param_parameters_const_ ## __LINE__ ## name;

template <typename A0, …, typename A ## n>
result name(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_const_ ## __LINE__ ## name
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_const_ ## __LINE__ ## name()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## name(
        boost_param_parameters_const_ ## __LINE__ ## name()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result name(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_const_ ## __LINE__ ## name
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_const_ ## __LINE__ ## name()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## name(
        boost_param_parameters_const_ ## __LINE__ ## name()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    );
}

template <typename Args>
typename boost_param_result_const_ ## __LINE__ ## name<Args>::type
    boost_param_impl_const ## __LINE__ ## name(Args const& args) const

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4489); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4489); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4489); backlink

Inline interpreted text or phrase reference start-string without end-string.

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.10   BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)

Defined in:boost/parameter/preprocessor.hpp

Generates a function call operator that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4579)

Field list ends without a blank line; unexpected unindent.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is tag by default.

|BOOST_PARAMETER_NAME|_(y)
|BOOST_PARAMETER_NAME|_(z)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4583); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4583); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal function call operator header. Enclose the return type in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. This is especially useful when implementing multiple Boost.Parameter-enabled function call operator overloads.

class char_reader
{
    int index;
    char const* key;

 public:
    explicit char_reader(char const* k) : index(0), key(k)
    {
    }

    BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR((void), tag,
        (deduced
            (required
                (y, (int))
                (z, (char const*))
            )
        )
    )
    {
        this->index = args[_y];
        this->key = args[_z];
    }

    |BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
        (deduced
            (required
                (y, (bool))
                (z, (std::`map`_<char const*,std::`string`_>))
            )
        )
    )
    {
        return args[_y] ? (
            (args[_z].find(this->key)->second)[this->index]
        ) : this->key[this->index];
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4595); backlink

Inline substitution_reference start-string without end-string.

As with regular argument-dependent lookup, the value types of the arguments passed in determine which function call operator overload gets invoked.

char const* keys[] = {"foo", "bar", "baz"};
std::`map`_<char const*,std::`string`_> k2s;
k2s[keys[0]] = std::`string`_("qux");
k2s[keys[1]] = std::`string`_("wmb");
k2s[keys[2]] = std::`string`_("zxc");
char_reader r(keys[0]);

// positional arguments
BOOST_TEST_EQ('q', (r(true, k2s)));
BOOST_TEST_EQ('f', (r(false, k2s)));

// named arguments
r(_z = keys[1], _y = 1);
BOOST_TEST_EQ('m', (r(_z = k2s, _y = true)));
BOOST_TEST_EQ('a', (r(_z = k2s, _y = false)));

// deduced arguments
r(keys[2], 2);
BOOST_TEST_EQ('c', (r(k2s, true)));
BOOST_TEST_EQ('z', (r(k2s, false)));

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4638); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4638); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4638); backlink

Inline interpreted text or phrase reference start-string without end-string.

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 4665)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4669)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator. *. tag_namespace is the namespace in which the keywords used by the function call operator resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4676)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the function body to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_ ## __LINE__ ## operator = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_ ## __LINE__ ## operator
{
    typedef result type;
};

struct boost_param_params_ ## __LINE__ ## operator
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_ ## __LINE__ ## operator
    boost_param_parameters_ ## __LINE__ ## operator;

template <typename A0, …, typename A ## n>
result operator()(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_ ## __LINE__ ## operator::match<
        A0, …, A ## n
    >::type = boost_param_parameters_ ## __LINE__ ## operator()
)
{
    return this->boost_param_impl ## __LINE__ ## operator(
        boost_param_parameters_ ## __LINE__ ## operator()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result operator()(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_ ## __LINE__ ## operator::match<
        A0, …, A ## m
    >::type = boost_param_parameters_ ## __LINE__ ## operator()
)
{
    return this->boost_param_impl ## __LINE__ ## operator(
        boost_param_parameters_ ## __LINE__ ## operator()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    );
}

template <typename Args>
typename boost_param_result_ ## __LINE__ ## operator<Args>::type
    boost_param_impl ## __LINE__ ## operator(Args const& args)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4731); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4731); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4731); backlink

Inline interpreted text or phrase reference start-string without end-string.

Only the ArgumentPack type Args and its object instance args are available for use within the function call operator body.

7.11   BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, args)

Defined in:boost/parameter/preprocessor.hpp

Generates a function call operator that can take in positional arguments, composed arguments, named arguments, and deduced arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4821)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4824); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4857); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4857); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4857); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4857); backlink

Inline interpreted text or phrase reference start-string without end-string.

Define the named parameters that will comprise the argument specification that this macro will use. Ensure that all their tag types are in the same namespace, which is kw in this case. The identifiers with leading underscores can be passed to the bracket operator of args to extract the same argument to which the corresponding named parameter (without underscores) is bound, as will be shown later.

|BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4901); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4901); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4901); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4901); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a normal const function call operator header. Enclose the return type bool in parentheses. For each parameter, also enclose the expected value type in parentheses. Since the value types are mutually exclusive, you can wrap the parameters in a (deduced …) clause. Otherwise, just as with a normal function, the order in which you specify the parameters determines their position. However, unlike a normal function, default values must be specified within the function body. Also within the function body, you must pass the matching identifier with the leading underscore to the bracket operator of args to extract the corresponding argument, but at least this doesn't require std::forward to preserve value categories.

struct B
{
    B()
    {
    }

    BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR((bool), kw,
        (deduced
            (required
                (lrc, (std::`bitset`_<1>))
                (lr, (std::`bitset`_<2>))
            )
            (optional
                (rrc, (std::`bitset`_<3>))
                (rr, (std::`bitset`_<4>))
            )
        )
    )
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc0 | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr0 | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4920); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4920); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4920); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 4920); backlink

Inline interpreted text or phrase reference start-string without end-string.

The following function calls are legal.

B const b = B();
b(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
  , rvalue_bitset<3>()
);
b(  // positional arguments
    lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
);
b((  // composed arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
));
b(  // named arguments
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
b(  // named arguments
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

Because the parameters were wrapped in a (deduced …) clause, the following function calls are also legal.

b(  // deduced arguments
    rvalue_bitset<3>()
  , lvalue_const_bitset<0>()
  , lvalue_bitset<1>()
  , rvalue_const_bitset<2>()
);
b(  // deduced arguments
    lvalue_bitset<1>()
  , lvalue_const_bitset<0>()
);

The preprocessor.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 5017)

Duplicate substitution definition name: "preprocessor".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5021)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator. *. tag_namespace is the namespace in which the keywords used by the function call operator resides. *. arguments is a Boost.Preprocessor sequence of argument-specifiers, as defined below.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5028)

Field list ends without a blank line; unexpected unindent.
argument-specifiers ::= specifier-group0 {specifier-group0}

specifier-group0 ::= specifier-group1 |
    (
        '(' 'deduced'
            specifier-group1 {specifier-group1}
        ')'
    )

specifier-group1 ::=
    (
        '(' 'optional'
            specifier {specifier}
        ')'
    ) | (
        '(' 'required'
            specifier {specifier}
        ')'
    )

specifier ::=
    '(' argument-name ',' restriction ')'

restriction ::=
    ( '*' '(' mfc ')' ) |
    ( '(' type-name ')' ) |
    '*'

*. argument-name is any valid C++ identifier. *. mfc is an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is a Boolean Integral Constant; however, user code cannot compute mfc in terms of previous-name ## _type. *. type-name is either the name of a target type or an MPL Binary Metafunction Class whose first argument will be the type of the corresponding argument-name, whose second argument will be the entire ArgumentPack, and whose return type is the target type.

Note that specifier does not include default-value. It is up to the function body to determine the default value of all optional arguments.

Approximate expansion: Where:

  • n denotes the minimum arity, as determined from arguments.
  • m denotes the maximum arity, as determined from arguments.
// If result is a template instantiation of enable_if, enable_if_c,
// lazy_enable_if, lazy_enable_if_c, disable_if, disable_if_c,
// lazy_disable_if, lazy_disable_if_c, or std_enable_if:
template <typename Args>
using boost_param_result_const_ ## __LINE__ ## operator = result;

// If result is a simple return type:
template <typename Args>
struct boost_param_result_const_ ## __LINE__ ## operator
{
    typedef result type;
};

struct boost_param_params_const_ ## __LINE__ ## operator
  : |parameters|_<
        list of parameter specifications, based on arguments
    >
{
};

typedef boost_param_params_const_ ## __LINE__ ## operator
    boost_param_parameters_const_ ## __LINE__ ## operator;

template <typename A0, …, typename A ## n>
result operator()(
    A0&& a0, …, A ## n&& a ## n
  , typename boost_param_parameters_const_ ## __LINE__ ## operator
    ::match<A0, …, A ## n>::type
    = boost_param_parameters_const_ ## __LINE__ ## operator()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## operator(
        boost_param_parameters_const_ ## __LINE__ ## operator()(
            std::forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## **n**>(a ## **n**)
        )
    );
}

:vellipsis:`⋮

template <typename A0, …, typename A ## m>
result operator()(
    A0&& a0, …, A ## m&& a ## m
  , typename boost_param_parameters_const_ ## __LINE__ ## operator
    ::match<A0, …, A ## m>::type
    = boost_param_parameters_const_ ## __LINE__ ## operator()
) const
{
    return this->boost_param_impl_const ## __LINE__ ## operator(
        boost_param_parameters_const_ ## __LINE__ ## operator()(
            std::`forward`_<A0>(a0)
          , …
          , std::`forward`_<A ## m>(a ## m)
        )
    );
}

template <typename Args>
typename boost_param_result_const_ ## __LINE__ ## operator<Args>::type
    boost_param_impl_const ## __LINE__ ## operator(Args const& args) const

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5083); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5083); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5083); backlink

Inline interpreted text or phrase reference start-string without end-string.

Only the ArgumentPack type Args and its object instance args are available for use within the function call operator body.

7.12   BOOST_PARAMETER_NO_SPEC_FUNCTION(result, name)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a function that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5172)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5175); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5208); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5208); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5208); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5208); backlink

Inline interpreted text or phrase reference start-string without end-string.

Named parameters are required when invoking the function; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5248); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5248); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5248); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5248); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a variadic function header. Enclose the return type bool in parentheses.

BOOST_PARAMETER_NO_SPEC_FUNCTION((bool), evaluate)
{
    BOOST_TEST_EQ(
        passed_by_lvalue_reference_to_const
      , U::evaluate_category<0>(args[_lrc])
    );
    BOOST_TEST_EQ(
        passed_by_lvalue_reference
      , U::evaluate_category<1>(args[_lr])
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference_to_const
      , U::evaluate_category<2>(
            args[_rrc | rvalue_const_bitset<2>()]
        )
    );
    BOOST_TEST_EQ(
        passed_by_rvalue_reference
      , U::evaluate_category<3>(args[_rr | rvalue_bitset<3>()])
    );

    return true;
}

To invoke the function, bind all its arguments to named parameters.

evaluate(
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
evaluate(
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

The preprocessor_eval_cat_no_spec.cpp test program demonstrates proper usage of this macro.

Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5307)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated implementation function.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5312)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
template <typename TaggedArg0, typename ...TaggedArgs>
using boost_param_no_spec_result\_ ## __LINE__ ## **name** = **result**;

// If **result** is a simple return type:
template <typename TaggedArg0, typename ...TaggedArgs>
struct boost_param_no_spec_result\_ ## __LINE__ ## **name**
{
    typedef **result** type;
};

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
    );

template <typename TaggedArg0, typename ...TaggedArgs>
inline typename boost::`lazy_enable_if`_<
    |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
  , boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
        TaggedArg0
      , TaggedArgs...
    >
>::type
    **name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args)
{
    return boost_param_no_spec_impl ## __LINE__ ## **name**\ (
        static_cast<
            typename
            boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
                TaggedArg0
              , TaggedArgs...
            >::type(\*)()
        >(`nullptr`_)
      , |compose|_(arg0, args...)
    );
}

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
    )

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.13   BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION(result, name)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a member function that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5390)

Field list ends without a blank line; unexpected unindent.

When designing a front-end class template whose back-end is configurable via parameterized inheritance, it can be useful to omit argument specifiers from a named-parameter member function so that the delegate member functions of the back-end classes can enforce their own specifications.

template <typename B>
struct frontend : B
{
    frontend() : B()
    {
    }

    BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION((void), initialize)
    {
        this->initialize_impl(args);
    }
};

Named parameters are required when invoking the member function; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_(a0)
|BOOST_PARAMETER_NAME|_(a1)
|BOOST_PARAMETER_NAME|_(a2)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5413); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5413); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5413); backlink

Inline substitution_reference start-string without end-string.

For this example, each of the back-end class templates requires its own parameter to be present in the argument pack. In practice, such parameters should be optional, with default values.

template <typename T>
class backend0
{
    T a0;

 public:
    backend0() : a0()
    {
    }

    T const& get_a0() const
    {
        return this->a0;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        this->a0 = args[_a0];
    }
};

template <typename B, typename T>
class backend1 : public B
{
    T a1;

 public:
    backend1() : B(), a1()
    {
    }

    T const& get_a1() const
    {
        return this->a1;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        B::initialize_impl(args);
        this->a1 = args[_a1];
    }
};

template <typename B, typename T>
class backend2 : public B
{
    T a2;

 public:
    backend2() : B(), a2()
    {
    }

    T const& get_a2() const
    {
        return this->a2;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        B::initialize_impl(args);
        this->a2 = args[_a2];
    }
};

This example shows that while backend0 must always be the root base class template and that frontend must always be the most derived class template, the other back-ends can be chained together in different orders.

char const* p = "foo";
frontend<
    backend2<backend1<backend0<char const*>, char>, int>
> composed_obj0;
frontend<
    backend1<backend2<backend0<char const*>, int>, char>
> composed_obj1;
composed_obj0.initialize(_a2 = 4, _a1 = ' ', _a0 = p);
composed_obj1.initialize(_a0 = p, _a1 = ' ', _a2 = 4);
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());

The parameterized_inheritance.cpp and preprocessor_eval_cat_no_spec.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 5520)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5524)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated implementation function. name may be qualified by the static keyword to declare the member function and its helpers as not associated with any object of the enclosing type.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5531)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
template <typename TaggedArg0, typename ...TaggedArgs>
using boost_param_no_spec_result\_ ## __LINE__ ## **name** = **result**;

// If **result** is a simple return type:
template <typename TaggedArg0, typename ...TaggedArgs>
struct boost_param_no_spec_result\_ ## __LINE__ ## **name**
{
    typedef **result** type;
};

template <typename TaggedArg0, typename ...TaggedArgs>
inline typename boost::`lazy_enable_if`_<
    |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
  , boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
        TaggedArg0
      , TaggedArgs...
    >
>::type
    **name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args)
{
    return this->boost_param_no_spec_impl ## __LINE__ ## **name**\ (
        static_cast<
            typename
            boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
                TaggedArg0
              , TaggedArgs...
            >::type(\*)()
        >(`nullptr`_)
      , |compose|_(arg0, args...)
    );
}

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
    )

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.14   BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION(result, name)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a member function that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5602)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5605); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5638); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5638); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5638); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5638); backlink

Inline interpreted text or phrase reference start-string without end-string.

Named parameters are required when invoking the member function; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5678); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5678); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5678); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5678); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a variadic function header. Enclose the return type bool in parentheses. The macro will qualify the function with the const keyword.

struct D
{
    D()
    {
    }

    BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION((bool), evaluate_m)
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

To invoke the member function, bind all its arguments to named parameters.

D const d = D();
d.evaluate_m(
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
d.evaluate_m(
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

The preprocessor_eval_cat_no_spec.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 5744)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5748)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function. *. name is the base name of the function; it determines the name of the generated implementation function.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5753)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
template <typename TaggedArg0, typename ...TaggedArgs>
using boost_param_no_spec_result_const\_ ## __LINE__ ## **name** = **result**;

// If **result** is a simple return type:
template <typename TaggedArg0, typename ...TaggedArgs>
struct boost_param_no_spec_result_const\_ ## __LINE__ ## **name**
{
    typedef **result** type;
};

template <typename TaggedArg0, typename ...TaggedArgs>
inline typename boost::`lazy_enable_if`_<
    |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
  , boost_param_no_spec_result_const\_ ## __LINE__ ## **name**\ <
        TaggedArg0
      , TaggedArgs...
    >
>::type
    **name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args) const
{
    return this->boost_param_no_spec_impl_const ## __LINE__ ## **name**\ (
        static_cast<
            typename
            boost_param_no_spec_result_const\_ ## __LINE__ ## **name**\ <
                TaggedArg0
              , TaggedArgs...
            >::type(\*)()
        >(`nullptr`_)
      , |compose|_(arg0, args...)
    );
}

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl_const ## __LINE__ ## **name**\ (
        (ResultType(\*)())
      , Args const& args
    ) const

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.15   BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR(result)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a function call operator that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5824)

Field list ends without a blank line; unexpected unindent.

When designing a front-end class template whose back-end is configurable via parameterized inheritance, it can be useful to omit argument specifiers from a named-parameter function call operator so that the delegate member functions of the back-end classes can enforce their own specifications.

template <typename B>
struct frontend : B
{
    frontend() : B()
    {
    }

    BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR((void))
    {
        this->initialize_impl(args);
    }
};

Named parameters are required when invoking the function call operator; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_(a0)
|BOOST_PARAMETER_NAME|_(a1)
|BOOST_PARAMETER_NAME|_(a2)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5847); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5847); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5847); backlink

Inline substitution_reference start-string without end-string.

For this example, each of the back-end class templates requires its own parameter to be present in the argument pack. In practice, such parameters should be optional, with default values.

template <typename T>
class backend0
{
    T a0;

 public:
    backend0() : a0()
    {
    }

    T const& get_a0() const
    {
        return this->a0;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        this->a0 = args[_a0];
    }
};

template <typename B, typename T>
class backend1 : public B
{
    T a1;

 public:
    backend1() : B(), a1()
    {
    }

    T const& get_a1() const
    {
        return this->a1;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        B::initialize_impl(args);
        this->a1 = args[_a1];
    }
};

template <typename B, typename T>
class backend2 : public B
{
    T a2;

 public:
    backend2() : B(), a2()
    {
    }

    T const& get_a2() const
    {
        return this->a2;
    }

 protected:
    template <typename ArgPack>
    void initialize_impl(ArgPack const& args)
    {
        B::initialize_impl(args);
        this->a2 = args[_a2];
    }
};

This example shows that while backend0 must always be the root base class template and that frontend must always be the most derived class template, the other back-ends can be chained together in different orders.

char const* p = "foo";
frontend<
    backend2<backend1<backend0<char const*>, char>, int>
> composed_obj0;
frontend<
    backend1<backend2<backend0<char const*>, int>, char>
> composed_obj1;
composed_obj0(_a2 = 4, _a1 = ' ', _a0 = p);
composed_obj1(_a0 = p, _a1 = ' ', _a2 = 4);
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());

The parameterized_inheritance.cpp and preprocessor_eval_cat_no_spec.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 5952)

Duplicate substitution definition name: "parameterized_inheritance".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 5954)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5958)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 5961)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
template <typename TaggedArg0, typename ...TaggedArgs>
using boost_param_no_spec_result\_ ## __LINE__ ## operator = **result**;

// If **result** is a simple return type:
template <typename TaggedArg0, typename ...TaggedArgs>
struct boost_param_no_spec_result\_ ## __LINE__ ## operator
{
    typedef **result** type;
};

template <typename TaggedArg0, typename ...TaggedArgs>
inline typename boost::`lazy_enable_if`_<
    |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
  , boost_param_no_spec_result\_ ## __LINE__ ## operator<
        TaggedArg0
      , TaggedArgs...
    >
>::type
    operator()(TaggedArg0 const& arg0, TaggedArgs const&... args)
{
    return this->boost_param_no_spec_impl ## __LINE__ ## operator(
        static_cast<
            typename
            boost_param_no_spec_result\_ ## __LINE__ ## operator<
                TaggedArg0
              , TaggedArgs...
            >::type(\*)()
        >(`nullptr`_)
      , |compose|_(arg0, args...)
    );
}

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl ## __LINE__ ## operator(
        (ResultType(\*)())
      , Args const& args
    )

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.16   BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR(result)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a function call operator that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6032)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6035); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6068); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6068); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6068); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6068); backlink

Inline interpreted text or phrase reference start-string without end-string.

Named parameters are required when invoking the function call operator; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6108); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6108); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6108); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6108); backlink

Inline substitution_reference start-string without end-string.

Use the macro as a substitute for a variadic function call operator header. Enclose the return type bool in parentheses. The macro will qualify the function with the const keyword.

struct D
{
    D()
    {
    }

    BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR((bool))
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

To invoke the function call operator, bind all its arguments to named parameters.

D const d = D();
d(
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
d(
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

The preprocessor_eval_cat_no_spec.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6175)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6179)

Field list ends without a blank line; unexpected unindent.

*. result is the parenthesized return type of the function call operator.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6182)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
template <typename TaggedArg0, typename ...TaggedArgs>
using boost_param_no_spec_result_const\_ ## __LINE__ ## operator = **result**;

// If **result** is a simple return type:
template <typename TaggedArg0, typename ...TaggedArgs>
struct boost_param_no_spec_result_const\_ ## __LINE__ ## operator
{
    typedef **result** type;
};

template <typename TaggedArg0, typename ...TaggedArgs>
inline typename boost::`lazy_enable_if`_<
    |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
  , boost_param_no_spec_result_const\_ ## __LINE__ ## operator<
        TaggedArg0
      , TaggedArgs...
    >
>::type
    operator()(
        TaggedArg0 const& arg0
      , TaggedArgs const&... args
    ) const
{
    return this->boost_param_no_spec_impl_const ## __LINE__ ## operator(
        static_cast<
            typename
            boost_param_no_spec_result_const\_ ## __LINE__ ## operator<
                TaggedArg0
              , TaggedArgs...
            >::type(\*)()
        >(`nullptr`_)
      , |compose|_(arg0, args...)
    );
}

template <typename ResultType, typename Args>
ResultType
    boost_param_no_spec_impl_const ## __LINE__ ## operator(
        (ResultType(\*)())
      , Args const& args
    ) const

Only the ArgumentPack type Args and its object instance args are available for use within the function body.

7.17   BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR(cls, impl)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a constructor that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6256)

Field list ends without a blank line; unexpected unindent.

When designing a front-end class template whose back-end is configurable via parameterized inheritance, it can be useful to omit argument specifiers from a named-parameter constructor so that the delegate constructors of the back-end classes can enforce their own specifications.

template <typename B>
struct frontend : B
{
    BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR(frontend, (B))
};

Named parameters are required when invoking the constructor; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_(a0)
|BOOST_PARAMETER_NAME|_(a1)
|BOOST_PARAMETER_NAME|_(a2)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6272); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6272); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6272); backlink

Inline substitution_reference start-string without end-string.

For this example, each of the back-end class templates requires its own parameter to be present in the argument pack. In practice, such parameters should be optional, with default values.

struct _enabler
{
};

template <typename T>
class backend0
{
    T a0;

 public:
    template <typename ArgPack>
    explicit backend0(
        ArgPack const& args
      , typename boost::`enable_if`_<
            |is_argument_pack|_<ArgPack>
          , _enabler
        >::type = _enabler()
    ) : a0(args[_a0])
    {
    }

    T const& get_a0() const
    {
        return this->a0;
    }
};

template <typename B, typename T>
class backend1 : public B
{
    T a1;

 public:
    template <typename ArgPack>
    explicit backend1(
        ArgPack const& args
      , typename boost::`enable_if`_<
            |is_argument_pack|_<ArgPack>
          , _enabler
        >::type = _enabler()
    ) : B(args), a1(args[_a1])
    {
    }

    T const& get_a1() const
    {
        return this->a1;
    }
};

template <typename B, typename T>
class backend2 : public B
{
    T a2;

 public:
    template <typename ArgPack>
    explicit backend2(
        ArgPack const& args
      , typename boost::`enable_if`_<
            |is_argument_pack|_<ArgPack>
          , _enabler
        >::type = _enabler()
    ) : B(args), a2(args[_a2])
    {
    }

    T const& get_a2() const
    {
        return this->a2;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6282); backlink

Inline substitution_reference start-string without end-string.

This example shows that while backend0 must always be the root base class template and that frontend must always be the most derived class template, the other back-ends can be chained together in different orders.

char const* p = "foo";
frontend<
    backend2<backend1<backend0<char const*>, char>, int>
> composed_obj0(_a2 = 4, _a1 = ' ', _a0 = p);
frontend<
    backend1<backend2<backend0<char const*>, int>, char>
> composed_obj1(_a0 = p, _a1 = ' ', _a2 = 4);
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());

The parameterized_inheritance.cpp and preprocessor_eval_cat_no_spec.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6377)

Duplicate substitution definition name: "parameterized_inheritance".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6379)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6383)

Field list ends without a blank line; unexpected unindent.

*. cls is the name of the enclosing class. *. impl is the parenthesized implementation base class for cls.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6387)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

template <
    typename TaggedArg0
  , typename ...TaggedArgs
  , typename = typename boost::`enable_if`_<
        |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
    >::type
>
inline explicit **cls**\ (
    TaggedArg0 const& arg0
  , TaggedArgs const&... args
) : **impl**\ (|compose|_(arg0, args...))
{
}

7.18   BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR(cls, impl)

Defined in:boost/parameter/preprocessor_no_spec.hpp

Generates a constructor that can take in named arguments.

Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6416)

Field list ends without a blank line; unexpected unindent.

The return type of each of the following function templates falls under a different value category.

template <std::size_t N>
std::`bitset`_<N + 1> rvalue_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1> const rvalue_const_bitset()
{
    return std::`bitset`_<N + 1>();
}

template <std::size_t N>
std::`bitset`_<N + 1>& lvalue_bitset()
{
    static std::`bitset`_<N + 1> lset = std::`bitset`_<N + 1>();
    return lset;
}

template <std::size_t N>
std::`bitset`_<N + 1> const& lvalue_const_bitset()
{
    static std::`bitset`_<N + 1> const clset = std::`bitset`_<N + 1>();
    return clset;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6419); backlink

Inline interpreted text or phrase reference start-string without end-string.

The U::evaluate_category static member function template has a simple job: to return the correct value category when passed in an object returned by one of the functions defined above. Assume that BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined.

enum invoked
{
    passed_by_lvalue_reference_to_const
  , passed_by_lvalue_reference
  , passed_by_rvalue_reference_to_const
  , passed_by_rvalue_reference
};

struct U
{
    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&)
    {
        return passed_by_lvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&)
    {
        return passed_by_lvalue_reference;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1> const&&)
    {
        return passed_by_rvalue_reference_to_const;
    }

    template <std::size_t N>
    static invoked evaluate_category(std::`bitset`_<N + 1>&&)
    {
        return passed_by_rvalue_reference;
    }
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6452); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6452); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6452); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6452); backlink

Inline interpreted text or phrase reference start-string without end-string.

Named parameters are required when invoking the constructor; however, none of their tags need to be in the same namespace.

|BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6492); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6492); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6492); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6492); backlink

Inline substitution_reference start-string without end-string.

Unlike |BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|, this macro doesn't require a base class, only a delegate function to which the generated constructor can pass its ArgumentPack.

struct D
{
    BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR(D, D::_evaluate)

 private:
    template <typename Args>
    static bool _evaluate(Args const& args)
    {
        BOOST_TEST_EQ(
            passed_by_lvalue_reference_to_const
          , U::evaluate_category<0>(args[_lrc])
        );
        BOOST_TEST_EQ(
            passed_by_lvalue_reference
          , U::evaluate_category<1>(args[_lr])
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference_to_const
          , U::evaluate_category<2>(
                args[_rrc | rvalue_const_bitset<2>()]
            )
        );
        BOOST_TEST_EQ(
            passed_by_rvalue_reference
          , U::evaluate_category<3>(
                args[_rr | rvalue_bitset<3>()]
            )
        );

        return true;
    }
};

To invoke the constructor, bind all its arguments to named parameters.

D dp0(
    _rr0 = rvalue_bitset<3>()
  , _lrc0 = lvalue_const_bitset<0>()
  , _lr0 = lvalue_bitset<1>()
  , _rrc0 = rvalue_const_bitset<2>()
);
D dp1(
    _lr0 = lvalue_bitset<1>()
  , _lrc0 = lvalue_const_bitset<0>()
);

The preprocessor_eval_cat_no_spec.cpp test program demonstrates proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6557)

Duplicate substitution definition name: "preproc_eval_cat_no_spec".
Macro parameters:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6561)

Field list ends without a blank line; unexpected unindent.

*. cls is the name of the enclosing class. *. func is a function that takes in the ArgumentPack that the generated constructor passes on.

Argument specifiers syntax:
 

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6566)

Field list ends without a blank line; unexpected unindent.

None.

Approximate expansion: .. parsed-literal:

template <
    typename TaggedArg0
  , typename ...TaggedArgs
  , typename = typename boost::`enable_if`_<
        |are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
    >::type
>
inline explicit **cls**\ (
    TaggedArg0 const& arg0
  , TaggedArgs const&... args
)
{
    **func**\ (|compose|_(arg0, args...));
}

7.19   BOOST_PARAMETER_NAME(name)

Defined in:boost/parameter/name.hpp

Declares a tag-type and keyword object.

If name is of the form:

(object-name, namespace-name) qualifier(tag-name)

then

Requires:qualifier is either in, out, in_out, consume,

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6604)

Field list ends without a blank line; unexpected unindent.

move_from, or forward.

Expands to:

namespace namespace-name {

    struct tag-name
    {
        static constexpr char const* keyword_name()
        {
            return ## tag-name;
        }

        typedef unspecified _;
        typedef unspecified _1;
        typedef boost::parameter::qualifier ## _reference qualifier;

        // The following definitions are available only when
        // BOOST_PARAMETER_CAN_USE_MP11 is defined.

        template <typename ArgumentPack>
        using binding_fn = typename |binding|_<
            ArgumentPack
          , tag-name
        >::type;

        template <typename ArgumentPack>
        using fn = typename |value_type|_<ArgumentPack, tag-name>::type;
    };
}

|keyword|_<tag-namespace::tag-name> const& object-name
    = |keyword|_<tag-namespace::tag-name>::instance;

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6608); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6608); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6608); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6608); backlink

Inline substitution_reference start-string without end-string.

Else If name is of the form:

(tag-name, namespace-name) object-name

then

Treats name as if it were of the form:

(forward(tag-name), namespace-name) object-name

Else If name is of the form:

qualifier(tag-name)

then

Requires:qualifier is either in, out, in_out, consume,

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6663)

Field list ends without a blank line; unexpected unindent.

move_from, or forward.

Expands to:

namespace tag {

    struct tag-name
    {
        static constexpr char const* keyword_name()
        {
            return ## tag-name;
        }

        typedef unspecified _;
        typedef unspecified _1;
        typedef boost::parameter::qualifier ## _reference qualifier;

        // The following definitions are available only when
        // BOOST_PARAMETER_CAN_USE_MP11 is defined.

        template <typename ArgumentPack>
        using binding_fn = typename |binding|_<
            ArgumentPack
          , tag-name
        >::type;

        template <typename ArgumentPack>
        using fn = typename |value_type|_<ArgumentPack, tag-name>::type;
    };
}

|keyword|_<tag::tag-name> const& _ ## tag-name
    = |keyword|_<tag::tag-name>::instance;

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6667); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6667); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6667); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6667); backlink

Inline substitution_reference start-string without end-string.

Else

Treats name as if it were of the form:

forward(tag-name)

7.20   BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias)

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6708)

Title underline too short.

``BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias)``
------------------------------------------
Defined in:boost/parameter/nested_keyword.hpp

Declares a tag-type, a keyword object, and an alias for that object nested in the tag-type.

If name is of the form:

qualifier(tag-name)

then

Requires:qualifier is either in, out, in_out, consume,

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6726)

Field list ends without a blank line; unexpected unindent.

move_from, or forward.

Expands to:

namespace tag {

    struct tag-name
    {
        static constexpr char const* keyword_name()
        {
            return ## tag-name ## _;
        }

        typedef unspecified _;
        typedef unspecified _1;
        typedef boost::parameter::qualifier ## _reference qualifier;
        static |keyword|_<*tag-name*> const& *alias*;

        // The following definitions are available only when
        // |BOOST_PARAMETER_CAN_USE_MP11|_ is defined.

        template <typename ArgumentPack>
        using binding_fn = typename |binding|_<
            ArgumentPack
          , tag-name
        >::type;

        template <typename ArgumentPack>
        using fn = typename |value_type|_<ArgumentPack, tag-name>::type;
    };

    |keyword|_<tag-name> const& tag::tag-name::alias
        = |keyword|_<tag-name>::instance;
}

|keyword|_<tag::tag-name> const& tag::tag-name::name
    = |keyword|_<tag::tag-name>::instance;

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6730); backlink

Inline substitution_reference start-string without end-string.

Else

Treats name as if it were of the form:

forward(tag-name)

7.21   BOOST_PARAMETER_TEMPLATE_KEYWORD(name)

Defined in:boost/parameter/template_keyword.hpp
Included by:boost/parameter/name.hpp

Expands to:

namespace tag {

    struct name;
}

template <typename T>
struct name : |template_keyword|_<tag:: name, T>
{
};

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6787); backlink

Inline substitution_reference start-string without end-string.

The function_type_tpl_param.cpp test program demonstrates proper usage of this macro.

7.22   BOOST_PARAMETER_FUN(r, n, l, h, p)

Deprecated

This macro has been deprecated in favor of BOOST_PARAMETER_FUNCTION.

Generates a sequence of forwarding function templates named n, with arities ranging from l to h, returning r, and using p to control overload resolution and assign tags to positional arguments.

Defined in:boost/parameter/macros.hpp
Requires:l and h are nonnegative integer tokens

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6823)

Field list ends without a blank line; unexpected unindent.

such that l < h

Expands to:

template <typename A1, typename A2, …, typename A ## l>
r
    name(
        A1 && a1, A2 && a2, …, A ## l && a ## l
      , typename p::match<A1, A2, …, A ## l>::type p = p()
    )
{
    return name_with_named_params(
        p(
            std::`forward`_<A1>(a1)
          , std::`forward`_<A2>(a2)
          , …
          , std::`forward`_<A ## **l**>(a ## **l**)
        )
    );
}

template <
    typename A1
  , typename A2
  , …
  , typename A ## **l**
  , typename A ## BOOST_PP_INC_\ (**l**)
>
r
    name(
        A1 && a1, A2 && a2, …, A ## **l** && a ## **l**
      , A ## BOOST_PP_INC_\ (**l**) const& a ## BOOST_PP_INC_\ (**l**)
      , typename **p**::match<
            A1, A2, …, A ## **l**, A ## BOOST_PP_INC_\ (**l**)
        >::type p = **p**\ ()
    )
{
    return **name**\ _with_named_params(
        **p**\ (
            std::`forward`_<A1>(a1)
          , std::`forward`_<A2>(a2)
          , …
          , std::`forward`_<A ## **l**>(a ## **l**)
          , std::`forward`_<A ## `BOOST_PP_INC`_(l)>(
                a ## BOOST_PP_INC(l)
            )
        )
    );
}



template <typename A1, typename A2, …, typename A ## h>
r
    name(
        A1 && a1, A2 && a2, …, A ## h && x ## h
      , typename p::match<A1, A2, …, A ## h>::type p = p()
    )
{
    return name_with_named_params(
        p(
            std::`forward`_<A1>(a1)
          , std::`forward`_<A2>(a2)
          , …
          , std::`forward`_<A ## h>(a ## h)
        )
    );
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6827); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6827); backlink

Inline interpreted text or phrase reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6827); backlink

Inline interpreted text or phrase reference start-string without end-string.

The macros.cpp and macros_eval_category.cpp test programs demonstrate proper usage of this macro.

7.23   BOOST_PARAMETER_KEYWORD(n, k)

Deprecated

This macro has been deprecated in favor of BOOST_PARAMETER_NAME.

Generates the declaration of a keyword tag type named k in namespace n and a corresponding keyword object definition in the enclosing namespace.

Defined in:boost/parameter/keyword.hpp

Expands to:

namespace n {

    struct k
    {
        static constexpr char const* keyword_name()
        {
            return ## k;
        }

        typedef unspecified _;
        typedef unspecified _1;
        typedef boost::parameter::forward_reference qualifier;

        // The following definitions are available only when
        // BOOST_PARAMETER_CAN_USE_MP11 is defined.

        template <typename ArgumentPack>
        using binding_fn = typename |binding|_<
            ArgumentPack
          , k
        >::type;

        template <typename ArgumentPack>
        using fn = typename |value_type|_<ArgumentPack, k>::type;
    };
}

namespace {

    |keyword|_<n::k> const& k
        = |keyword|_<n::k>::instance;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6922); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6922); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6922); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 6922); backlink

Inline substitution_reference start-string without end-string.

7.24   BOOST_PARAMETER_MATCH(p, a, x)

Generates a defaulted parameter declaration for a forwarding function.

Defined in:boost/parameter/match.hpp
Requires:a is a Boost.Preprocessor sequence of the form
(A0)(A1)…(A ## n)

Expands to:

typename p::match<A0, A1, …, A ## n>::type
    x = p()

8   Configuration Macros

8.1   BOOST_PARAMETER_HAS_PERFECT_FORWARDING

Determines whether or not the library supports perfect forwarding, or the preservation of parameter value categories. Users can manually disable this macro by #defining the BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING macro. Otherwise, the library will #define this macro if and only if it is not already defined, and if the configuration macros BOOST_NO_FUNCTION_TEMPLATE_ORDERING, BOOST_NO_SFINAE, BOOST_NO_CXX11_RVALUE_REFERENCES, BOOST_NO_CXX11_VARIADIC_TEMPLATES, and BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS are not already defined by Boost.Config.

Defined in:boost/parameter/config.hpp

8.2   BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING

It may be necessary to test user code in case perfect forwarding support is unavailable. Users can #define this macro either in their project settings or before including any library header files. Doing so will leave both BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 undefined.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7024)

Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".

8.3   BOOST_PARAMETER_CAN_USE_MP11

Determines whether or not the library can use Boost.MP11, a C++11 metaprogramming library, and therefore determines whether or not the library defines the |are_tagged_arguments_mp11| and |is_argument_pack_mp11| metafunctions. Users can manually disable this macro by #defining the BOOST_PARAMETER_DISABLE_MP11_USAGE macro or the BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING macro. Otherwise, the library will #define this macro if and only if it is not already defined, if BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined, and if the configuration macros BOOST_NO_CXX11_CONSTEXPR, BOOST_NO_CXX11_DECLTYPE_N3276, BOOST_NO_CXX11_AUTO_DECLARATIONS, |BOOST_NO_CXX11_TEMPLATE_ALIASES|_, BOOST_NO_CXX11_STATIC_ASSERT, BOOST_NO_CXX11_HDR_TYPE_TRAITS, BOOST_NO_CXX11_HDR_INITIALIZER_LIST, and BOOST_NO_CXX11_HDR_TUPLE are not already defined by Boost.Config.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7044)

Content block expected for the "Admonition" directive; none found.

.. Admonition:: Usage Note

Boost.MP11 and Boost.MPL are not mutually exclusive. It's perfectly acceptable to specify deduced parameters using both quoted metafunctions and metafunction classes, for example. See evaluate_category.cpp.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7050)

Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7052)

Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7053)

Duplicate substitution definition name: "BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7060)

Duplicate substitution definition name: "BOOST_NO_CXX11_AUTO_DECLARATIONS".
Defined in:boost/parameter/config.hpp
Example usage:

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7080)

Field list ends without a blank line; unexpected unindent.

Given the following definitions:

|BOOST_PARAMETER_NAME|_(x)

template <typename A0>
typename boost::`enable_if`_<std::`is_same`_<int,A0>,int>::type
    sfinae(A0 const& a0)
{
    return 0;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7091); backlink

Duplicate explicit target name: "is_same".

Boost.MP11 allows deduced parameters to be defined more succinctly:

template <typename T, typename Args>
using predicate = std::`is_convertible`_<T,char const\*>;

|BOOST_PARAMETER_FUNCTION|_((int), sfinae, tag,
    (deduced
        (optional
            (x
              , \*(boost::mp11::mp_quote<predicate>)
              , static_cast<char const\*>(`nullptr`_)
            )
        )
    )
)
{
    return 1;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7112); backlink

Duplicate explicit target name: "is_convertible".

Without Boost.MP11, deduced parameter definitions tend to be more verbose:

struct predicate
{
    template <typename T, typename Args>
    struct apply
      : boost::mpl::if_<
            boost::`is_convertible`_<T,char const\*>
          , boost::mpl::true_
          , boost::mpl::false_
        >
    {
    };
};

|BOOST_PARAMETER_FUNCTION|_((int), sfinae, tag,
    (deduced
        (optional
            (x
              , \*(predicate)
              , static_cast<char const\*>(`nullptr`_)
            )
        )
    )
)
{
    return 1;
}

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7143); backlink

Duplicate explicit target name: "is_convertible".

Either way, the following assertions will succeed:

assert(1 == sfinae());
assert(1 == sfinae("foo"));
assert(0 == sfinae(1));

As another example, given the following declarations and definitions:

|BOOST_PARAMETER_NAME|_(x)
|BOOST_PARAMETER_NAME|_(y)

template <typename E, typename Args>
void check0(E const& e, Args const& args);

template <typename P, typename E, typename ...Args>
void check(E const& e, Args const&... args)
{
    check0(e, P()(args...));
}

Argument packs qualify as Boost.MP11-style lists containing keyword tag types:

template <typename Args>
struct some_functor
{
    template <typename K>
    void operator()(K&&) const
    {
        // K is one of tag::x, tag::y, etc.
    }
};

template <typename E, typename Args>
void check0(E const& e, Args const& args)
{
    boost::mp11::mp_for_each<E>(some_functor<Args>());
}

The first check determines whether or not the argument type of _y is the same as the reference type of _x, while the second check determines whether or not the argument type of _y is convertible to the value type of _x. Here, it's possible to access the reference and value result types of indexing an argument pack a little more directly:

// Use mp_bind on tag::x::binding_fn to access the reference type of _x.
// Here, boost::mp11::_1 will be bound to the argument type of _y.
// Regardless, boost::mp11::_2 will be bound to the argument pack type.
check<
    |parameters|_<
        tag::x
      , |optional|_<
            |deduced|_<tag::y>
          , boost::mp11::mp_bind<
                std::`is_same`_
              , boost::mp11::_1
              , boost::mp11::mp_bind<
                    tag::x::binding_fn
                  , boost::mp11::_2
                >
            >
        >
    >
>((_x = 0, _y = 1), 0, 1);

// Use mp_bind_q on tag::x to access the value type of _x.
check<
    |parameters|_<
        tag::x
      , |optional|_<
            |deduced|_<tag::y>
          , boost::mp11::mp_bind<
                std::`is_convertible`_
              , boost::mp11::_1
              , boost::mp11::mp_bind_q<tag::x,boost::mp11::_2>
            >
        >
    >
>((_x = 0U, _y = 1U), 0U, 1U);

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7226); backlink

Duplicate explicit target name: "is_convertible".

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7227); backlink

Duplicate explicit target name: "is_same".

Argument packs still qualify as Boost.MPL-style lists containing keyword tag types:

template <typename Args>
struct some_functor
{
    template <typename K>
    void operator()(K) const
    {
        // K is one of tag::x, tag::y, etc.
    }
};

template <typename E, typename Args>
void check0(E const& e, Args const& args)
{
    boost::mpl::for_each<E>(some_functor<Args>());
}

However, without Boost.MP11, the corresponding checks become a little more verbose:

check<
    |parameters|_<
        tag::x
      , |optional|_<
            |deduced|_<tag::y>
          , boost::mpl::if_<
                boost::`is_same`_<
                    boost::`add_lvalue_reference`_<boost::mpl::_1>
                  , |binding|_<boost::mpl::_2,tag::x>
                >
              , boost::mpl::true_
              , boost::mpl::false_
            >
        >
    >
>((_x = 0, _y = 1), 0, 1);

// Use tag::x::_ or tag::x::_1 to access the value type of _x.
check<
    |parameters|_<
        tag::x
      , |optional|_<
            |deduced|_<tag::y>
          , boost::mpl::if_<
                boost::`is_convertible`_<boost::mpl::_1,tag::x::_1>
              , boost::mpl::true_
              , boost::mpl::false_
            >
        >
    >
>((_x = 0U, _y = 1U), 0U, 1U);

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7284); backlink

Duplicate explicit target name: "is_convertible".

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7285); backlink

Duplicate explicit target name: "is_same".

The singular.cpp, compose.cpp, optional_deduced_sfinae.cpp, and deduced_dependent_predicate.cpp test programs demonstrate proper usage of this macro.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7293)

Duplicate substitution definition name: "singular_cpp".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7295)

Duplicate substitution definition name: "compose_cpp".

8.4   BOOST_PARAMETER_DISABLE_MP11_USAGE

It may be necessary to disable usage of Boost.MP11 for compilers that cannot support it. Users can #define this macro either in their project settings or before including any library header files. Doing so will leave BOOST_PARAMETER_CAN_USE_MP11 undefined and the |are_tagged_arguments_mp11| and |is_argument_pack_mp11| metafunctions unavailable.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7311)

Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".

8.5   BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE

If BOOST_PARAMETER_HAS_PERFECT_FORWARDING is #defined, then determines the MPL Variadic Sequence underlying the nested parameter_spec type of |parameters|. If the user does not manually #define this macro, then the library will #define it as boost\:\:mp11\:\:mp_list if BOOST_PARAMETER_CAN_USE_MP11 is defined, boost\:\:fusion\:\:list if BOOST_FUSION_HAS_VARIADIC_LIST is defined (by Boost.Fusion), boost\:\:fusion\:\:deque if BOOST_FUSION_HAS_VARIADIC_DEQUE is defined (by Boost.Fusion), or boost\:\:mpl\:\:vector otherwise.

Example:

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7328)

Content block expected for the "parsed-literal" directive; none found.

.. parsed-literal::

#define BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE boost\:\:fusion\:\:vector

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7332)

Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7333)

Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".
Defined in:boost/parameter/parameters.hpp

8.6   BOOST_PARAMETER_MAX_ARITY

If BOOST_PARAMETER_HAS_PERFECT_FORWARDING is #defined, then:

*. If the MPL Variadic Sequence underlying the nested parameter_spec type of |parameters| does not have a size limit--which is the case with boost\:\:mp11\:\:mp_list, boost\:\:fusion\:\:list, and boost\:\:fusion\:\:deque, but not boost\:\:mpl\:\:vector--then this macro can be safely ignored. User code that manually defines BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE should also manually define this macro to the size limit of the sequence if it has one.

If BOOST_PARAMETER_HAS_PERFECT_FORWARDING is not #defined, then:

*. Mutable references must be wrapped by boost\:\:ref or std\:\:ref if passed by position to Boost.Parameter-enabled functions with arity greater than or equal to BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7374)

Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7375)

Duplicate substitution definition name: "BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7378)

Duplicate substitution definition name: "boost_mp11_list".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7380)

Duplicate substitution definition name: "boost_fusion_list".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7382)

Duplicate substitution definition name: "boost_fusion_deque".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7384)

Duplicate substitution definition name: "boost_mpl_vector".
Defined in:boost/parameter/config.hpp
Default Value:BOOST_MPL_LIMIT_VECTOR_SIZE (defined by Boost.MPL) if

System Message: WARNING/2 (/root/project/libs/parameter/doc/reference.rst, line 7396)

Field list ends without a blank line; unexpected unindent.

perfect forwarding is supported, 8 otherwise. :Minimum Value: 2 :Maximum Value: |BOOST_PARAMETER_COMPOSE_MAX_ARITY|

8.7   BOOST_PARAMETER_COMPOSE_MAX_ARITY

If BOOST_PARAMETER_HAS_PERFECT_FORWARDING is not #defined, then determines the maximum number of arguments supported by the |compose| function and by the |BOOST_PARAMETER_NO_SPEC_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION|, |BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR|, |BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR|, |BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|, and |BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR| code generation macros.

Defined in:boost/parameter/config.hpp
Default Value:20 for a few older compilers, 64 otherwise
Minimum Value:2

8.8   BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY

If this library does not support perfect forwarding, determines the number of arguments less than which |parameters| generates an exponential number of function call operator overloads, and greater than or equal to which |parameters| does not. Will only be #defined by the library if it is not already #defined and BOOST_PARAMETER_HAS_PERFECT_FORWARDING is not #defined.

Defined in:boost/parameter/config.hpp
Default Value:0
Minimum Value:0

8.9   ...Outside Of This Library

#. If Boost.Config defines the macro BOOST_NO_FUNCTION_TEMPLATE_ORDERING, then the macros BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 will be left undefined; otherwise, the code generation macros would not work correctly.

#. If Boost.Config defines the macro BOOST_NO_SFINAE, then the macros BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 will be left undefined; otherwise, keyword types generated by BOOST_PARAMETER_NAME and BOOST_PARAMETER_NESTED_KEYWORD would not work correctly.

#. If Boost.Config defines the macro BOOST_NO_CXX11_RVALUE_REFERENCES, then the macros BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_VARIADIC_TEMPLATES, then the macros BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS, then the macros BOOST_PARAMETER_HAS_PERFECT_FORWARDING and BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_CONSTEXPR, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_DECLTYPE_N3276, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_AUTO_DECLARATIONS, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro |BOOST_NO_CXX11_TEMPLATE_ALIASES|_, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_STATIC_ASSERT, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_HDR_TYPE_TRAITS, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_HDR_INITIALIZER_LIST, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Config defines the macro BOOST_NO_CXX11_HDR_TUPLE, then the macro BOOST_PARAMETER_CAN_USE_MP11 will be left undefined.

#. If Boost.Fusion defines the macro BOOST_FUSION_HAS_VARIADIC_LIST, if this library defines the macro BOOST_PARAMETER_HAS_PERFECT_FORWARDING, and if BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE is left undefined, then the MPL Variadic Sequence underlying the nested parameter_spec type of |parameters| will be boost\:\:fusion\:\:list.

#. If Boost.Fusion defines the macro BOOST_FUSION_HAS_VARIADIC_DEQUE, if this library defines the macro BOOST_PARAMETER_HAS_PERFECT_FORWARDING, and if BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE is left undefined, then the MPL Variadic Sequence underlying the nested parameter_spec type of |parameters| will be boost\:\:fusion\:\:deque.

#. The value that Boost.MPL defines the macro BOOST_MPL_LIMIT_VECTOR_SIZE as will be the value that this library defines the macro BOOST_PARAMETER_MAX_ARITY as if this library defines the macro BOOST_PARAMETER_HAS_PERFECT_FORWARDING.

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7513)

Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7514)

Duplicate substitution definition name: "BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7515)

Duplicate substitution definition name: "BOOST_PARAMETER_MAX_ARITY".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7518)

Duplicate substitution definition name: "BOOST_NO_FUNCTION_TEMPLATE_ORDERING".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7520)

Duplicate substitution definition name: "BOOST_NO_SFINAE".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7522)

Duplicate substitution definition name: "BOOST_NO_CXX11_RVALUE_REFERENCES".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7524)

Duplicate substitution definition name: "BOOST_NO_CXX11_VARIADIC_TEMPLATES".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7526)

Duplicate substitution definition name: "BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7528)

Duplicate substitution definition name: "BOOST_FUSION_HAS_VARIADIC_LIST".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7530)

Duplicate substitution definition name: "BOOST_FUSION_HAS_VARIADIC_DEQUE".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7532)

Duplicate substitution definition name: "BOOST_MPL_LIMIT_VECTOR_SIZE".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7534)

Duplicate substitution definition name: "boost_fusion_list".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7536)

Duplicate substitution definition name: "boost_fusion_deque".

9   Tutorial

Follow this link to the Boost.Parameter tutorial documentation.


[1]References to tag objects may be initialized multiple times. This scenario can only occur in the presence of threading. Because the C++ standard doesn't consider threading, it doesn't explicitly allow or forbid multiple initialization of references. That said, it's hard to imagine an implementation where it could make a difference.
[2](1, 2, 3) Where BOOST_NO_RESULT_OF is #defined, boost::result_of<F()>::type is replaced by F::result_type.

Docutils System Messages

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 666); backlink

Undefined substitution referenced: "BOOST_PARAMETER_TEMPLATE_KEYWORD".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 748); backlink

Undefined substitution referenced: "Metafunction".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 851); backlink

Undefined substitution referenced: "Metafunction".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1081); backlink

Undefined substitution referenced: "compose".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1089); backlink

Undefined substitution referenced: "are_tagged_arguments|_<T0,Pack...> , |ArgumentPack".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1107); backlink

Undefined substitution referenced: "compose".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1127); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1138); backlink

Undefined substitution referenced: "BOOST_PARAMETER_COMPOSE_MAX_ARITY".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6499); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6732); backlink

Undefined substitution referenced: "keyword|_<*tag-name*> const& *alias*; // The following definitions are available only when // |BOOST_PARAMETER_CAN_USE_MP11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7030); backlink

Undefined substitution referenced: "are_tagged_arguments_mp11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7030); backlink

Undefined substitution referenced: "is_argument_pack_mp11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7030); backlink

Undefined substitution referenced: "BOOST_NO_CXX11_TEMPLATE_ALIASES".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7305); backlink

Undefined substitution referenced: "are_tagged_arguments_mp11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7305); backlink

Undefined substitution referenced: "is_argument_pack_mp11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7317); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7361); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7396); backlink

Undefined substitution referenced: "BOOST_PARAMETER_COMPOSE_MAX_ARITY".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "compose".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7407); backlink

Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7427); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7427); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7480); backlink

Undefined substitution referenced: "BOOST_NO_CXX11_TEMPLATE_ALIASES".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7496); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7502); backlink

Undefined substitution referenced: "parameters".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< typename boost::mpl::`eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::out_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_const`_<t> , boost::mpl::`false_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::consume_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< typename boost::mpl::`eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::out_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_const`_<t> , boost::mpl::`false_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::consume_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 306); backlink

Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 748); backlink

Unknown target name: "metafunction".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 851); backlink

Unknown target name: "metafunction".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 967); backlink

Unknown target name: "true".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 967); backlink

Unknown target name: "false".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1020); backlink

Unknown target name: "true".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1020); backlink

Unknown target name: "false".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1089); backlink

Unknown target name: "are_tagged_arguments|_<t0,pack...> , |argumentpack".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1461); backlink

Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1935); backlink

Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_ ## __line__ ## **name**<args>::type boost_param_impl ## __line__ ## **name**(args const& args) { return this->boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast< typename boost_param_result_ ## __line__ ## **name**< args >::type(*)() >(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 1935); backlink

Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return this->boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2371); backlink

Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_const_ ## __line__ ## **name**<args>::type boost_param_impl_const ## __line__ ## **name**(args const& args) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## **name**( static_cast< typename boost_param_result_const_ ## __line__ ## **name**< args >::type(*)() >(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2371); backlink

Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_const_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2555); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2598); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2704); backlink

Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_ ## __line__ ## operator<args>::type boost_param_impl ## __line__ ## operator(args const& args) { return this->boost_param_dispatch_0boost_ ## __line__ ## operator( static_cast< typename boost_param_result_ ## __line__ ## operator< args >::type(*)() >(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 2704); backlink

Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## operator( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return this->boost_param_dispatch_0boost_ ## __line__ ## operator( static_cast<resulttype(*)()>(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3144); backlink

Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_const_ ## __line__ ## operator<args>::type boost_param_impl_const ## __line__ ## operator(args const& args) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## operator( static_cast< typename boost_param_result_const_ ## __line__ ## operator< args >::type(*)() >(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3144); backlink

Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_const_0boost_ ## __line__ ## operator( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## operator( static_cast<resulttype(*)()>(`nullptr".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3325); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 3376); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 4597); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 4640); backlink

Unknown target name: "map`_<char const*,std::`string".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6732); backlink

Unknown target name: "keyword|_<*tag-name*> const& *alias*; // the following definitions are available only when // |boost_parameter_can_use_mp11".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 6829); backlink

Unknown target name: "forward`_<a1>(a1) , std::`forward`_<a2>(a2) , … , std::`forward`_<a ## **l**>(a ## **l**) ) ); } template < typename a1 , typename a2 , … , typename a ## **l** , typename a ## boost_pp_inc_(**l**) > r name( a1 && a1, a2 && a2, …, a ## **l** && a ## **l** , a ## boost_pp_inc_(**l**) const& a ## boost_pp_inc_(**l**) , typename **p**::match< a1, a2, …, a ## **l**, a ## boost_pp_inc_(**l**) >::type p = **p**() ) { return **name**_with_named_params( **p**( std::`forward`_<a1>(a1) , std::`forward`_<a2>(a2) , … , std::`forward`_<a ## **l**>(a ## **l**) , std::`forward`_<a ## `boost_pp_inc".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7030); backlink

Unknown target name: "boost_no_cxx11_template_aliases".

System Message: ERROR/3 (/root/project/libs/parameter/doc/reference.rst, line 7480); backlink

Unknown target name: "boost_no_cxx11_template_aliases".