This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Remove deprecated std::has_trivial_xxx traits
- From: Daniel Krügler <daniel dot kruegler at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Jul 2016 20:26:51 +0200
- Subject: Re: Remove deprecated std::has_trivial_xxx traits
- Authentication-results: sourceware.org; auth=none
- References: <20160727182527.GY4264@redhat.com>
2016-07-27 20:25 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> 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.
+1 for removing them.
- Daniel