Registrar question... bug?
Status: Alpha
Brought to you by:
madduck
|
From: stephan b. <st...@s1...> - 2004-06-01 10:21:11
|
=46rom Registrar:
private:
static bool&
_S_reg()
{
static bool __reg =3D false;
return __reg;
}
static Registrar _S_instance;
_Builder const _M_builder;
can't _M_builder be static?
After all, "es kann nuer einen Geben" for each BaseType/SubType/KeyType=20
combination.
Using the current code, calling the following 2 funcs would, i *think*=20
end up with the same effect as a static _M_builder:
Registrar<int,Foo,Bar>( 42 );
Registrar<int,Foo,Bar>( 75 );
am i correct in thinking that the key 75 would never be registered,=20
because of this check in the ctor:
_S_reg() =3D _S_reg() || _Factory::register_builder(__KEY,=20
_M_builder);
=2D-=20
=2D---- st...@s1... http://s11n.net
"...pleasure is a grace and is not obedient to the commands
of the will." -- Alan W. Watts
|