https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91165
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- My reduced test-case is probably very similar: template <typename _Tp> constexpr _Tp forward(_Tp p1) { return p1; } template <typename _T1, typename _T2> struct A { _T1 first; _T2 second; constexpr A(_T1 p1, _T2 p2) : first(p1), second(p2) {} }; template <typename _T1, typename _T2> constexpr A<_T1, _T2> make_pair(_T1 &&p1, _T2 p2) { return A<_T1, _T2>(forward(p1), forward(p2)); } typedef enum { EShLangCount } EShLanguage; class B { A<EShLanguage, int> m_fn1() const; }; const int a = 0; void DecodeLineDirective() { make_pair(a, ""); } A<EShLanguage, int> B::m_fn1() const { make_pair(EShLangCount, ""); }