Home | History | Annotate | Download | only in dcl.spec.auto

Lines Matching full:decltype

24 decltype(auto) x3d = i;
25 using Int = decltype(x3a);
26 using Int = decltype(x3d);
29 decltype(auto) x4d = (i);
30 using Int = decltype(x4a);
31 using IntLRef = decltype(x4d);
34 decltype(auto) x5d = f();
35 using Int = decltype(x5a);
36 using IntRRef = decltype(x5d);
39 decltype(auto) x6d = { 1, 2 }; // expected-error {{cannot deduce 'decltype(auto)' from initializer list}}
40 using InitListInt = decltype(x6a);
43 decltype(auto) *x7d = &i; // expected-error {{cannot form pointer to 'decltype(auto)'}}
44 using IntPtr = decltype(x7a);
48 decltype(auto) f1();
49 decltype(auto) (*f2)(); // expected-error {{'decltype(auto)' can only be used as a return type in a function declaration}} expected-error {{requires an initializer}}
50 decltype(auto) *f3(); // expected-error {{cannot form pointer to 'decltype(auto)'}}
51 const decltype(auto) f4(); // expected-error {{'decltype(auto)' cannot be combined with other type specifiers}}
52 typedef decltype(auto) f5(); // expected-error {{'decltype(auto)' not allowed in typedef}}
53 decltype(auto) ((((((f6))))())); // ok
54 decltype(auto) f7()(); // expected-error {{'decltype(auto)' can only be used as a return type in a function declaration}} expected-error {{function cannot return function type}}
55 decltype(auto) (S::*f8)(); // expected-error {{'decltype(auto)' can only be used as a return type in a function declaration}} expected-error {{requires an initializer}}
56 decltype(auto) &f9(); // expected-error {{cannot form reference to 'decltype(auto)'}}
57 decltype(auto) (&f10())[10]; // expected-error {{cannot form array of 'decltype(auto)'}}
59 decltype(auto) ((((((v1)))))) = 0; // ok
60 decltype(auto) v2[1] = { 0 }; // expected-error {{cannot form array of 'decltype(auto)'}}
61 decltype(auto) &v3 = { 0 }; // expected-error {{cannot form reference to 'decltype(auto)'}}
62 decltype(auto) *v4 = { 0 }; // expected-error {{cannot form pointer to 'decltype(auto)'}}
63 decltype(auto) v5 = &overloaded_fn; // expected-error {{could not be resolved}}
67 decltype(auto) multi1e = multi1a, multi1f = multi1b; // expected-error {{'decltype(auto)' deduced as 'int' in declaration of 'multi1e' and deduced as 'int &' in declaration of 'multi1f'}}
70 decltype(auto) f1d() { return 0; }
71 using Int = decltype(f1a());
72 using Int = decltype(f1d());
75 decltype(auto) f2d(int n) { return n; }
76 using Int = decltype(f2a(0));
77 using Int = decltype(f2d(0));
80 decltype(auto) f3d(int n) { return (n); } // expected-warning {{reference to stack memory}}
81 using Int = decltype(f3a(0));
82 using IntLRef = decltype(f3d(0));
85 decltype(auto) f4d(int n) { return f(); }
86 using Int = decltype(f4a(0));
87 using IntRRef = decltype(f4d(0));
90 auto f5ad(int n) { decltype(auto) x = f(); return x; }
91 decltype(auto) f5da(int n) { auto x = f(); return x; }
92 decltype(auto) f5dd(int n) { decltype(auto) x = f(); return x; } // expected-error {{rvalue reference to type 'int' cannot bind to lvalue}}
93 using Int = decltype(f5aa(0));
94 using Int = decltype(f5ad(0));
95 using Int = decltype(f5da(0));
98 decltype(auto) init_list_2() { return { 1, 2, 3 }; } // expected-error {{cannot deduce return type from initializer list}}