1 // PR c++/65882 2 // PR c++/66467 3 // { dg-do compile } 4 5 template <bool> 6 struct A 7 { 8 typedef int type; 9 }; 10 11 struct B 12 { 13 static const int value = 0; 14 }; 15 16 template <class> 17 struct C 18 { 19 typedef int type; 20 }; 21 22 template <class> 23 struct F : B {}; 24 25 class D 26 { 27 template <class Expr> 28 typename A<F<typename C<Expr>::type>::value || B::value>::type 29 operator=(Expr); // { dg-message "declared" } 30 }; 31 fn1()32void fn1() 33 { 34 D opt; 35 opt = 0; // { dg-error "private" } 36 } 37