https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30277
--- Comment #4 from Tom Honermann <tom at honermann dot net> --- We recently got bit by this. It is still an issue in latest gcc trunk: $ cat t.cpp enum E : int { e1 = 1 }; constexpr E operator-(E, E) { return (E)99; } typedef struct { E e; E ebf : 16; } S; constexpr S s = { e1, e1 }; static_assert(99 == (int)(s.e-s.e),"Overload resolution failed for non-bit-field"); static_assert(99 == (int)(s.ebf-s.ebf),"Overload resolution failed for bit-field"); $ g++ --version g++ (GCC) 7.0.0 20160721 (experimental) ... $ g++ -c -std=c++11 t.cpp t.cpp:9:14: warning: â<anonymous struct>::ebfâ is too small to hold all values of âenum Eâ E ebf : 16; ^~ t.cpp:13:1: error: static assertion failed: Overload resolution failed for bit-field static_assert(99 == (int)(s.ebf-s.ebf),"Overload resolution failed for bit-field"); ^~~~~~~~~~~~~ (I would love to be able to disable that warning as well: bug 51242)