Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_LOCAL_FUNCTION_TPL

BOOST_LOCAL_FUNCTION_TPL — This macro is used to start a local function declaration within templates.

Synopsis

// In header: <boost/local_function.hpp>

BOOST_LOCAL_FUNCTION_TPL(declarations)

Description

This macro must be used instead of BOOST_LOCAL_FUNCTION when declaring a local function within a template. A part from that, this macro has the exact same syntax as BOOST_LOCAL_FUNCTION (see BOOST_LOCAL_FUNCTION for more information):

{ // Some declarative context with a template.
    ...
    result_type BOOST_LOCAL_FUNCTION_TPL(declarations) {
        ... // Body code.
    } BOOST_LOCAL_FUNCTION_NAME(qualified_function_name)
    ...
}

Note: C++03 does not allow to use typename outside templates. This library internally manipulates types, these operations require typename but only within templates so this macro is used to indicate to the library when the enclosing scope is a template.

See: Tutorial section, BOOST_LOCAL_FUNCTION, BOOST_LOCAL_FUNCTION_NAME.


PrevUpHomeNext