On Mon, Jan 2, 2017 at 4:15 PM, René J. V. Bertin <rjvber...@gmail.com>
wrote:
>
> > Note that all of this is constructed at *load* time, not at compile time
> and
> > not on first use.
>
> so it doesn't work like a classical static variable which is initialised
> only
> once, presuming you meant to say "not on first use *only*"?
>

It works exactly as a classic static variable with *nontrivial*
initialization. It's initialized only once before entering main().
This is in contrast with (e.g. heap allocated objects) that can be
initialized only and if used - "on first use".


> You already have a perfect hash in the case of a set of unique keys, like
> an
> enum, no?
>

Depends on the hashing function, but in the general case, no you don't.

Kind regards.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to