This is the mail archive of the
mailing list for the libstdc++ project.
Re: functional and type_traits cleanup
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 4 Apr 2013 23:20:20 +0100
- Subject: Re: functional and type_traits cleanup
- References: <515DDF9F dot 1050809 at gmail dot com>
On 4 April 2013 21:16, François Dumont wrote:
> While checking the difference between implementation of
> std::is_copy_constructible and std::is_copy_assignable that I though was
> behaving differently I noticed that std::is_copy_constructible
> implementation was cleaner without using __sfinea_types. So I generalize it
> to 3 other cases and removed __sfinae_types. Tests show that it was used in
> std/functional but for types not used anymore, so I remove them too.
> I also removed several explicit instantiations of integral_constant that
> were useless.
I think this is mostly very good, thanks for cleaning it up.
The indentiation of the closing brace for __is_assignable_helper looks wrong.
Is there a reason that __is_assignable_helper::__test uses a default
template argument but __is_convertible_helper::__test uses
decltype(expr, type) in the function return type? I think the
decltype(__test_aux<_Tp1>(...)) expression would work as a default
template argument too, which I find easier to read because it doesn't
clutter up the return type.