This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] : Improve std::search on v7
Chris Jefferson wrote:
> Out of interest, why isn't this union business also a problem for
> allocators on the standard containers? Are they just not allowed to be
> unions?
Well, for one Table 31 defines X as "an Allocator *class* of type T"
(emphasis mine). But I'm sure we can find many other general principles
and "laws" in support of that interpretation.
In my personal experience, unions can be very useful but often their
limitations are also *very* annoying.
Paolo.