[patch] Simplify std::tuple helpers and fix C++14 bug.
Daniel Krügler
daniel.kruegler@gmail.com
Thu May 15 05:36:00 GMT 2014
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
More information about the Libstdc++
mailing list