* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / static_assert2.C
blobd602b1e04ce8cafdddb0b0d8132e802a02236db1
1 // { dg-do compile }
2 // { dg-options "-std=gnu++14" }
4 template<typename T>
5   struct is_float
6   {
7     static constexpr bool value = false;
8   };
10 template<>
11   struct is_float<float>
12   {
13     static constexpr bool value = true;
14   };
16 template<typename T>
17   T
18   float_thing(T __x)
19   {
20     static_assert(is_float<T>::value, ""); // { dg-error "static assertion failed" }
21     static_assert(is_float<T>::value); // { dg-error "static assertion failed" }
22     return T();
23   }
25 int
26 main()
28   float_thing(1);