[v3 PATCH] Implement LWG 2485
2017-10-29 Ville Voutilainen Implement LWG 2485 * include/debug/array (get(const array<_Tp, _Nm>&&)): New. * include/std/array (get(const array<_Tp, _Nm>&&)): Likewise. * include/std/tuple (get(const tuple<_Elements...>&&)): Likewise. (get(const tuple<_Types...>&&)): Likewise. * include/std/utility (__pair_get::__const_move_get(const std::pair<_Tp1, _Tp2>&&)): Likewise. (get(const std::pair<_Tp1, _Tp2>&&)): Likewise. (get(const pair<_Tp, _Up>&&)): Likewise. (get(const pair<_Up, _Tp>&&)): Likewise. * testsuite/20_util/pair/astuple/get.cc: Add tests for new overloads. * testsuite/20_util/pair/astuple/get_by_type.cc: Likewise. * testsuite/20_util/tuple/element_access/get2.cc: Likewise. * testsuite/20_util/tuple/element_access/get2_by_type.cc: Likewise. * testsuite/23_containers/array/tuple_interface/get.cc: Likewise. * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Likewise. lwg2485.diff.bz2 Description: BZip2 compressed data
Re: [v3 PATCH] Implement LWG 2485
On 29 October 2017 at 00:57, Ville Voutilainen wrote: > 2017-10-29 Ville Voutilainen > > Implement LWG 2485 The full testsuite passes on Linux-PPC64. The debug mode tests for array have been run manually on Linux-x64.
Re: [v3 PATCH] Implement LWG 2485
On 29/10/17 12:46 +0200, Ville Voutilainen wrote: On 29 October 2017 at 00:57, Ville Voutilainen wrote: 2017-10-29 Ville Voutilainen Implement LWG 2485 The full testsuite passes on Linux-PPC64. The debug mode tests for array have been run manually on Linux-x64. Looks like there are a couple of Doxygen comments in that don't fit in 80 columns, OK for trunk with those fixed. Thanks. One solution would be to replace the separate comments on the different get overloads with a comment group: /// Return a reference to the ith element of a tuple /// @{ ... define all four overloads // @} It seems fairly self-explanatory to me that if the tuple is a const lvalue the returned reference is const lvalue reference, and if the tuple is a non-const rvalue the returned tuple is ... blah blah.