This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[v3 PATCH] Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg.


Andrzej Krzemienski pointed this out in a discussion related to any and tags.
Our two-element tuple specialization doesn't make the perfect-forwarding
constructor and the allocator constructor properly mutually exclusive; this
patch fixes that.

Tested on Linux-x64, ok for trunk, gcc-6 and gcc-5?

2016-12-18  Ville Voutilainen  <ville.voutilainen@gmail.com>

    Make the perfect-forwarding constructor of a two-element tuple
    sfinae away when the first argument is an allocator_arg.
    * include/std/tuple (tuple(_U1&&, _U2&&)): Constrain.
    * testsuite/20_util/tuple/cons/allocator_with_any.cc: New.
    * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.

Attachment: tuple_alloc_any.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]