aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit17.C
blob: a4c78bb43ef123bb95713388718517d3ff4194ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// P2647R1 - Permitting static constexpr variables in constexpr functions
// { dg-do compile { target c++23 } }

constexpr char
test ()
{
  static const int x = 5;
  static constexpr char c[] = "Hello World";
  return *(c + x);
}

static_assert (test () == ' ');