/external/libcxx/test/std/depr/depr.c.headers/ |
D | math_h.pass.cpp | 22 static_assert((std::is_same<decltype(acos((double)0)), double>::value), ""); in test_acos() 23 static_assert((std::is_same<decltype(acosf(0)), float>::value), ""); in test_acos() 24 static_assert((std::is_same<decltype(acosl(0)), long double>::value), ""); in test_acos() 30 static_assert((std::is_same<decltype(asin((double)0)), double>::value), ""); in test_asin() 31 static_assert((std::is_same<decltype(asinf(0)), float>::value), ""); in test_asin() 32 static_assert((std::is_same<decltype(asinl(0)), long double>::value), ""); in test_asin() 38 static_assert((std::is_same<decltype(atan((double)0)), double>::value), ""); in test_atan() 39 static_assert((std::is_same<decltype(atanf(0)), float>::value), ""); in test_atan() 40 static_assert((std::is_same<decltype(atanl(0)), long double>::value), ""); in test_atan() 46 static_assert((std::is_same<decltype(atan2((double)0, (double)0)), double>::value), ""); in test_atan2() [all …]
|
D | wchar_h.pass.cpp | 45 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); in main() 46 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); in main() 47 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); in main() 48 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); in main() 49 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); in main() 50 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); in main() 51 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); in main() 52 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); in main() 53 static_assert((std::is_same<decltype(vwprintf(L"", va)), int>::value), ""); in main() 54 static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), ""); in main() [all …]
|
D | stdio_h.pass.cpp | 90 static_assert((std::is_same<decltype(remove("")), int>::value), ""); in main() 91 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); in main() 92 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); in main() 93 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); in main() 94 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); in main() 95 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); in main() 96 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); in main() 97 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); in main() 98 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); in main() 99 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), ""); in main() [all …]
|
D | stdlib_h.pass.cpp | 42 static_assert((std::is_same<decltype(atof("")), double>::value), ""); in main() 43 static_assert((std::is_same<decltype(atoi("")), int>::value), ""); in main() 44 static_assert((std::is_same<decltype(atol("")), long>::value), ""); in main() 45 static_assert((std::is_same<decltype(atoll("")), long long>::value), ""); in main() 46 static_assert((std::is_same<decltype(getenv("")), char*>::value), ""); in main() 47 static_assert((std::is_same<decltype(strtod("", endptr)), double>::value), ""); in main() 48 static_assert((std::is_same<decltype(strtof("", endptr)), float>::value), ""); in main() 49 static_assert((std::is_same<decltype(strtold("", endptr)), long double>::value), ""); in main() 50 static_assert((std::is_same<decltype(strtol("", endptr,0)), long>::value), ""); in main() 51 static_assert((std::is_same<decltype(strtoll("", endptr,0)), long long>::value), ""); in main() [all …]
|
D | string_h.pass.cpp | 26 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 …]
|
D | wctype_h.pass.cpp | 96 static_assert((std::is_same<decltype(iswalnum(w)), int>::value), ""); in main() 97 static_assert((std::is_same<decltype(iswalpha(w)), int>::value), ""); in main() 98 static_assert((std::is_same<decltype(iswblank(w)), int>::value), ""); in main() 99 static_assert((std::is_same<decltype(iswcntrl(w)), int>::value), ""); in main() 100 static_assert((std::is_same<decltype(iswdigit(w)), int>::value), ""); in main() 101 static_assert((std::is_same<decltype(iswgraph(w)), int>::value), ""); in main() 102 static_assert((std::is_same<decltype(iswlower(w)), int>::value), ""); in main() 103 static_assert((std::is_same<decltype(iswprint(w)), int>::value), ""); in main() 104 static_assert((std::is_same<decltype(iswpunct(w)), int>::value), ""); in main() 105 static_assert((std::is_same<decltype(iswspace(w)), int>::value), ""); in main() [all …]
|
D | ctype_h.pass.cpp | 74 static_assert((std::is_same<decltype(isalnum(0)), int>::value), ""); in main() 75 static_assert((std::is_same<decltype(isalpha(0)), int>::value), ""); in main() 76 static_assert((std::is_same<decltype(isblank(0)), int>::value), ""); in main() 77 static_assert((std::is_same<decltype(iscntrl(0)), int>::value), ""); in main() 78 static_assert((std::is_same<decltype(isdigit(0)), int>::value), ""); in main() 79 static_assert((std::is_same<decltype(isgraph(0)), int>::value), ""); in main() 80 static_assert((std::is_same<decltype(islower(0)), int>::value), ""); in main() 81 static_assert((std::is_same<decltype(isprint(0)), int>::value), ""); in main() 82 static_assert((std::is_same<decltype(ispunct(0)), int>::value), ""); in main() 83 static_assert((std::is_same<decltype(isspace(0)), int>::value), ""); in main() [all …]
|
/external/libcxx/test/std/numerics/c.math/ |
D | cmath.pass.cpp | 105 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); in test_abs() 106 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); in test_abs() 107 static_assert((std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); in test_abs() 108 static_assert((std::is_same<decltype(abs(Ambiguous())), Ambiguous>::value), ""); in test_abs() 114 static_assert((std::is_same<decltype(std::acos((float)0)), float>::value), ""); in test_acos() 115 static_assert((std::is_same<decltype(std::acos((bool)0)), double>::value), ""); in test_acos() 116 static_assert((std::is_same<decltype(std::acos((unsigned short)0)), double>::value), ""); in test_acos() 117 static_assert((std::is_same<decltype(std::acos((int)0)), double>::value), ""); in test_acos() 118 static_assert((std::is_same<decltype(std::acos((unsigned int)0)), double>::value), ""); in test_acos() 119 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/ |
D | p7-1y.cpp | 21 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 …]
|
D | p3-1y.cpp | 6 …decltype(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() 8 …decltype(auto) c = ({ decltype(auto) d = c; 0; }); // expected-error {{variable 'c' declared with … in f() 12 …decltype(auto) a; // expected-error{{declaration of variable 'a' with type 'decltype(auto)' requir… in g() 14 …decltype(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/utilities/memory/default.allocator/ |
D | allocator_pointers.pass.cpp | 40 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); in test_pointer() 41 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); in test_pointer() 42 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); in test_pointer() 43 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); in test_pointer() 44 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); in test_pointer() 45 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); in test_pointer() 47 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); in test_pointer() 48 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); in test_pointer() 49 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); in test_pointer() 50 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, ""); in test_pointer() [all …]
|
/external/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/ |
D | allocator_pointers.pass.cpp | 41 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); in test_pointer() 42 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); in test_pointer() 43 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); in test_pointer() 44 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); in test_pointer() 45 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() 48 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); in test_pointer() 49 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); in test_pointer() 50 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); in test_pointer() 51 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, ""); in test_pointer() [all …]
|
/external/libcxx/test/std/strings/c.strings/ |
D | cwchar.pass.cpp | 45 static_assert((std::is_same<decltype(std::fwprintf(fp, L"")), int>::value), ""); in main() 46 static_assert((std::is_same<decltype(std::fwscanf(fp, L"")), int>::value), ""); in main() 47 static_assert((std::is_same<decltype(std::swprintf(ws, s, L"")), int>::value), ""); in main() 48 static_assert((std::is_same<decltype(std::swscanf(L"", L"")), int>::value), ""); in main() 49 static_assert((std::is_same<decltype(std::vfwprintf(fp, L"", va)), int>::value), ""); in main() 50 static_assert((std::is_same<decltype(std::vfwscanf(fp, L"", va)), int>::value), ""); in main() 51 static_assert((std::is_same<decltype(std::vswprintf(ws, s, L"", va)), int>::value), ""); in main() 52 static_assert((std::is_same<decltype(std::vswscanf(L"", L"", va)), int>::value), ""); in main() 53 static_assert((std::is_same<decltype(std::vwprintf(L"", va)), int>::value), ""); in main() 54 static_assert((std::is_same<decltype(std::vwscanf(L"", va)), int>::value), ""); in main() [all …]
|
D | cstring.pass.cpp | 26 static_assert((std::is_same<decltype(std::memcpy(vp, vpc, s)), void*>::value), ""); in main() 27 static_assert((std::is_same<decltype(std::memmove(vp, vpc, s)), void*>::value), ""); in main() 28 static_assert((std::is_same<decltype(std::strcpy(cp, cpc)), char*>::value), ""); in main() 29 static_assert((std::is_same<decltype(std::strncpy(cp, cpc, s)), char*>::value), ""); in main() 30 static_assert((std::is_same<decltype(std::strcat(cp, cpc)), char*>::value), ""); in main() 31 static_assert((std::is_same<decltype(std::strncat(cp, cpc, s)), char*>::value), ""); in main() 32 static_assert((std::is_same<decltype(std::memcmp(vpc, vpc, s)), int>::value), ""); in main() 33 static_assert((std::is_same<decltype(std::strcmp(cpc, cpc)), int>::value), ""); in main() 34 static_assert((std::is_same<decltype(std::strncmp(cpc, cpc, s)), int>::value), ""); in main() 35 static_assert((std::is_same<decltype(std::strcoll(cpc, cpc)), int>::value), ""); in main() [all …]
|
D | cwctype.pass.cpp | 96 static_assert((std::is_same<decltype(std::iswalnum(w)), int>::value), ""); in main() 97 static_assert((std::is_same<decltype(std::iswalpha(w)), int>::value), ""); in main() 98 static_assert((std::is_same<decltype(std::iswblank(w)), int>::value), ""); in main() 99 static_assert((std::is_same<decltype(std::iswcntrl(w)), int>::value), ""); in main() 100 static_assert((std::is_same<decltype(std::iswdigit(w)), int>::value), ""); in main() 101 static_assert((std::is_same<decltype(std::iswgraph(w)), int>::value), ""); in main() 102 static_assert((std::is_same<decltype(std::iswlower(w)), int>::value), ""); in main() 103 static_assert((std::is_same<decltype(std::iswprint(w)), int>::value), ""); in main() 104 static_assert((std::is_same<decltype(std::iswpunct(w)), int>::value), ""); in main() 105 static_assert((std::is_same<decltype(std::iswspace(w)), int>::value), ""); in main() [all …]
|
/external/clang/test/CXX/expr/expr.prim/expr.prim.general/ |
D | p8-0x.cpp | 23 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/language.support/support.runtime/ |
D | cstdlib.pass.cpp | 42 static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); in main() 43 static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); in main() 44 static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); in main() 45 static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); in main() 46 static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); in main() 47 static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); in main() 48 static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); in main() 49 static_assert((std::is_same<decltype(std::strtold("", endptr)), long double>::value), ""); in main() 50 static_assert((std::is_same<decltype(std::strtol("", endptr,0)), long>::value), ""); in main() 51 static_assert((std::is_same<decltype(std::strtoll("", endptr,0)), long long>::value), ""); in main() [all …]
|
/external/libcxx/test/std/input.output/file.streams/c.files/ |
D | cstdio.pass.cpp | 91 static_assert((std::is_same<decltype(std::remove("")), int>::value), ""); in main() 92 static_assert((std::is_same<decltype(std::rename("","")), int>::value), ""); in main() 93 static_assert((std::is_same<decltype(std::tmpfile()), std::FILE*>::value), ""); in main() 94 static_assert((std::is_same<decltype(std::tmpnam(cp)), char*>::value), ""); in main() 95 static_assert((std::is_same<decltype(std::fclose(fp)), int>::value), ""); in main() 96 static_assert((std::is_same<decltype(std::fflush(fp)), int>::value), ""); in main() 97 static_assert((std::is_same<decltype(std::fopen("", "")), std::FILE*>::value), ""); in main() 98 static_assert((std::is_same<decltype(std::freopen("", "", fp)), std::FILE*>::value), ""); in main() 99 static_assert((std::is_same<decltype(std::setbuf(fp,cp)), void>::value), ""); in main() 100 static_assert((std::is_same<decltype(std::vfprintf(fp,"",va)), int>::value), ""); in main() [all …]
|
/external/clang/test/SemaCXX/ |
D | cxx1y-generic-lambdas.cpp | 65 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 …]
|
D | decltype.cpp | 6 decltype(0, f0()) i = 0; in f0_test() 24 auto call(F&& fn) -> decltype(fn(T())) { in call() 29 auto then(F&& fn) -> decltype(call(fn)) in then() 42 A(decltype(nullptr) param); 47 template<typename T> auto f(T t) -> decltype(S<int>(t)) { in f() 48 using U = decltype(S<int>(t)); in f() 54 B(decltype(undeclared)); // expected-error {{undeclared identifier}} 57 C(decltype(undeclared; // expected-error {{undeclared identifier}} \ 64 static decltype(T{}, U{}) &f(); 72 decltype(f()) *a; // ok, function call [all …]
|
/external/clang/test/CXX/special/class.dtor/ |
D | p10-0x.cpp | 8 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/ |
D | p5-cxx0x.cpp | 8 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/CodeGenCXX/ |
D | mangle-exprs.cpp | 4 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 …]
|
D | mangle-ms-cxx11.cpp | 73 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/expr/expr.prim/expr.prim.lambda/ |
D | p18.cpp | 21 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 …]
|