Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // Test for composite pointer type. | |
2 // { dg-options -std=c++17 } | |
3 | |
4 typedef void (*P)(); | |
5 typedef void (*NP)() noexcept; | |
6 | |
7 void f(); | |
8 void g() noexcept; | |
9 | |
10 bool b; | |
11 | |
12 template <class T, class U> struct Same; | |
13 template <class T> struct Same<T,T> { }; | |
14 | |
15 Same<decltype(b ? &f : &g),P> s; | |
16 | |
17 int main() | |
18 { | |
19 P p = 0; | |
20 NP np = 0; | |
21 | |
22 p == np; | |
23 p != np; | |
24 p < np; | |
25 } |