[C++-sig] [Boost.Python v3] Features and Scope

Stefan Seefeld stefan at seefeld.name
Mon Aug 29 18:41:22 CEST 2011

On 08/28/2011 02:14 PM, Jim Bosch wrote:
> To solve it, I think you'd want anything registered by a specific
> module to appear both in that module's registry and the global
> registry, with the module's registry taking precedence.  Are there any
> cases where you'd want something only to appear in the module-specific
> registry?

Anything that gets injected into the global registry is prone to violate
the ODR. Of course, also adding it into a local registry and letting
that have precedence may mask the ODR violation issue. But in that case,
it isn't clear why we'd add it to the global registry at all.

It may make sense to define a policy that types exported explicitly by
an extension module may be added to the global repository. In contrast,
prerequisite types that are only by way of dependency added (e.g.,
common libstdc++ types) should be stored in a local / private registry.



      ...ich hab' noch einen Koffer in Berlin...

More information about the Cplusplus-sig mailing list