Constrain std::variant constructor for class template argument deduction
authorJason Merrill <jason@redhat.com>
Fri, 14 Jul 2017 19:13:49 +0000 (15:13 -0400)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 14 Jul 2017 19:13:49 +0000 (20:13 +0100)
commit20316b9b2ee5fd60e40a84e64e8715b55092beb6
tree98d5298be92e1ed9201dbc5347653e1c5836120b
parent3b80566699a6474e82a630652bf85cf872128b6d
Constrain std::variant constructor for class template argument deduction

2017-07-14  Jason Merrill  <jason@redhat.com>
    Jonathan Wakely  <jwakely@redhat.com>

* include/std/variant (variant::variant(_Tp&&)): Constrain to remove
the constructor for empty variants from the candidate functions
during class template argument deduction.
* testsuite/20_util/variant/deduction.cc: New.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r250213
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/variant
libstdc++-v3/testsuite/20_util/variant/deduction.cc [new file with mode: 0644]