Is
return /* ... */ throw invalid_argument("");
really valid C++11? return /* ... */ throw invalid_argument("");
really valid C++11?[1] http://akrzemi1.wordpress.com/2011/05/06/compile-time-comput...
return a == ALPHA ? x :
a == BETA ? y :
a == GAMMA ? z :
throw ...;
Although that's not a style I'd recommend.