blob: 7c77a8d63df632784b4455bbe53883e852e609c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Test for static_cast.
// { dg-options -std=c++17 }
void f()
{
typedef void (*P)();
typedef void (*NP)() noexcept;
P p;
NP np;
static_cast<P>(np);
static_cast<NP>(p); // { dg-error "" }
}
|