#include <exception>
enum Enum {
a,
b
};
constexpr int f (Enum val) {
switch (val){
case a: break;
case b: return 43;
}
std::abort();
}
int main() {
//return f(a);
return 0;
}
(13): error C3615: constexpr function 'f' cannot result in a constant expression
(18): note: failure was caused by call of undefined function or one not declared 'constexpr'
(18): note: see usage of 'abort'
(13): note: failure was caused by control reaching the end of a constexpr function