This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Simplify std::tuple helpers and fix C++14 bug.
- 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-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 May 2014 07:36:26 +0200
- Subject: Re: [patch] Simplify std::tuple helpers and fix C++14 bug.
- Authentication-results: sourceware.org; auth=none
- References: <20140514222236 dot GG10556 at redhat dot com>
2014-05-15 0:22 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> I found a bug in the new std::get<Tp>(tuple<Types...>&&) function
> where it didn't compile when trying to access reference member.
>
> The rest of this patch simplifies the code in <tuple> by:
>
> - removing the redundant __add_ref etc. helpers.
> - defining a __tuple_element_t alias template.
> - removing duplication in the tuple_size<cv T> traits.
> - using static_assert in the relational operators.
Looking at the definition of the new alias
__cv_tuple_size
you might want to apply LWG 2313
http://cplusplus.github.io/LWG/lwg-defects.html#2313
and simplify its definition even further.
- Daniel