This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
First, pardons all around if I'm completely repeating what Marc already tried to do. I think I'm taking a different approach. I'm not adding any defaulted or deleted functions, so I don't think I'm changing triviality. Chances are I need to actually delete the copy operations I want to get rid of, though; currently they are defined with a conditional parameter type. That leaves open the possibility of a move operation being implicitly defaulted rather than suppressed, which can make them trivial where they weren't before. I'm not sure whether this has abi impact. In the sense that this is making previously-defined move operations suppressed, maybe. I guess I could alternatively try making them conditional, and making the inverse of the conditional private; that should keep the traits working and retain abi compatibility, because I don't think our toolchains at least on non-Windows platforms include access levels in mangling. Tested for tuple on Linux-x64. Thoughts? 2016-08-30 Ville Voutilainen <ville.voutilainen@gmail.com> Implement LWG 2729 for tuple. * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Suppress conditionally. (_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise. (__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New. (_Tuple_impl(const _Head&)): Constrain. (_Tuple_impl(_UHead&&)): Likewise. (_Tuple_impl(_Tuple_impl&&)): Suppress conditionally. (_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain. (_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise. (operator=(const tuple&)): Enable conditionally. (operator=(tuple&&)): Suppress conditionally. (operator=(const tuple<_UElements...>&)): Constrain. (operator=(tuple<_UElements...>&&)): Likewise. (operator=(const tuple&)): Enable conditionally (2-param tuple). (operator=(tuple&&)): Suppress conditionally (2-param tuple). (operator=(const tuple<_U1, _U2>&)): Constrain. (operator=(tuple<_U1, _U2>&&)): Likewise. (operator=(const pair<_U1, _U2>&)): Likewise. (operator=(pair<_U1, _U2>&&)): Likewise. * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust. * testsuite/20_util/tuple/tuple_traits.cc: New.
Attachment:
lwg2729_tuple.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |