blob: 652a08d92bdc8ba1d85fd0164782c3dbd7a43e5c [file] [log] [blame]
// Test for constexpr conversion in case context
// { dg-do compile { target c++11 } }
enum class E { e1, e2 };
struct A
{
E e;
constexpr operator E() { return e; }
constexpr A(E e): e(e) { }
};
E e;
int main()
{
switch (e)
{
case A(E::e1):
case A(E::e2):
;
}
}