1 // PR c++/14032 2 // { dg-do run } 3 4 template <bool compare> 5 struct outer 6 { 7 template <bool compare_with,bool second> 8 struct inner // unspecialized compare != compare_with 9 { testouter::inner10 static inline bool test() 11 { 12 return false; 13 } 14 }; 15 template <bool second> // specialization compare == compare_with 16 struct inner<compare,second> 17 { 18 static inline bool test() 19 { 20 return true; 21 } 22 }; 23 }; 24 int main () 25 { 26 bool b = outer<true>::inner<true,false>::test(); 27 28 return b != true; 29 } 30