public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Spertus <mike_spertus@symantec.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Benjamin Kosnik <bkoz@redhat.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>,
	Jason Merrill <jason@redhat.com>,
	"libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>
Subject: Re: Intrinsics for N2965: Type traits and base classes
Date: Wed, 28 Sep 2011 12:49:00 -0000	[thread overview]
Message-ID: <4E830B10.8020802@symantec.com> (raw)
In-Reply-To: <CAH6eHdQCzY+fGErud70qZn8NM6_gn7=CuCmLge+3ACj471YHCQ@mail.gmail.com>

Don't worry, I'm not suggesting including boost::mpl at all, just 
leaving the return type of the bases trait unspecified. IMO, your 
example illustrates my point that without performance tuning, compiling 
metaprograms can be prohibitively expensive, so I want to avoid running 
the tuple metaprogram that creates the fields when we never need to 
instantiate the type. Benchmarks soon.

Mike

On 9/28/2011 2:53 AM, Jonathan Wakely wrote:
> 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.)
>
> .
>
>    

  reply	other threads:[~2011-09-28 11:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110913154324.4be22faf@shotwell>
2011-09-26 16:24 ` Mike Spertus
2011-09-26 18:40   ` Jason Merrill
2011-09-28  6:43   ` Benjamin Kosnik
2011-09-28  6:49     ` Benjamin Kosnik
2011-09-28  7:08     ` Michael Spertus
2011-09-28  9:33       ` Jonathan Wakely
2011-09-28 12:49         ` Mike Spertus [this message]
2011-09-28 13:57           ` Mike Spertus
2011-09-29 19:42             ` Benjamin Kosnik
2011-10-03  1:55               ` Michael Spertus
2011-10-03 13:08                 ` Jason Merrill
2011-10-03 15:51                 ` Jonathan Wakely
2011-10-04  4:41                 ` Benjamin Kosnik
2011-10-04  5:04                   ` Benjamin Kosnik
2011-10-09 19:31                     ` Michael Spertus
2011-10-09 19:38                       ` Jason Merrill
2011-10-11  0:12                         ` Benjamin Kosnik
2011-10-13 18:16                         ` Michael Spertus
2011-10-14 16:23                           ` Jason Merrill
2011-10-14 20:23                             ` Michael Spertus
2011-10-14 20:28                               ` Jason Merrill
2011-10-14 20:36                                 ` Michael Spertus
2011-10-18  7:19                                   ` Benjamin Kosnik
2011-10-18  8:23   ` Eric Botcazou
2011-10-19 22:48     ` Benjamin Kosnik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E830B10.8020802@symantec.com \
    --to=mike_spertus@symantec.com \
    --cc=bkoz@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).