Home
last modified time | relevance | path

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

12345678910>>...130

/external/llvm-project/libcxx/test/std/depr/depr.c.headers/
Dmath_h.pass.cpp101 template <class T, class = decltype(::abs(std::declval<T>()))>
107 struct has_abs : decltype(has_abs_imp<T>(0)) {};
115 static_assert((std::is_same<decltype(abs((float)0)), float>::value), ""); in test_abs()
116 static_assert((std::is_same<decltype(abs((double)0)), double>::value), ""); in test_abs()
118 (std::is_same<decltype(abs((long double)0)), long double>::value), ""); in test_abs()
119 static_assert((std::is_same<decltype(abs((int)0)), int>::value), ""); in test_abs()
120 static_assert((std::is_same<decltype(abs((long)0)), long>::value), ""); in test_abs()
121 static_assert((std::is_same<decltype(abs((long long)0)), long long>::value), in test_abs()
123 static_assert((std::is_same<decltype(abs((unsigned char)0)), int>::value), in test_abs()
125 static_assert((std::is_same<decltype(abs((unsigned short)0)), int>::value), in test_abs()
[all …]
Dwchar_h.pass.cpp56 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); in main()
57 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); in main()
58 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); in main()
59 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); in main()
60 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); in main()
61 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); in main()
62 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); in main()
63 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); in main()
64 static_assert((std::is_same<decltype(fgetwc(fp)), wint_t>::value), ""); in main()
65 static_assert((std::is_same<decltype(fgetws(ws, 0, fp)), wchar_t*>::value), ""); in main()
[all …]
Dstdlib_h.pass.cpp67 template <class T, class = decltype(::abs(std::declval<T>()))>
73 struct has_abs : decltype(has_abs_imp<T>(0)) {};
80 static_assert((std::is_same<decltype(abs((float)0)), float>::value), ""); in test_abs()
81 static_assert((std::is_same<decltype(abs((double)0)), double>::value), ""); in test_abs()
83 (std::is_same<decltype(abs((long double)0)), long double>::value), ""); in test_abs()
84 static_assert((std::is_same<decltype(abs((int)0)), int>::value), ""); in test_abs()
85 static_assert((std::is_same<decltype(abs((long)0)), long>::value), ""); in test_abs()
86 static_assert((std::is_same<decltype(abs((long long)0)), long long>::value), in test_abs()
88 static_assert((std::is_same<decltype(abs((unsigned char)0)), int>::value), in test_abs()
90 static_assert((std::is_same<decltype(abs((unsigned short)0)), int>::value), in test_abs()
[all …]
Dstdio_h.pass.cpp120 static_assert((std::is_same<decltype(remove("")), int>::value), ""); in main()
121 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); in main()
122 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); in main()
123 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); in main()
124 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); in main()
125 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); in main()
126 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); in main()
127 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); in main()
128 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); in main()
129 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), ""); in main()
[all …]
/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 …]
/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/llvm-project/libcxx/test/std/numerics/c.math/
Dcmath.pass.cpp103 template <class T, class = decltype(std::abs(std::declval<T>()))>
109 struct has_abs : decltype(has_abs_imp<T>(0)) {};
116 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); in test_abs()
117 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); in test_abs()
119 (std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); in test_abs()
120 static_assert((std::is_same<decltype(std::abs((int)0)), int>::value), ""); in test_abs()
121 static_assert((std::is_same<decltype(std::abs((long)0)), long>::value), ""); in test_abs()
122 static_assert((std::is_same<decltype(std::abs((long long)0)), long long>::value), in test_abs()
124 static_assert((std::is_same<decltype(std::abs((unsigned char)0)), int>::value), in test_abs()
126 static_assert((std::is_same<decltype(std::abs((unsigned short)0)), int>::value), in test_abs()
[all …]
/external/llvm-project/clang/test/CXX/dcl/dcl.fct/
Dp17.cpp9 decltype(auto) f1(auto x) { return x; } in f1()
10 static_assert(is_same_v<decltype(f1(1)), int>);
11 static_assert(is_same_v<decltype(f1('c')), char>);
13 decltype(auto) f2(auto &x) { return x; } in f2()
16 static_assert(is_same_v<decltype(f2(1)), int &>); // expected-error{{no matching}}
17 static_assert(is_same_v<decltype(f2('c')), char &>); // expected-error{{no matching}}
19 decltype(auto) f3(const auto &x) { return x; } in f3()
20 static_assert(is_same_v<decltype(f3(1)), const int &>);
21 static_assert(is_same_v<decltype(f3('c')), const char &>);
23decltype(auto) f4(auto (*x)(auto y)) { return x; } // expected-error{{'auto' not allowed in functi… in f4()
[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 …]
/external/llvm-project/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 …]
/external/llvm-project/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 …]
/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 …]
/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/llvm-project/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/llvm-project/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/llvm-project/libcxx/test/std/language.support/support.runtime/
Dcstdlib.pass.cpp47 static_assert((std::is_same<decltype(obj.quot), IntType>::value), ""); in test_div_struct()
48 static_assert((std::is_same<decltype(obj.rem), IntType>::value), ""); in test_div_struct()
52 template <class T, class = decltype(std::abs(std::declval<T>()))>
58 struct has_abs : decltype(has_abs_imp<T>(0)) {};
65 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); in test_abs()
66 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); in test_abs()
68 (std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); in test_abs()
69 static_assert((std::is_same<decltype(std::abs((int)0)), int>::value), ""); in test_abs()
70 static_assert((std::is_same<decltype(std::abs((long)0)), long>::value), ""); in test_abs()
71 static_assert((std::is_same<decltype(std::abs((long long)0)), long long>::value), in test_abs()
[all …]
/external/llvm-project/clang/test/CXX/dcl.decl/dcl.decomp/
Dp4.cpp84 same<decltype(m), int>(); in test()
98 same<decltype(i), int>(); in e()
99 same<decltype(r), int&>(); in e()
100 same<decltype(f), const float>(); in e()
101 same<decltype(mvi), volatile int>(); in e()
103 same<decltype((i)), int&>(); in e()
104 same<decltype((r)), int&>(); in e()
105 same<decltype((f)), const float&>(); in e()
106 same<decltype((mvi)), volatile int&>(); in e()
111 same<decltype(i), int>(); in f()
[all …]
/external/llvm-project/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/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/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/llvm-project/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 …]

12345678910>>...130