Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xiangfan-ms/4c1c9e56b48dbaf0cb47316551214152 to your computer and use it in GitHub Desktop.
Save xiangfan-ms/4c1c9e56b48dbaf0cb47316551214152 to your computer and use it in GitHub Desktop.
bug_248669
// This alias template is declared outside of S2 so that 'S1' won't be changed into a base class symbol
template<int i> using S1_alias = typename S1::S0<i>::type;
struct S2 : S1
{
// There is regression that prevents the type replacement from happening when there is a base class symbol
// A base class symbol for 'S1' is injected into the qualified name by the compiler
//template<int i> void f(typename S0<i>::type);
// 'S1' is changed to a base class symbol for 'S1'
//template<int i> void f(typename S1::S0<i>::type);
// Workaround 1
// 'S1' in the alias template specialization is not changed.
//template<int i> void f(S1_alias<i>);
// Workaround 2
// There is no 'S1' injected into the qualified name by the compiler
template<int i> void f(typename S2::S0<i>::type);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment