Macro BOOST_OPENMETHOD_DEFAULT_REGISTRY
Default value for Registry
Synopsis
Defined in <boost/openmethod/core.hpp>
#define BOOST_OPENMETHOD_DEFAULT_REGISTRY ::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 method, use_classes, 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
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>.- NOTE
-
Use this feature with caution, as it will cause ODR violations if different translation units define different default registries.