incubator-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: remove_reference
Date Thu, 12 Jun 2008 21:37:39 GMT
 

> -----Original Message-----
> From: Travis Vitek 
> Sent: Thursday, June 12, 2008 3:19 PM
> To: Eric Lemings
> Cc: 'dev@stdcxx.apache.org'
> Subject: RE: remove_reference
> 
>  
> 
> Eric Lemings wrote:
> > 
> >Hmm.  So what's the benefit in providing internal type traits
> >at all?  Seems to me that they only serve to slow down compile
> >times.  Why not just break the public type traits into internal
> >headers and include them all from the <type_traits> header?
> >Or do we have some plans for the internal type traits that I'm
> >unaware of?
> >
> 
> It is my understanding that the internal traits exist to 
> avoid namespace pollution. Say we wanted to optimize 
> std::uninitialized_fill<> for pod types. If we used 
> std::is_pod<>, then the user would be able to use that type 
> and possibly others without including <type_traits>.
> 
> Honestly, I don't see this as a great benefit, but it is 
> something that has been important to the implementation in the past.
> 
> As for the argument of slowing down compile times, there has 
> been some bickering about this in the past; should we put 
> comments in the headers or should we be splitting up large 
> headers into multiple small ones and should we coalesce 
> multiple headers into one. I don't buy it unless someone has 
> a reasonable testcase as evidence. 

I think you sorta missed my point.  My point is that if the internal
type traits do not provide any real added value, why bother with
them?  Say you have an internal class __rw_foo and a public class
foo which derives from __rw_foo but is virtual identical, why have
__rw_foo at all?  Why not move everything in __rw_foo directly into
foo?

That's why I was asking if there are some future plans for the internal
type traits that will provide some additional value.  Otherwise, we
really don't need them and they're actually just polluting our internal
namespace.

Brad.

Mime
View raw message