This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Intrinsics for N2965: Type traits and base classes
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Michael Spertus <mike_spertus at symantec dot com>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 28 Sep 2011 08:53:15 +0100
- Subject: Re: Intrinsics for N2965: Type traits and base classes
- References: <20110913154324.4be22faf@shotwell> <4E809F45.2010908@symantec.com> <20110927195930.54e0d0df@shotwell> <C83DA40E-0C0C-4F0F-96DE-D8B94038A29E@symantec.com>
On 28 September 2011 04:22, Michael Spertus wrote:
> Benjamin,
> I think tuple is wrong both for performance reasons (I believe these are likely to be serious enough to depress use due to inordinately long compiles) and because it prematurely locks us into a rigid choice of how our typelists are implemented.
>
> My inclination is to make it type-independent by returning an unspecified type that can have a sequence of types extracted from it (this is the approach taken by boost::mpl and has loads of experience that shows it is a good approach to metaprogramming). In other words, first<bases<A>>::type would be the first base of A, etc.
Citing Boost MPL as a good way to avoid inordinately long compiles ...
interesting! Have you ever tried to reduce a GCC bug report from 20k
lines to 20, because most Boost libs include every MPL header?!
I hope we can get a simple typelist _without_ needing everything else
in MPL, such as the apply and lambda metafunctions (and maybe a lot of
that could be massively simplified using variadic templates anyway.)