stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: implementation of Unary Traits
Date Tue, 01 Jul 2008 19:45:13 GMT
Travis Vitek wrote:
>  
[...]
> Originally I wanted separate headers for each trait, but it was
> determined that the overhead from including all of these small files
> would be to much, so I suggested splitting traits up into groups based
> on what they did (<rw/_add_cv.h>, <rw/_remove_cv.h>, ...) but that was
> vetoed also.

I think there are two separate issues/questions here:

   1. should the UnaryTraits make use of the remove_cv trait
      or should they be partially specialized and remove the
      cv qualifiers directly?

   2. what is the optimal organization of individual traits
      into headers?

This thread started with question (1). While I think that
(2) still needs to be discussed (and the decision for (1)
has an impact on (2)), I think we might want to have the
two discussions in separate threads. I suggest we focus
on (1) first since I believe it's the more important of
the two issues. I hope/expect that the right approach
for (2) will become more clear after we've decided (1).

> 
[...]
> If you ask what I prefer, I'm going to tell you I prefer the second
> option (that is essentially what I wrote originally). But, honestly, for
> me to care either way, I need to know that there actually a noticeable
> performance difference between the two techniques.

Initially, I had a slight bias for the first approach.
I started warming up to the second one because the code
reuse seems like a cleaner, better design. But now that
we've seen how much more costly in terms of system
resources during compilation the second approach is
I think the specialization approach might be the way to
go after all, not just for traits, but in general. I'd
still like to measure the compilation performance of the
first alternative to get a more complete picture.

Let me know your thoughts.

Martin

Mime
View raw message