Implement P0138R2, C++17 construction rules for enum class values
authorJakub Jelinek <jakub@redhat.com>
Fri, 23 Sep 2016 17:38:29 +0000 (19:38 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Sep 2016 17:38:29 +0000 (19:38 +0200)
commitd664d76d00b19a61afec13425a9421a62e437505
tree0dab028d22f5c23310e12547c146e8c3c2412cbb
parent24cae8cb9adca74ad4038d2bb55380e486aed8c0
Implement P0138R2, C++17 construction rules for enum class values

Implement P0138R2, C++17 construction rules for enum class values
* cp-tree.h (is_direct_enum_init): Declare.
* decl.c (is_direct_enum_init): New function.
(reshape_init): Use it.
* typeck.c (convert_for_assignment): Likewise.

* g++.dg/cpp1z/direct-enum-init1.C: New test.

From-SVN: r240449
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/direct-enum-init1.C [new file with mode: 0644]