This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Remove deprecated std::has_trivial_xxx traits


I propose that we remove the following non-standard traits in GCC 7:

 /// has_trivial_default_constructor (temporary legacy)
 template<typename _Tp>
   struct has_trivial_default_constructor
   : public integral_constant<bool, __has_trivial_constructor(_Tp)>
   { } _GLIBCXX_DEPRECATED;

 /// has_trivial_copy_constructor (temporary legacy)
 template<typename _Tp>
   struct has_trivial_copy_constructor
   : public integral_constant<bool, __has_trivial_copy(_Tp)>
   { } _GLIBCXX_DEPRECATED;

 /// has_trivial_copy_assign (temporary legacy)
 template<typename _Tp>
   struct has_trivial_copy_assign
   : public integral_constant<bool, __has_trivial_assign(_Tp)>
   { } _GLIBCXX_DEPRECATED;

They were in C++0x drafts but were removed before the final C++11
standard, so have never been part of ISO C++. They've been deprecated
since GCC 5.1: https://gcc.gnu.org/gcc-5/changes.html

People who need that functionality can still use the built-ins
directly, we don't need to define non-standard traits.

Alternatively, we could move them to __gnu_cxx, so they don't pollute
the namespace by default, or only define them when __STRICT_ANSI__ is
not defined. I prefer simply removing them.



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