forked from OSchip/llvm-project
![]() After r264564, we allowed direct-list-initialization of an enum from an integral value in C++1z mode, so long as that value can convert to the enum's underlying type. In this kind of initialization, we need a lvalue-to-rvalue conversion for the initializer value if it is not a rvalue. This lets us accept the following code: enum class A : unsigned {}; A foo(unsigned x) { return A{x}; } Differential Revision: https://reviews.llvm.org/D29723 llvm-svn: 295266 |
||
---|---|---|
.. | ||
dcl.init.aggr | ||
dcl.init.list | ||
dcl.init.ref | ||
dcl.init.string | ||
p5.cpp | ||
p6.cpp | ||
p7.cpp | ||
p14-0x.cpp |