aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-04-23 13:48:18 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-04-23 13:48:18 +0100
commit06715e1cfb475a89b2890951008e70325bdd0ce4 (patch)
treec0de0775fe9a41f20b60738dd6b7b1f4415ea0e6 /gcc
parent82e8c3da7408bc0695511ee13f88d451c8adadd8 (diff)
downloadgcc-06715e1cfb475a89b2890951008e70325bdd0ce4.zip
gcc-06715e1cfb475a89b2890951008e70325bdd0ce4.tar.gz
gcc-06715e1cfb475a89b2890951008e70325bdd0ce4.tar.bz2
PR libstdc++/90165 constrain variant(T&&) constructor
Also refactor some constraints slightly to be more readable. PR libstdc++/90165 * include/std/variant (variant::__not_self): New helper for the is_same_v<remove_cvref_t<T>, variant>==false constraints. (variant::__to_type_impl): Remove. (variant::__to_type): Add default argument to check pack size, instead of using __to_type_impl. (variant::__accepted_type): Add default argument using __not_self. (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers for variant(T&&) constructor constraint. (variant::variant(T&&)): Use __not_in_place_tag in constraints. Extract __accepted_type into a named template parameter for reuse in other constraints and in the exception specification. (variant::variant(in_place_type_t<T>, Args&&...)) (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...)) (variant::variant(in_place_index_t<T>, Args&&...)) (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...)) (variant::operator=T&&)): Remove redundant && from trait arguments. * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor isn't used for in_place_type or in_place_index arguments. From-SVN: r270509
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions