incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: implementation of Unary Traits
Date Tue, 01 Jul 2008 20:45:06 GMT
 

Martin Sebor wrote:
>
>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).

I think this is probably long overdue. I should have provided a set of
alternatives and prompted a vote before I committed the traits code, but
I'm sure we'll get it all ironed out.

I'll create a wiki page for this so that we can document what we've come
up with.

>> 
>[...]
>> 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.

Yes, thanks for taking the time to evaluate this. If I had to read the
code I'd prefer to see the first approach, but it does appear that the
second approach (explicit specialization for each cv-qualified type) is
going to reduce compile time costs for us and our users.

>I'd
>still like to measure the compilation performance of the
>first alternative to get a more complete picture.

I'm unclear what approach you are talking about here. Are you talking
about doing more testing of the techniques using the remove_cv<> trait,
or something else?

>
>Let me know your thoughts.
>
>Martin
>

Mime
View raw message