gcc/testsuite/g++.dg/cpp0x/constexpr-friend-3.C
raw| 1 | // PR c++/65977 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<__SIZE_TYPE__> |
| 5 | class bitset; |
| 6 | |
| 7 | template<__SIZE_TYPE__ N> |
| 8 | constexpr bool operator==(const bitset<N>&, const bitset<N>&) noexcept; |
| 9 | |
| 10 | template<__SIZE_TYPE__ N> |
| 11 | class bitset |
| 12 | { |
| 13 | friend constexpr bool operator== <>(const bitset<N>&, |
| 14 | const bitset<N>&) noexcept; |
| 15 | }; |
| 16 | |
| 17 | template<__SIZE_TYPE__ N> |
| 18 | constexpr bool operator==(const bitset<N>&, const bitset<N>&) noexcept |
| 19 | { |
| 20 | return true; |
| 21 | } |