Re: Registrar question... bug?
Status: Alpha
Brought to you by:
madduck
|
From: martin f k. <ma...@ma...> - 2004-06-01 13:46:36
|
also sprach stephan beal <st...@s1...> [2004.06.01.1447 +0200]:
> On Tuesday 01 June 2004 14:16, martin f krafft wrote:
> > What's the difference between what you want and what I do with the
> > macros? The registrars are created in anonymous namespaces...
> > aren't they?
>=20
> namespace Factory
> {
> template <typename _Key, typename _BaseType, typename _SubType =3D=20
> _BaseType,
> typename _Builder =3D Builder<_BaseType, _SubType> >
> class Registrar
> {
> ...
that's the class. not the instance. i doubt you can get ODR problems
with class definitions.
> > So we should add an error policy, or figure out a way to make
> > this a compiler error. like using static asserts. i'd like that
> > the most.
>=20
> That's an interesting idea. As a user i would expect to be able to
> register whenever i want, so i think a policy would be the better
> route. Or simply removing the static one-time check and taking the
> last-reg-takes-effect policy. i can't see a reason to keep people
> from changing the registrations at arbitrary times. That said,
> that's not something people will do, i think. In practice, i've
> never changed factories at runtime.
it's also a bad idea... considering the allocators... to change the
builder once objects are created...
--=20
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
=20
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: kra...@ai... mad...@ma...
=20
"m.c.s.e": minesweeper consultant & solitaire expert
|