Home
last modified time | relevance | path

Searched refs:decltype (Results 1 – 25 of 156) sorted by relevance

1234567

/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/
Dp7-1y.cpp21 decltype(auto) x3d = i;
22 using Int = decltype(x3a);
23 using Int = decltype(x3d);
26 decltype(auto) x4d = (i);
27 using Int = decltype(x4a);
28 using IntLRef = decltype(x4d);
31 decltype(auto) x5d = f();
32 using Int = decltype(x5a);
33 using IntRRef = decltype(x5d);
36 decltype(auto) x6d = { 1, 2 }; // expected-error {{cannot deduce 'decltype(auto)' from initializer …
[all …]
Dp3-1y.cpp6decltype(auto) a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in i… in f()
7 …if (decltype(auto) b = b) {} // expected-error {{variable 'b' declared with 'auto' type cannot app… in f()
8decltype(auto) c = ({ decltype(auto) d = c; 0; }); // expected-error {{variable 'c' declared with … in f()
12decltype(auto) a; // expected-error{{declaration of variable 'a' with type 'decltype(auto)' requir… in g()
14decltype(auto) *b; // expected-error{{cannot form pointer to 'decltype(auto)'}} expected-error{{de… in g()
16 if (decltype(auto) b) {} // expected-error {{must have an initializer}} in g()
17 for (;decltype(auto) b;) {} // expected-error {{must have an initializer}} in g()
18 while (decltype(auto) b) {} // expected-error {{must have an initializer}} in g()
19 if (decltype(auto) b = true) { (void)b; } in g()
22 decltype(auto) n(1,2,3); // expected-error{{initializer for variable 'n' with type 'decltype(auto)'…
[all …]
/external/clang/test/CXX/expr/expr.prim/expr.prim.general/
Dp8-0x.cpp23 operator decltype(outer::middle::inner()) ();
24 operator decltype(outer::middle())::inner2 ();
25 operator decltype(outer())::middle::inner3 ();
26 str(int (decltype(outer::middle::inner())::*n)(),
27 int (decltype(outer::middle())::inner::*o)(),
28 int (decltype(outer())::middle::inner::*p)());
31 decltype(outer::middle::inner()) a;
33 …a.decltype(outer::middle())::mfunc(); // expected-error{{'PR10127::outer::middle::mfunc' is not a … in scope()
34 a.decltype(outer::middle::inner())::func(); in scope()
35 a.decltype(outer::middle())::inner::func(); in scope()
[all …]
Dp3-0x.cpp8 auto g1() noexcept(noexcept(f(ptr))) -> decltype(f(this->ptr));
9 auto g2() const noexcept(noexcept(f((*this).ptr))) -> decltype(f(ptr));
21 template<class T> auto f(T t) -> decltype(t + g()) in f()
25 template auto B::f(int t) -> decltype(t + g());
33 auto g1() noexcept(noexcept(f(ptr))) -> decltype(f(ptr));
34 auto g2() const noexcept(noexcept(f(((this))->ptr))) -> decltype(f(ptr));
35 auto g3() noexcept(noexcept(f(this->ptr))) -> decltype(f((*this).ptr));
36 auto g4() const noexcept(noexcept(f(((this))->ptr))) -> decltype(f(this->ptr));
37 auto g5() noexcept(noexcept(this->f(ptr))) -> decltype(this->f(ptr));
38 auto g6() const noexcept(noexcept(this->f(((this))->ptr))) -> decltype(this->f(ptr));
[all …]
/external/clang/test/CXX/special/class.dtor/
Dp10-0x.cpp8 x->~decltype(T())(); in b()
9 …x->~decltype(*x)(); // expected-error{{the type of object expression ('const int') does not match … in b()
11 x->~decltype(int())(); // expected-error{{no member named '~int' in 'A'}} in b()
13 …y->~decltype(*y)(); // expected-error{{destructor type 'decltype(*y)' (aka 'const A &') in object … in b()
14 …y->~decltype(T())(); // expected-error{{destructor type 'decltype(T())' in object destruction expr… in b()
15 y->~decltype(A())(); in b()
20 x->~decltype(A())(); in a()
21 …x->~decltype(*x)(); // expected-error{{destructor type 'decltype(*x)' (aka 'const A &') in object … in a()
22 x->~decltype()(); // expected-error{{expected expression}} in a()
23 …x->~decltype(B())(); // expected-error{{destructor type 'decltype(B())' (aka 'B') in object destru… in a()
[all …]
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/
Dp5-cxx0x.cpp8 template<class T> auto f(T) -> decltype(i(h<T>())); // #1
13 template<class T> auto q(T) -> decltype((h<T>()));
34 decltype(PD()) s; // ok
35 decltype(PD())::n n; // ok
36 decltype(DD()) *p = new decltype(DD()); // ok
40 decltype(
43 decltype(DD(), // expected-error {{deleted function}}
45 decltype(A(),
47 decltype(
51 decltype(((13, ((DD())))))::n dd_parens; // ok
[all …]
Dp4-cxx0x.cpp18 static_assert(is_same<decltype(foo()), const int&&>::value, "");
19 static_assert(is_same<decltype(i), int>::value, "");
20 static_assert(is_same<decltype(a->x), double>::value, "");
21 static_assert(is_same<decltype((a->x)), const double&>::value, "");
22 static_assert(is_same<decltype(static_cast<int&&>(i)), int&&>::value, "");
27 decltype(f0) f0_a; // expected-error{{reference to overloaded function could not be resolved; did y…
/external/clang/test/CodeGenCXX/
Dmangle-exprs.cpp4 typedef decltype(sizeof(int)) size_t;
60 void auto_(decltype(new auto(T()))) { in auto_()
64 void scalar_(decltype(T(), int())) { in scalar_()
97 template <class T> auto a(T t) -> decltype(foo(T())) { return foo(t); } in a()
100 template <class T> auto b(T t) -> decltype((foo)(T())) { return (foo)(t); } in b()
109 template <class T> void a(T x, decltype(x()) y) {} in a()
110 template <class T> auto b(T x) -> decltype(x()) { return x(); } in b()
111 template <class T> void c(T x, void (*p)(decltype(x()))) {} in c()
112 template <class T> void d(T x, auto (*p)() -> decltype(x())) {}
113 template <class T> void e(auto (*p)(T y) -> decltype(y())) {}
[all …]
Dmangle.cpp386 template <class T> decltype(((T*) 0)->member) read_member(T& obj) { in read_member()
406 template <class T> decltype(((T*) 0)->Path1::ab) get_ab_1(T &ref) { return ref.Path1::ab; } in get_ab_1()
409 template <class T> decltype(((T*) 0)->Path2::ab) get_ab_2(T &ref) { return ref.Path2::ab; } in get_ab_2()
412 template <class T> decltype(((T*) 0)->Path1::p) get_p_1(T &ref) { return ref.Path1::p; } in get_p_1()
415 template <class T> decltype(((T*) 0)->Path2::p) get_p_2(T &ref) { return ref.Path2::p; } in get_p_2()
617 template <class T> void test0(decltype(f<T*>(0))) {} in test0()
618 template void test0<int>(decltype(f<int*>(0)));
621 template <class T> void test1(decltype(f<>(T()))) {} in test1()
622 template void test1<int>(decltype(f<>(int())));
633 void f(decltype(nullptr)) { } in f()
[all …]
/external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/
Dp18.cpp21 static_assert(is_same<decltype(((r))), float const&>::value, in f3()
23 static_assert(is_same<decltype(x), float>::value, "should be float"); in f3()
24 static_assert(is_same<decltype((x)), const float&>::value, in f3()
26 static_assert(is_same<decltype(r), float&>::value, "should be float&"); in f3()
27 static_assert(is_same<decltype(ir), int&>::value, "should be int&"); in f3()
28 static_assert(is_same<decltype((ir)), int&>::value, "should be int&"); in f3()
29 static_assert(is_same<decltype(irc), const int&>::value, in f3()
31 static_assert(is_same<decltype((irc)), const int&>::value, in f3()
37 static_assert(is_same<decltype(x), float>::value, "should be float"); in f3()
38 static_assert(is_same<decltype((x)), float&>::value, in f3()
[all …]
Dp19.cpp13decltype(lambda1) lambda2; // expected-error{{call to implicitly-deleted default constructor of 'd… in test_special_member_functions()
22 decltype(lambda1) lambda3 = lambda1; in test_special_member_functions()
23 decltype(lambda1) lambda4(lambda1); in test_special_member_functions()
26 decltype(lambda1) lambda5 = move(lambda1); in test_special_member_functions()
27 decltype(lambda1) lambda6(move(lambda1)); in test_special_member_functions()
Dp5.cpp23 const decltype(l) lc = l; in test_quals()
29 const decltype(ml) mlc = ml; in test_quals()
34 volatile decltype(l) lv = l; in test_quals()
35 volatile decltype(ml) mlv = ml; in test_quals()
39 bogus_override_if_virtual<decltype(l)> bogus; in test_quals()
Dp4-1y.cpp4 int &b = [] (int &r) -> decltype(auto) { return r; } (a);
5 int &c = [] (int &r) -> decltype(auto) { return (r); } (a);
8 int &f = [] (int r) -> decltype(auto) { return r; } (a); // expected-error {{cannot bind to a tempo…
9 int &g = [] (int r) -> decltype(auto) { return (r); } (a); // expected-warning {{reference to stack…
Dp11-1y.cpp8 int decltype(capturing_lambda)::*mem_ptr = &decltype(capturing_lambda)::n;
29 (void) [c("bar")] () -> decltype(c) { in hiding()
75 using T = decltype(c); in __anoncf98f07f1202()
83 template<typename T> decltype(auto) move(T &&t) { return static_cast<typename remove_reference<T>::… in move()
/external/clang/test/SemaCXX/
Ddecltype-overloaded-functions.cpp5 decltype(f) a; // expected-error{{reference to overloaded function could not be resolved; did you …
8decltype(T::f) * f; // expected-error {{call to non-static member function without an object argum…
18 template<typename T> struct S { decltype(1) f(); };
19 template<typename T> decltype(1) S<T>::f() { return 1; } in f()
24 template<typename T> struct U { struct A {}; decltype(A{}) f(); };
25 template<typename T> decltype(typename U<T>::A{}) U<T>::f() {} in f()
28 template<typename T> struct V { struct A {}; decltype(typename V<T>::A{}) f(); };
29 template<typename T> decltype(typename V<T>::A{}) V<T>::f() {} in f()
Ddecltype.cpp6 decltype(0, f0()) i = 0; in f0_test()
21 A(decltype(nullptr) param);
26 template<typename T> auto f(T t) -> decltype(S<int>(t)) { in f()
27 using U = decltype(S<int>(t)); in f()
33 B(decltype(undeclared)); // expected-error {{undeclared identifier}}
36 C(decltype(undeclared; // expected-error {{undeclared identifier}} \
44 void foo(conditional<decltype((1),int>) { // expected-note 2 {{to match this '('}} expected-error …
Dtrailing-return-0x.cpp37 auto i(T x) -> decltype(x) in i()
50 auto g(T x, U y) -> decltype(x + y) in g()
58 auto h(T x, U y, V z) -> decltype(x + y + z) in h()
75 auto f1(T t) -> decltype(f1(t)) {} // expected-note{{candidate template ignored}} in f1()
82 auto f2(T t) -> decltype(f2(&t)) {} // expected-note{{candidate template ignored}} in f2()
93 auto f() -> decltype(+*this); // expected-note {{here}}
94 auto f() -> decltype((*this)[0]); // expected-error {{cannot be overloaded}}
101 auto g()->decltype(this->f<0>());
Dcxx11-ast-print.cpp4 auto operator"" _foo(const char *p, decltype(sizeof(int))) -> decltype(nullptr);
7 decltype(""_foo) operator"" _bar(unsigned long long);
10 decltype(42_bar) operator"" _baz(long double);
13 decltype(4.5_baz) operator"" _baz(char);
Ddecltype-this.cpp13 void f() { static_assert(is_same<decltype(this), S*>::value, ""); } in f()
14 void g() const { static_assert(is_same<decltype(this), const S*>::value, ""); } in g()
15 void h() volatile { static_assert(is_same<decltype(this), volatile S*>::value, ""); } in h()
16 void i() const volatile { static_assert(is_same<decltype(this), const volatile S*>::value, ""); } in i()
/external/clang/test/CXX/stmt.stmt/stmt.ambig/
Dp1-0x.cpp31 decltype(T())(a)->m = 7; in func2()
32 decltype(T())(a)++; in func2()
33 decltype(T())(a,5)<<c; in func2()
35 decltype(T())(*d)(int); in func2()
36 decltype(T())(e)[5]; in func2()
37 decltype(T())(f) = {1, 2}; in func2()
38decltype(T())(*g)(double(3)); // expected-error{{cannot initialize a variable of type 'decltype(T(… in func2()
/external/clang/test/CXX/class.derived/
Dp1.cpp24 struct Derived : decltype(Base()) { };
27 struct Derived2 : decltype(func()) { }; // expected-error {{base specifier must name a class}}
30 struct Derived3 : decltype(T().foo()) { };
34 …struct Derived4 : :: decltype(Base()) { }; // expected-error {{unexpected namespace scope prior to…
36 …struct Derived5 : PR11216:: decltype(Base()) { }; // expected-error {{unexpected namespace scope p…
/external/clang/test/CXX/dcl.decl/dcl.meaning/
Dp1-0x.cpp9 int decltype(foo())::i; // expected-error{{'decltype' cannot be used to name a declaration}}
10 void decltype(foo())::func() { // expected-error{{'decltype' cannot be used to name a declaration}} in foo()
21 int decltype(tfoo<T>())::i; // expected-error{{nested name specifier 'decltype(tfoo<T>())::' for de…
23 void decltype(tfoo<T>())::func() { // expected-error{{nested name specifier 'decltype(tfoo<T>())::'… in func()
/external/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/
Dp3.cpp21 extern decltype(a >= a) test1;
22 extern decltype(a >= b) test1;
26 extern decltype(a <= a) test2;
29 extern decltype(a <= b) test3;
/external/clang/test/CXX/temp/temp.type/
Dp1-0x.cpp10 using SameType = decltype(y); // expected-note {{here}}
11 using SameType = decltype(z); // expected-error {{different types}}
21 using SameType = decltype(y);
22 using SameType = decltype(z); // ok
/external/clang/test/CXX/lex/lex.literal/lex.ext/
Dp7.cpp3 using size_t = decltype(sizeof(int));
22 same_type<decltype(v1), long double> test1; in main()
23 same_type<decltype(v2), std::string> test2; in main()
24 same_type<decltype(v3), unsigned> test3; in main()

1234567