1 // PR c++/47570
2 // { dg-do compile { target c++11 } }
3 
one()4 unsigned int constexpr one()
5 { return 1; }
6 
one_B()7 int constexpr one_B()
8 { return 1; }
9 
main()10 int main()
11 {
12   // FAIL TO COMPILE:
13   static bool constexpr SC_huh1 = ((unsigned int)one()) >= ((unsigned int)0);
14   static bool constexpr SC_huh2 = one() >= ((unsigned int)0);
15   static bool constexpr SC_huh3 = one() >= 0;
16 
17   // COMPILE OK:
18   static bool constexpr SC_huh4 = ((one() == 0) || (one() > 0));
19   static bool constexpr SC_huh5 = one() == 0;
20   static bool constexpr SC_huh6 = one() > 0;
21   static bool constexpr SC_huh7 = one_B() >= 0;
22   static bool constexpr SC_huh8 = one() >= 1;
23 
24   return SC_huh3;
25 }
26