gcc/testsuite/g++.dg/cpp0x/pr107065.C
raw| 1 | // PR c++/107065 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<class, class> struct is_same { static constexpr bool value = false; }; |
| 5 | template<class T> struct is_same<T, T> { static constexpr bool value = true; }; |
| 6 | |
| 7 | int |
| 8 | main () |
| 9 | { |
| 10 | bool b = true; |
| 11 | static_assert (is_same<decltype (!(!b)), bool>::value, ""); |
| 12 | auto bb = (!(!b)); |
| 13 | static_assert (is_same<decltype (bb), bool>::value, ""); |
| 14 | } |