Home
last modified time | relevance | path

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

12345678910>>...49

/external/libcxx/test/std/depr/depr.c.headers/
Dmath_h.pass.cpp103 static_assert((std::is_same<decltype(abs((float)0)), float>::value), ""); in test_abs()
104 static_assert((std::is_same<decltype(abs((double)0)), double>::value), ""); in test_abs()
105 static_assert((std::is_same<decltype(abs((long double)0)), long double>::value), ""); in test_abs()
106 static_assert((std::is_same<decltype(abs(Ambiguous())), Ambiguous>::value), ""); in test_abs()
112 static_assert((std::is_same<decltype(acos((float)0)), float>::value), ""); in test_acos()
113 static_assert((std::is_same<decltype(acos((bool)0)), double>::value), ""); in test_acos()
114 static_assert((std::is_same<decltype(acos((unsigned short)0)), double>::value), ""); in test_acos()
115 static_assert((std::is_same<decltype(acos((int)0)), double>::value), ""); in test_acos()
116 static_assert((std::is_same<decltype(acos((unsigned int)0)), double>::value), ""); in test_acos()
117 static_assert((std::is_same<decltype(acos((long)0)), double>::value), ""); in test_acos()
[all …]
Dwchar_h.pass.cpp54 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); in main()
55 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); in main()
56 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); in main()
57 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); in main()
58 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); in main()
59 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); in main()
60 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); in main()
61 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); in main()
62 static_assert((std::is_same<decltype(fgetwc(fp)), wint_t>::value), ""); in main()
63 static_assert((std::is_same<decltype(fgetws(ws, 0, fp)), wchar_t*>::value), ""); in main()
[all …]
Dstdio_h.pass.cpp121 static_assert((std::is_same<decltype(remove("")), int>::value), ""); in main()
122 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); in main()
123 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); in main()
124 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); in main()
125 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); in main()
126 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); in main()
127 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); in main()
128 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); in main()
129 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); in main()
130 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), ""); in main()
[all …]
Dstdlib_h.pass.cpp74 static_assert((std::is_same<decltype(atof("")), double>::value), ""); in main()
75 static_assert((std::is_same<decltype(atoi("")), int>::value), ""); in main()
76 static_assert((std::is_same<decltype(atol("")), long>::value), ""); in main()
77 static_assert((std::is_same<decltype(atoll("")), long long>::value), ""); in main()
78 static_assert((std::is_same<decltype(getenv("")), char*>::value), ""); in main()
79 static_assert((std::is_same<decltype(strtod("", endptr)), double>::value), ""); in main()
80 static_assert((std::is_same<decltype(strtof("", endptr)), float>::value), ""); in main()
81 static_assert((std::is_same<decltype(strtold("", endptr)), long double>::value), ""); in main()
82 static_assert((std::is_same<decltype(strtol("", endptr,0)), long>::value), ""); in main()
83 static_assert((std::is_same<decltype(strtoll("", endptr,0)), long long>::value), ""); in main()
[all …]
Dstring_h.pass.cpp26 static_assert((std::is_same<decltype(memcpy(vp, vpc, s)), void*>::value), ""); in main()
27 static_assert((std::is_same<decltype(memmove(vp, vpc, s)), void*>::value), ""); in main()
28 static_assert((std::is_same<decltype(strcpy(cp, cpc)), char*>::value), ""); in main()
29 static_assert((std::is_same<decltype(strncpy(cp, cpc, s)), char*>::value), ""); in main()
30 static_assert((std::is_same<decltype(strcat(cp, cpc)), char*>::value), ""); in main()
31 static_assert((std::is_same<decltype(strncat(cp, cpc, s)), char*>::value), ""); in main()
32 static_assert((std::is_same<decltype(memcmp(vpc, vpc, s)), int>::value), ""); in main()
33 static_assert((std::is_same<decltype(strcmp(cpc, cpc)), int>::value), ""); in main()
34 static_assert((std::is_same<decltype(strncmp(cpc, cpc, s)), int>::value), ""); in main()
35 static_assert((std::is_same<decltype(strcoll(cpc, cpc)), int>::value), ""); in main()
[all …]
/external/libcxx/test/std/numerics/c.math/
Dcmath.pass.cpp106 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); in test_abs()
107 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); in test_abs()
108 static_assert((std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); in test_abs()
109 static_assert((std::is_same<decltype(abs(Ambiguous())), Ambiguous>::value), ""); in test_abs()
115 static_assert((std::is_same<decltype(std::acos((float)0)), float>::value), ""); in test_acos()
116 static_assert((std::is_same<decltype(std::acos((bool)0)), double>::value), ""); in test_acos()
117 static_assert((std::is_same<decltype(std::acos((unsigned short)0)), double>::value), ""); in test_acos()
118 static_assert((std::is_same<decltype(std::acos((int)0)), double>::value), ""); in test_acos()
119 static_assert((std::is_same<decltype(std::acos((unsigned int)0)), double>::value), ""); in test_acos()
120 static_assert((std::is_same<decltype(std::acos((long)0)), double>::value), ""); in test_acos()
[all …]
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/
Dp7-1y.cpp24 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 …
[all …]
Dp3-1y.cpp6decltype(auto) a = a; // expected-error{{variable 'a' declared with 'decltype(auto)' type cannot a… in f()
7 …if (decltype(auto) b = b) {} // expected-error {{variable 'b' declared with 'decltype(auto)' type … 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/libcxx/test/std/strings/c.strings/
Dcwchar.pass.cpp56 ASSERT_SAME_TYPE(int, decltype(std::fwprintf(fp, L""))); in main()
57 ASSERT_SAME_TYPE(int, decltype(std::fwscanf(fp, L""))); in main()
58 ASSERT_SAME_TYPE(int, decltype(std::swprintf(ws, s, L""))); in main()
59 ASSERT_SAME_TYPE(int, decltype(std::swscanf(L"", L""))); in main()
60 ASSERT_SAME_TYPE(int, decltype(std::vfwprintf(fp, L"", va))); in main()
61 ASSERT_SAME_TYPE(int, decltype(std::vfwscanf(fp, L"", va))); in main()
62 ASSERT_SAME_TYPE(int, decltype(std::vswprintf(ws, s, L"", va))); in main()
63 ASSERT_SAME_TYPE(int, decltype(std::vswscanf(L"", L"", va))); in main()
64 ASSERT_SAME_TYPE(std::wint_t, decltype(std::fgetwc(fp))); in main()
65 ASSERT_SAME_TYPE(wchar_t*, decltype(std::fgetws(ws, 0, fp))); in main()
[all …]
Dcstring.pass.cpp29 ASSERT_SAME_TYPE(void*, decltype(std::memcpy(vp, vpc, s))); in main()
30 ASSERT_SAME_TYPE(void*, decltype(std::memmove(vp, vpc, s))); in main()
31 ASSERT_SAME_TYPE(char*, decltype(std::strcpy(cp, cpc))); in main()
32 ASSERT_SAME_TYPE(char*, decltype(std::strncpy(cp, cpc, s))); in main()
33 ASSERT_SAME_TYPE(char*, decltype(std::strcat(cp, cpc))); in main()
34 ASSERT_SAME_TYPE(char*, decltype(std::strncat(cp, cpc, s))); in main()
35 ASSERT_SAME_TYPE(int, decltype(std::memcmp(vpc, vpc, s))); in main()
36 ASSERT_SAME_TYPE(int, decltype(std::strcmp(cpc, cpc))); in main()
37 ASSERT_SAME_TYPE(int, decltype(std::strncmp(cpc, cpc, s))); in main()
38 ASSERT_SAME_TYPE(int, decltype(std::strcoll(cpc, cpc))); in main()
[all …]
/external/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/
Dallocator_pointers.pass.cpp46 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); in test_pointer()
47 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); in test_pointer()
48 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); in test_pointer()
49 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); in test_pointer()
50 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); in test_pointer()
51 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); in test_pointer()
53 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); in test_pointer()
54 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); in test_pointer()
55 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); in test_pointer()
56 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, ""); in test_pointer()
[all …]
/external/libcxx/test/std/utilities/memory/default.allocator/
Dallocator_pointers.pass.cpp45 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); in test_pointer()
46 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); in test_pointer()
47 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); in test_pointer()
48 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); in test_pointer()
49 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); in test_pointer()
50 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); in test_pointer()
52 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); in test_pointer()
53 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); in test_pointer()
54 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); in test_pointer()
55 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, ""); in test_pointer()
[all …]
/external/libcxx/test/std/language.support/support.runtime/
Dcstdlib.pass.cpp48 static_assert((std::is_same<decltype(obj.quot), IntType>::value), ""); in test_div_struct()
49 static_assert((std::is_same<decltype(obj.rem), IntType>::value), ""); in test_div_struct()
57 static_assert((std::is_same<std::size_t, decltype(sizeof(int))>::value), ""); in main()
62 static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); in main()
63 static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); in main()
64 static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); in main()
65 static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); in main()
66 static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); in main()
67 static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); in main()
68 static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); in main()
[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 …]
/external/libcxx/test/std/input.output/file.streams/c.files/
Dcstdio.pass.cpp101 static_assert((std::is_same<decltype(std::fclose(fp)), int>::value), ""); in main()
102 static_assert((std::is_same<decltype(std::fflush(fp)), int>::value), ""); in main()
103 static_assert((std::is_same<decltype(std::setbuf(fp,cp)), void>::value), ""); in main()
104 static_assert((std::is_same<decltype(std::vfprintf(fp,"",va)), int>::value), ""); in main()
105 static_assert((std::is_same<decltype(std::fprintf(fp," ")), int>::value), ""); in main()
106 static_assert((std::is_same<decltype(std::fscanf(fp,"")), int>::value), ""); in main()
107 static_assert((std::is_same<decltype(std::snprintf(cp,0," ")), int>::value), ""); in main()
108 static_assert((std::is_same<decltype(std::sprintf(cp," ")), int>::value), ""); in main()
109 static_assert((std::is_same<decltype(std::sscanf("","")), int>::value), ""); in main()
110 static_assert((std::is_same<decltype(std::vfprintf(fp,"",va)), int>::value), ""); in main()
[all …]
/external/clang/test/SemaCXX/
Dcxx1y-generic-lambdas.cpp65 return [](auto a) ->decltype(a) { return a; }; in test()
80 return [](auto a) ->decltype(b)* { return (decltype(b)*)0; }; in test()
94 …return [](auto a) ->decltype(b)* { return (decltype(b)*)0; }; //expected-note{{candidate template … in test()
109 return [](auto d) ->decltype(a + b + c + d) { return d; }; in test()
222 auto l2 = [](auto a) ->decltype(auto) { return a; }(2);
267 return [](auto b) ->decltype(a) { in test()
277 auto L = [](auto a) ->decltype(a) { in test()
279 return [](auto b) ->decltype(a) { //expected-error{{no viable conversion}}\ in test()
290 return [](auto ... b) ->decltype(a) { in test()
302 return [](auto ... b) ->decltype(a) { in test()
[all …]
Dopenmp_default_simd_align.cpp6 static const int test1 = __builtin_omp_required_simd_align(decltype(S0::x));
7 auto test2() -> char(&)[__builtin_omp_required_simd_align(decltype(x))];
12 const int test3 = __builtin_omp_required_simd_align(decltype(s1)); // expected-error {{invalid appl…
19 int test4 = __builtin_omp_required_simd_align(decltype(x)); // ok
20 …int test5 = __builtin_omp_required_simd_align(decltype(s)); // expected-error {{invalid applicatio…
23 const int test6 = __builtin_omp_required_simd_align(decltype(S2::x));
24 const int test7 = __builtin_omp_required_simd_align(decltype(S2::s)); // expected-error {{invalid a…
34 static const int test8 = __builtin_omp_required_simd_align(decltype(s2.x));
35 …static const int test9 = __builtin_omp_required_simd_align(decltype(s2.s)); // expected-error {{in…
36 auto test10() -> char(&)[__builtin_omp_required_simd_align(decltype(s2.x))];
[all …]
Dcxx1z-lambda-star-this.cpp86 static_assert(is_same<decltype(this), X*>); in foo()
89 static_assert(is_same<decltype(this), X*>); in foo()
92 static_assert(is_same<decltype(this), X*>); in foo()
98 static_assert(is_same<decltype(this), const X*>); in foo()
100 static_assert(is_same<decltype(this), const X*>); in foo()
102 static_assert(is_same<decltype(this), const X*>); in foo()
106 static_assert(is_same<decltype(this), X*>); in foo()
108 static_assert(is_same<decltype(this), X*>); in foo()
114 static_assert(is_same<decltype(this), const X*>); in foo()
116 static_assert(is_same<decltype(this), const X*>); in foo()
[all …]
/external/clang/test/CodeGenCXX/
Dmangle-exprs.cpp4 typedef decltype(sizeof(int)) size_t;
72 void auto_(decltype(new auto(T()))) { in auto_()
76 void scalar_(decltype(T(), int())) { in scalar_()
116 template <class T> auto a(T t) -> decltype(foo(T())) { return foo(t); } in a()
119 template <class T> auto b(T t) -> decltype((foo)(T())) { return (foo)(t); } in b()
128 template <class T> void a(T x, decltype(x()) y) {} in a()
129 template <class T> auto b(T x) -> decltype(x()) { return x(); } in b()
130 template <class T> void c(T x, void (*p)(decltype(x()))) {} in c()
131 template <class T> void d(T x, auto (*p)() -> decltype(x())) {}
132 template <class T> void e(auto (*p)(T y) -> decltype(y())) {}
[all …]
Dmangle-ms-cxx11.cpp73 namespace std { typedef decltype(__nullptr) nullptr_t; }
103 decltype(Enum) *UseEnum() { return &Enum; } in UseEnum()
104 decltype(BoolEnum) *UseBoolEnum() { return &BoolEnum; } in UseBoolEnum()
105 decltype(CharEnum) *UseCharEnum() { return &CharEnum; } in UseCharEnum()
106 decltype(SCharEnum) *UseSCharEnum() { return &SCharEnum; } in UseSCharEnum()
107 decltype(UCharEnum) *UseUCharEnum() { return &UCharEnum; } in UseUCharEnum()
108 decltype(SShortEnum) *UseSShortEnum() { return &SShortEnum; } in UseSShortEnum()
109 decltype(UShortEnum) *UseUShortEnum() { return &UShortEnum; } in UseUShortEnum()
110 decltype(SIntEnum) *UseSIntEnum() { return &SIntEnum; } in UseSIntEnum()
111 decltype(UIntEnum) *UseUIntEnum() { return &UIntEnum; } in UseUIntEnum()
[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>()));
37 decltype(pd()) s; // ok
38 decltype(pd())::n n; // ok
39 decltype(dd()) *p = new decltype(dd()); // ok
44 decltype(
47 decltype(dd(), // expected-error {{deleted function}}
49 decltype(a(),
51 decltype(
55 decltype(((13, ((dd())))))::n dd_parens; // ok
[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/perfetto/src/tracing/core/
Dtrace_stats.cc67 static_cast<decltype(producers_connected_)>(proto.producers_connected()); in FromProto()
72 static_cast<decltype(producers_seen_)>(proto.producers_seen()); in FromProto()
77 data_sources_registered_ = static_cast<decltype(data_sources_registered_)>( in FromProto()
83 static_cast<decltype(data_sources_seen_)>(proto.data_sources_seen()); in FromProto()
88 static_cast<decltype(tracing_sessions_)>(proto.tracing_sessions()); in FromProto()
92 total_buffers_ = static_cast<decltype(total_buffers_)>(proto.total_buffers()); in FromProto()
97 static_cast<decltype(chunks_discarded_)>(proto.chunks_discarded()); in FromProto()
102 static_cast<decltype(patches_discarded_)>(proto.patches_discarded()); in FromProto()
118 static_cast<decltype(proto->producers_connected())>( in ToProto()
124 static_cast<decltype(proto->producers_seen())>(producers_seen_)); in ToProto()
[all …]
Dtest_config.cc55 message_count_ = static_cast<decltype(message_count_)>(proto.message_count()); in FromProto()
60 max_messages_per_second_ = static_cast<decltype(max_messages_per_second_)>( in FromProto()
64 seed_ = static_cast<decltype(seed_)>(proto.seed()); in FromProto()
68 message_size_ = static_cast<decltype(message_size_)>(proto.message_size()); in FromProto()
73 send_batch_on_register_ = static_cast<decltype(send_batch_on_register_)>( in FromProto()
86 static_cast<decltype(proto->message_count())>(message_count_)); in ToProto()
92 static_cast<decltype(proto->max_messages_per_second())>( in ToProto()
96 proto->set_seed(static_cast<decltype(proto->seed())>(seed_)); in ToProto()
101 static_cast<decltype(proto->message_size())>(message_size_)); in ToProto()
107 static_cast<decltype(proto->send_batch_on_register())>( in ToProto()
[all …]
/external/libcxx/test/std/strings/basic.string/string.cons/
Dimplicit_deduction_guides.pass.cpp64 ASSERT_SAME_TYPE(decltype(s), std::string); in main()
68 ASSERT_SAME_TYPE(decltype(w), std::wstring); in main()
73 ASSERT_SAME_TYPE(decltype(s), BStr<char,test_allocator<char>>); in main()
77 ASSERT_SAME_TYPE(decltype(w), BStr<wchar_t, test_allocator<wchar_t>>); in main()
83 ASSERT_SAME_TYPE(decltype(s), std::string); in main()
91 ASSERT_SAME_TYPE(decltype(w), WStr); in main()
97 ASSERT_SAME_TYPE(decltype(s), std::string); in main()
105 ASSERT_SAME_TYPE(decltype(w), WStr); in main()
111 ASSERT_SAME_TYPE(decltype(s), std::string); in main()
119 ASSERT_SAME_TYPE(decltype(w), WStr); in main()
[all …]

12345678910>>...49