This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: stl_vector.h and vector.tcc


Gabriel Dos Reis wrote:

I don't have a copy of David's book with me right now, but as the
original author of cpp_type_traits.h, I did not put any 'value' there,
and even less put any static data member there.  I used enums.  So, if
it changes then it must be me not noticing.

Indeed, cpp_type_traits.h still uses enums as per your original design! I noticed
some time ago that static const was also a possibility but then read Vandevoorde
and became convinced that enum was definitely the best option!


The case of <type_traits> is different -- the authors of <type_traits>
believe in const static data members for various technical reasons.
That is what the committee adopted.

Yes, I see. When I have some time I really want to discover *why*...

Thanks!
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]