1 // RUN: %clang_cc1 -std=c++2a -verify %s
3 namespace std_example
{
5 const int b
= 0; // expected-note {{here}}
9 int y1
: true ? 8 : a
= 42;
10 int y3
: (true ? 8 : b
) = 42;
11 int z
: 1 || new int { 1 };
13 static_assert(S
{}.x1
== 42);
14 static_assert(S
{}.x2
== 42);
15 static_assert(S
{}.y1
== 0);
16 static_assert(S
{}.y3
== 42);
17 static_assert(S
{}.z
== 0);
20 int y2
: true ? 8 : b
= 42; // expected-error {{cannot assign to variable 'b'}}