BOOST_OPENMETHOD
Synopsis
Defined in <boost/openmethod/macros.hpp>.
BOOST_OPENMETHOD(NAME, (PARAMETERS...), RETURN_TYPE [, POLICY]);
Description
Declares a method.
The macro expands to several constructs:
-
A
struct
forward declaration that acts as the method’s identifier:
struct BOOST_OPENMETHOD_ID(NAME);
-
An inline function template, constrained to take the same
PARAMETERS
, without thevirtual_
decorators, returning aRETURN_TYPE
. The function forwards to
method<BOOST_OPENMETHOD_ID(NAME)(PARAMETERS…), RETURN_TYPE, POLICY>::fn
. -
A guide function used to match overriders with the method:
auto BOOST_OPENMETHOD_ID(NAME)_guide(...)
-> ::boost::openmethod::method<
BOOST_OPENMETHOD_ID(NAME)(PARAMETERS...), RETURN_TYPE [, POLICY]>;
NAME must be an identifier. Qualified names are not allowed.
|
The default value for POLICY is the value of
BOOST_OPENMETHOD_DEFAULT_REGISTRY at the point <boost/openmethod/core.hpp> is
included. Changing the value of this symbol has no effect after that point.
|