https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107460
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- <source>: In instantiation of 'Event::Event(EventCat, auto:1) [with auto:1 = int]': <source>:38:32: required from here <source>:30:30: internal compiler error: tree check: expected enumeral_type, have record_type in tsubst_copy, at cp/pt.cc:17024 30 | boundsCheck<EventCat>(a_category, kEventCat_Min); // using "EventCat::kEventCat_Min" instead of just "kEventCat_Min" makes this not fail | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~