stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: type_traits progress
Date Fri, 30 May 2008 23:08:54 GMT
 

> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Friday, May 30, 2008 3:05 PM
> To: dev@stdcxx.apache.org
> Subject: Re: type_traits progress
> 
> Travis Vitek wrote:
> >  
> > 
> > Eric Lemings wrote:
> >>> Travis Vitek wrote:
> >>>  
> >> ...
> >>> As an example, the array traits above are all closely related 
> >>> and their
> >>> implementations are similar. There are five traits, and 
> those traits
> >>> span three sections of the standard.
> >>>
> >>> I'm open to doing some type of grouping, we just need to 
> >>> understand how
> >>> we want to group them and then how we want to name the files.
> >> The term you're looking for is cohesion.  :)  I kinda like this
> >> organization.  Couple things though.
> >>
> >> Why put __rw_decay, a single helper trait in its own header?
> > 
> > Well decay deals with conversion from array to pointer and 
> function to
> > function pointer conversions. I can't necessarily put it into both
> > _meta_array.h and _meta_func.h, so I figured it would be 
> best to put it
> > into a file by itself.
> 
> FWIW, I see no problem with bundling groups of traits together
> even if some of them are unlikely to be used in the rest of the
> lib, just as long as their implementation isn't too big (i.e.,
> doesn't bloat translation units and unnecessarily increase
> compilation time).

Well when it comes to metaprogramming, there's almost always a
tradeoff in these two respects.  Either the translation unit
size increases or compile times increase.  But you're right:
we should minimize both whenever possible.

BTW, which of these two should be the preferred: comile-time
computations (metaprogramming) or runtime processing?  I would
say compile-time even though that will signficantly impact us
developers but I think users would prefer this since they do
not build nearly as often.

Brad.

Mime
View raw message