1 // { dg-do assemble } 2 // Source: Neil Booth, from PR # 106. 4 Dec 2000. 3 4 template <bool b> class bar 5 { 6 }; 7 8 class A_a 9 { 10 public: 11 static const bool b = true; 12 }; 13 14 class B_b 15 { 16 public: 17 static const bool b = false; 18 }; 19 20 template <class A, class B> class foo 21 { 22 }; 23 24 template <class A, class B> 25 bar<(A::b || B::b)> do_funky(const foo<A, B>&); 26 main()27int main() 28 { 29 bar<true> a_bar = do_funky(foo<A_a, B_b>()); 30 } 31