Lines Matching full:temporary
352 constexpr B b1 { { 1 }, { 2 } }; // expected-note {{temporary created here}}
354 static_assert(&b1.a1.r != &b1.a2.r, ""); // expected-error {{constant expression}} expected-note {{outside the expression that created the temporary}}
356 constexpr B &&b2 { { 3 }, { 4 } }; // expected-note {{temporary created here}}
358 static_assert(&b1.a1 != &b2.a1, ""); // expected-error {{constant expression}} expected-note {{outside the expression that created the temporary}}
360 constexpr thread_local B b3 { { 1 }, { 2 } }; // expected-error {{constant expression}} expected-note {{reference to temporary}} expected-note {{here}}
363 constexpr thread_local B b2 { { 1 }, { 2 } }; // expected-error {{constant expression}} expected-note {{reference to temporary}} expected-note {{here}}
364 constexpr B b3 { { 1 }, { 2 } }; // expected-error {{constant expression}} expected-note {{reference to temporary}} expected-note {{here}}
371 constexpr B b5 = B{ {0}, {0} }; // expected-error {{constant expression}} expected-note {{reference to temporary}} expected-note {{here}}
375 // storage duration temporary, that temporary must itself be initialized
380 constexpr B b = { A(A{0}) }; // expected-error {{constant expression}} expected-note {{reference to temporary}} expected-note {{here}}
861 // The T temporary is implicitly cast to an S subobject, but we can recover the
1165 return const_cast<int&>(r); // expected-note {{read of volatile temporary is not allowed in a constant expression}}
1169 int k : g(0); // expected-error {{constant expression}} expected-note {{temporary created here}} expected-note {{in call to 'g(0)'}}
1401 // The temporary here has static storage duration, so we can bind a constexpr
1407 // The temporary here is not const, so it can't be read outside the expression
1410 constexpr int &&k = 1; // expected-note {{temporary created here}}
1411 constexpr const int l = k; // expected-error {{constant expression}} expected-note {{read of temporary}}
1414 // The temporary here has automatic storage duration, so we can't bind a
1416 constexpr const int &i = 1; // expected-error {{constant expression}} expected-note 2{{temporary}}
1459 // We treat the compound literal as a temporary and refuse to produce a
1462 constexpr int *p = (int*)(int[1]){0}; // expected-warning {{C99}} expected-error {{constant expression}} expected-note 2{{temporary}}
1663 // expected-error@-1 {{taking the address of a temporary}}
1665 // expected-note@-3 {{pointer to temporary is not a constant expression}}
1666 // expected-note@-4 {{temporary created here}}
1792 constexpr S() : r(0), s(get(0)), t(r) {} // expected-warning {{temporary}}
1793 constexpr S(int) : r(0), s(get(0)), t(s) {} // expected-warning {{temporary}} expected-note {{read of object outside its lifetime}}