BOOST_OPENMETHOD_DEFAULT_REGISTRY
Default value for Registry.
Synopsis
Declared in <boost/openmethod/core.hpp>
#define BOOST_OPENMETHOD_DEFAULT_REGISTRY
Description
The name of the default registry.
BOOST_OPENMETHOD_DEFAULT_REGISTRY is the default value for the Registry template parameter of boost::openmethod::method, boost::openmethod::use_classes, boost::openmethod::virtual_ptr, and all the constructs that take a registry as a template argument.
BOOST_OPENMETHOD_DEFAULT_REGISTRY can be defined by a program to change the default registry globally, before including <boost/openmethod/core.hpp>. After that, changing its value has no effect, even on other macros.
To override the default registry, proceed as follows:
-
Define a
boost::openmethod::registryclass, either from scratch, or by tuning an existing registry. Include<boost/openmethod/preamble.hpp>,<boost/openmethod/default_registry.hpp>, and headers underboost/openmethod/policiesas needed. -
Set
BOOST_OPENMETHOD_DEFAULT_REGISTRYto the new registry class. -
Include
<boost/openmethod/core.hpp>.
|
Use this feature with caution, as it will cause ODR violations if different translation units define different default registries. |
See Also
Created with MrDocs