Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / static_assert-nomsg.C
blob6f787cde95889fc3bab78e3be8432522e3dfd2ca
1 // { dg-options "-std=c++17" }
3 template<typename T>
4   struct is_float
5   {
6     static constexpr bool value = false;
7   };
9 template<>
10   struct is_float<float>
11   {
12     static constexpr bool value = true;
13   };
15 template<typename T>
16   void
17   float_thing(T __x)
18   {
19     static_assert(is_float<T>::value, ""); // { dg-error "static assertion failed" }
20     static_assert(is_float<T>::value); // { dg-error "static assertion failed" }
21   }
23 int
24 main()
26   float_thing(1);