In c++11 code, it would be nice to avoid mentioning a specific enumeration qualifier every time I use an enumeration value - since this is new code and it will be reorganized a lot.
For this purpose, something in the spirit of the last line of this pseudocode is possible:
enum abc { a,b,c }; // some long code of events which returns the enum value auto e = []()->abc{return abc::b;}(); if (e == std::declval(e)::a) { ...
If this is not possible in c++11 , will it become possible in C++14 or 17?
source share