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: c++0x vs. tr1 type_traits, round 1


Hi,

a couple of quick observations...

+ template<typename _Tp>
+ struct has_trivial_default
+ : public integral_constant<bool, is_pod<_Tp>::value> { };
+
+ template<typename _Tp>
+ struct has_nothrow_default
+ : public integral_constant<bool, is_pod<_Tp>::value> { };


the final names for those facilities are:

   has_trivial_default_constructor
   has_nothrow_default_constructor
   has_trivial_copy_constructor
   has_nothrow_copy_constructor

(I'm going to change all of them to exploit the front-end traits, already available).

In general, these issue about TR1 vs C++0x are nasty. Other traits, for example, are undergoing subtle semantic changes (for example, I implemented __is_base_of consistently with the C++0x semantics and, as you can see, for now, for TR1, I'm adjusting it a bit to the TR1 semantics); likewise for is_convertible_to, which will be different in C+++0x (I'm currently working on the front-end support for it).

I wish we manage to find a decently clean solution, which could also mean separate files...

Paolo.


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