Home | Libraries | People | FAQ | More |
BOOST_LOCAL_FUNCTION_NAME_TPL — This macro is used to end a local function declaration specifying its name within templates.
// In header: <boost/local_function.hpp>
BOOST_LOCAL_FUNCTION_NAME_TPL(name)
This macro must be used instead of BOOST_LOCAL_FUNCTION_NAME
when declaring a local function within a template. A part from that, this macro has the exact same syntax a BOOST_LOCAL_FUNCTION_NAME
(see BOOST_LOCAL_FUNCTION_NAME
for more information):
{ // Some declarative context within a template. ... result_type BOOST_LOCAL_FUNCTION_TPL(declarations) { ... // Body code. } BOOST_LOCAL_FUNCTION_NAME_TPL(qualified_name) ... }
Note that BOOST_LOCAL_FUNCTION_TPL
must be used with this macro instead of BOOST_LOCAL_FUNCTION
.
Note: C++03 does not allow to use typename
outside templates. This library internally manipulates types, these operations require typename
but only within templates. This macro is used to indicate to the library when the enclosing scope is a template so the library can correctly use typename
.
See: Tutorial section, BOOST_LOCAL_FUNCTION_NAME
, BOOST_LOCAL_FUNCTION_TPL
.