Static fields and specialization

Palo Marton palo.marton at
Mon Jan 12 15:43:54 UTC 2015

> Where do you get this idea, that value types and specialization don't play
> together?

You probably misunderstood me (again) :(

Richard suggested that you can keep speed of Optional.empty() by creating
separate layers for <ref T>, <int T>, etc...

by it is not possible to do that for every possible T, e.g. this


can not be implemented as super-fast-singleton-return without supporting
some form of static field specialization (at least I think so).

PS: See also some suggestion later in this thread how such specialization
can be implemented.

More information about the valhalla-dev mailing list