Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-105050.C

raw
1 // PR c++/105050
2 // { dg-do compile { target c++14 } }
3
4 void g();
5 void h();
6
7 constexpr void f(int* p, int* q) {
8 if (p != q && *p < 0) // { dg-error "neither branch of 'if' is a constant expression" "" { target c++20_down } }
9 g();
10 else
11 h();
12 }