Home
last modified time | relevance | path

Searched refs:static_assert (Results 1 – 25 of 5828) sorted by relevance

12345678910>>...234

/external/webrtc/rtc_base/numerics/
Dsafe_compare_unittest.cc27 static_assert(static_cast<std::uintmax_t>(m1) == umax, "");
28 static_assert(m1 == static_cast<std::intmax_t>(umax), "");
81 static_assert(!SafeEq(-1, 2), ""); in TEST()
82 static_assert(!SafeEq(-1, 2u), ""); in TEST()
83 static_assert(!SafeEq(2, -1), ""); in TEST()
84 static_assert(!SafeEq(2u, -1), ""); in TEST()
86 static_assert(!SafeEq(1, 2), ""); in TEST()
87 static_assert(!SafeEq(1, 2u), ""); in TEST()
88 static_assert(!SafeEq(1u, 2), ""); in TEST()
89 static_assert(!SafeEq(1u, 2u), ""); in TEST()
[all …]
/external/harfbuzz_ng/src/
Dtest-meta.cc35 static_assert (hb_is_convertible (void, void), ""); in main()
36 static_assert (hb_is_convertible (void, const void), ""); in main()
37 static_assert (hb_is_convertible (const void, void), ""); in main()
39 static_assert (hb_is_convertible (int, int), ""); in main()
40 static_assert (hb_is_convertible (char, int), ""); in main()
41 static_assert (hb_is_convertible (long, int), ""); in main()
43 static_assert (hb_is_convertible (int, int), ""); in main()
45 static_assert (hb_is_convertible (const int, int), ""); in main()
46 static_assert (hb_is_convertible (int, const int), ""); in main()
47 static_assert (hb_is_convertible (const int, const int), ""); in main()
[all …]
/external/llvm-project/clang/test/SemaCXX/
Dconstexpr-string.cpp53 static_assert(n == 5);
55 static_assert(wn == 5);
69 static_assert(__builtin_strcmp("abab", "abab") == 0);
70 static_assert(__builtin_strcmp("abab", "abba") == -1);
71 static_assert(__builtin_strcmp("abab", "abaa") == 1);
72 static_assert(__builtin_strcmp("ababa", "abab") == 1);
73 static_assert(__builtin_strcmp("abab", "ababa") == -1);
74 static_assert(__builtin_strcmp("a\203", "a") == 1);
75 static_assert(__builtin_strcmp("a\203", "a\003") == 1);
76 static_assert(__builtin_strcmp("abab\0banana", "abab") == 0);
[all …]
Dcomplex-folding.cpp5 static_assert((0.0 + 0.0j) == (0.0 + 0.0j));
6 static_assert((0.0 + 0.0j) != (0.0 + 0.0j)); // expected-error {{static_assert}}
8 static_assert((0.0 + 0.0j) == 0.0);
9 static_assert(0.0 == (0.0 + 0.0j));
10 static_assert(0.0 == 0.0j);
11 static_assert((0.0 + 1.0j) != 0.0);
12 static_assert(1.0 != (0.0 + 0.0j));
13 static_assert(0.0 != 1.0j);
17 static_assert((1.0 + 0.0j) == (0.0 + 0.0j)); // expected-error {{static_assert}}
18 static_assert((1.0 + 0.0j) == (1.0 + 0.0j));
[all …]
/external/llvm-project/libcxx/test/libcxx/utilities/meta/
Dis_referenceable.pass.cpp24 static_assert((!std::__is_referenceable<void>::value), "");
25 static_assert(( std::__is_referenceable<int>::value), "");
26 static_assert(( std::__is_referenceable<int[3]>::value), "");
27 static_assert(( std::__is_referenceable<int[]>::value), "");
28 static_assert(( std::__is_referenceable<int &>::value), "");
29 static_assert(( std::__is_referenceable<const int &>::value), "");
30 static_assert(( std::__is_referenceable<int *>::value), "");
31 static_assert(( std::__is_referenceable<const int *>::value), "");
32 static_assert(( std::__is_referenceable<Foo>::value), "");
33 static_assert(( std::__is_referenceable<const Foo>::value), "");
[all …]
/external/libcxx/test/libcxx/utilities/meta/
Dis_referenceable.pass.cpp25 static_assert((!std::__is_referenceable<void>::value), "");
26 static_assert(( std::__is_referenceable<int>::value), "");
27 static_assert(( std::__is_referenceable<int[3]>::value), "");
28 static_assert(( std::__is_referenceable<int[]>::value), "");
29 static_assert(( std::__is_referenceable<int &>::value), "");
30 static_assert(( std::__is_referenceable<const int &>::value), "");
31 static_assert(( std::__is_referenceable<int *>::value), "");
32 static_assert(( std::__is_referenceable<const int *>::value), "");
33 static_assert(( std::__is_referenceable<Foo>::value), "");
34 static_assert(( std::__is_referenceable<const Foo>::value), "");
[all …]
/external/llvm-project/libcxx/test/std/depr/depr.c.headers/
Dmath_h.pass.cpp115 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()
117 static_assert( 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()
128 static_assert((std::is_same<decltype(abs(Ambiguous())), Ambiguous>::value), in test_abs()
131 static_assert(!has_abs<unsigned>::value, ""); in test_abs()
[all …]
Dstdint_h.pass.cpp25 static_assert(sizeof(int8_t)*CHAR_BIT == 8, in main()
27 static_assert(std::is_signed<int8_t>::value, in main()
30 static_assert(sizeof(int16_t)*CHAR_BIT == 16, in main()
32 static_assert(std::is_signed<int16_t>::value, in main()
35 static_assert(sizeof(int32_t)*CHAR_BIT == 32, in main()
37 static_assert(std::is_signed<int32_t>::value, in main()
40 static_assert(sizeof(int64_t)*CHAR_BIT == 64, in main()
42 static_assert(std::is_signed<int64_t>::value, in main()
46 static_assert(sizeof(uint8_t)*CHAR_BIT == 8, in main()
48 static_assert(std::is_unsigned<uint8_t>::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 …]
Dstdint_h.pass.cpp24 static_assert(sizeof(int8_t)*CHAR_BIT == 8, in main()
26 static_assert(std::is_signed<int8_t>::value, in main()
29 static_assert(sizeof(int16_t)*CHAR_BIT == 16, in main()
31 static_assert(std::is_signed<int16_t>::value, in main()
34 static_assert(sizeof(int32_t)*CHAR_BIT == 32, in main()
36 static_assert(std::is_signed<int32_t>::value, in main()
39 static_assert(sizeof(int64_t)*CHAR_BIT == 64, in main()
41 static_assert(std::is_signed<int64_t>::value, in main()
45 static_assert(sizeof(uint8_t)*CHAR_BIT == 8, in main()
47 static_assert(std::is_unsigned<uint8_t>::value, in main()
[all …]
/external/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/
Daligned_storage.pass.cpp26 static_assert(std::is_same<std::aligned_storage_t<10, 1>, T1>::value, ""); in main()
29 static_assert(std::is_pod<T1>::value, ""); in main()
31 static_assert(std::is_trivial<T1>::value, ""); in main()
32 static_assert(std::is_standard_layout<T1>::value, ""); in main()
33 static_assert(std::alignment_of<T1>::value == 1, ""); in main()
34 static_assert(sizeof(T1) == 10, ""); in main()
39 static_assert(std::is_same<std::aligned_storage_t<10, 2>, T1>::value, ""); in main()
42 static_assert(std::is_pod<T1>::value, ""); in main()
44 static_assert(std::is_trivial<T1>::value, ""); in main()
45 static_assert(std::is_standard_layout<T1>::value, ""); in main()
[all …]
/external/clang/test/SemaCXX/
Dcomplex-folding.cpp5 static_assert((0.0 + 0.0j) == (0.0 + 0.0j));
6 static_assert((0.0 + 0.0j) != (0.0 + 0.0j)); // expected-error {{static_assert}}
8 static_assert((0.0 + 0.0j) == 0.0);
9 static_assert(0.0 == (0.0 + 0.0j));
10 static_assert(0.0 == 0.0j);
11 static_assert((0.0 + 1.0j) != 0.0);
12 static_assert(1.0 != (0.0 + 0.0j));
13 static_assert(0.0 != 1.0j);
17 static_assert((1.0 + 0.0j) == (0.0 + 0.0j)); // expected-error {{static_assert}}
18 static_assert((1.0 + 0.0j) == (1.0 + 0.0j));
[all …]
/external/llvm-project/libcxx/test/std/containers/views/span.cons/
Dassign.pass.cpp72 static_assert(std::size(spans) == 13, "" ); in main()
75 static_assert(doAssign(spans[0], spans[0]), ""); in main()
76 static_assert(doAssign(spans[0], spans[1]), ""); in main()
77 static_assert(doAssign(spans[0], spans[2]), ""); in main()
78 static_assert(doAssign(spans[0], spans[3]), ""); in main()
79 static_assert(doAssign(spans[0], spans[4]), ""); in main()
80 static_assert(doAssign(spans[0], spans[5]), ""); in main()
81 static_assert(doAssign(spans[0], spans[6]), ""); in main()
82 static_assert(doAssign(spans[0], spans[7]), ""); in main()
83 static_assert(doAssign(spans[0], spans[8]), ""); in main()
[all …]
/external/libcxx/test/std/containers/views/span.cons/
Dassign.pass.cpp73 static_assert(std::size(spans) == 13, "" ); in main()
76 static_assert(doAssign(spans[0], spans[0]), ""); in main()
77 static_assert(doAssign(spans[0], spans[1]), ""); in main()
78 static_assert(doAssign(spans[0], spans[2]), ""); in main()
79 static_assert(doAssign(spans[0], spans[3]), ""); in main()
80 static_assert(doAssign(spans[0], spans[4]), ""); in main()
81 static_assert(doAssign(spans[0], spans[5]), ""); in main()
82 static_assert(doAssign(spans[0], spans[6]), ""); in main()
83 static_assert(doAssign(spans[0], spans[7]), ""); in main()
84 static_assert(doAssign(spans[0], spans[8]), ""); in main()
[all …]
/external/llvm-project/libcxx/test/std/diagnostics/syserr/
Derrc.pass.cpp19 static_assert(static_cast<int>(std::errc::address_family_not_supported) == EAFNOSUPPORT, ""); in main()
20 static_assert(static_cast<int>(std::errc::address_in_use) == EADDRINUSE, ""); in main()
21 static_assert(static_cast<int>(std::errc::address_not_available) == EADDRNOTAVAIL, ""); in main()
22 static_assert(static_cast<int>(std::errc::already_connected) == EISCONN, ""); in main()
23 static_assert(static_cast<int>(std::errc::argument_list_too_long) == E2BIG, ""); in main()
24 static_assert(static_cast<int>(std::errc::argument_out_of_domain) == EDOM, ""); in main()
25 static_assert(static_cast<int>(std::errc::bad_address) == EFAULT, ""); in main()
26 static_assert(static_cast<int>(std::errc::bad_file_descriptor) == EBADF, ""); in main()
27 static_assert(static_cast<int>(std::errc::bad_message) == EBADMSG, ""); in main()
28 static_assert(static_cast<int>(std::errc::broken_pipe) == EPIPE, ""); in main()
[all …]
/external/libcxx/test/std/diagnostics/syserr/
Derrc.pass.cpp18 static_assert(static_cast<int>(std::errc::address_family_not_supported) == EAFNOSUPPORT, ""); in main()
19 static_assert(static_cast<int>(std::errc::address_in_use) == EADDRINUSE, ""); in main()
20 static_assert(static_cast<int>(std::errc::address_not_available) == EADDRNOTAVAIL, ""); in main()
21 static_assert(static_cast<int>(std::errc::already_connected) == EISCONN, ""); in main()
22 static_assert(static_cast<int>(std::errc::argument_list_too_long) == E2BIG, ""); in main()
23 static_assert(static_cast<int>(std::errc::argument_out_of_domain) == EDOM, ""); in main()
24 static_assert(static_cast<int>(std::errc::bad_address) == EFAULT, ""); in main()
25 static_assert(static_cast<int>(std::errc::bad_file_descriptor) == EBADF, ""); in main()
26 static_assert(static_cast<int>(std::errc::bad_message) == EBADMSG, ""); in main()
27 static_assert(static_cast<int>(std::errc::broken_pipe) == EPIPE, ""); in main()
[all …]
/external/pigweed/pw_tokenizer/
Dargument_types_test.cc30 static_assert(_PW_VARARGS_TYPE((c_type)0) == enum_type, \
68 static_assert(_PW_VARARGS_TYPE(nullptr) ==
83 static_assert(PACKED_TYPES(00) == 0b00'0001u);
84 static_assert(PACKED_TYPES(11) == 0b11'0001u);
85 static_assert(PACKED_TYPES(01, 10) == 0b0110'0010u);
86 static_assert(PACKED_TYPES(11, 01, 10) == 0b110110'0011u);
87 static_assert(PACKED_TYPES(11, 10, 01, 00) == 0b11'10'01'00'0100u);
91 static_assert(PACKED_TYPES(00) == 0b00'000001u);
92 static_assert(PACKED_TYPES(11) == 0b11'000001u);
93 static_assert(PACKED_TYPES(01, 10) == 0b0110'000010u);
[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/utilities/meta/meta.rel/
Dis_invocable.pass.cpp54 static_assert(!std::is_invocable<void>::value, ""); in main()
55 static_assert(!std::is_invocable<const void>::value, ""); in main()
56 static_assert(!std::is_invocable<volatile void>::value, ""); in main()
57 static_assert(!std::is_invocable<const volatile void>::value, ""); in main()
58 static_assert(!std::is_invocable<std::nullptr_t>::value, ""); in main()
59 static_assert(!std::is_invocable<int>::value, ""); in main()
60 static_assert(!std::is_invocable<double>::value, ""); in main()
62 static_assert(!std::is_invocable<int[]>::value, ""); in main()
63 static_assert(!std::is_invocable<int[3]>::value, ""); in main()
65 static_assert(!std::is_invocable<int*>::value, ""); in main()
[all …]
/external/llvm-project/libcxx/test/std/numerics/c.math/
Dcmath.pass.cpp116 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()
118 static_assert( 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()
128 static_assert((std::is_same<decltype(std::abs((signed char)0)), int>::value), in test_abs()
130 static_assert((std::is_same<decltype(std::abs((short)0)), int>::value), in test_abs()
[all …]
/external/strace/
Dbpf_attr_check.c11 static_assert(SoM(struct BPF_MAP_CREATE_struct, map_type) == SoM(union bpf_attr, map_type),
13static_assert(offsetof(struct BPF_MAP_CREATE_struct, map_type) == offsetof(union bpf_attr, map_typ…
18 static_assert(SoM(struct BPF_MAP_CREATE_struct, key_size) == SoM(union bpf_attr, key_size),
20static_assert(offsetof(struct BPF_MAP_CREATE_struct, key_size) == offsetof(union bpf_attr, key_siz…
25 static_assert(SoM(struct BPF_MAP_CREATE_struct, value_size) == SoM(union bpf_attr, value_size),
27static_assert(offsetof(struct BPF_MAP_CREATE_struct, value_size) == offsetof(union bpf_attr, value…
32 static_assert(SoM(struct BPF_MAP_CREATE_struct, max_entries) == SoM(union bpf_attr, max_entries),
34static_assert(offsetof(struct BPF_MAP_CREATE_struct, max_entries) == offsetof(union bpf_attr, max_…
39 static_assert(SoM(struct BPF_MAP_CREATE_struct, map_flags) == SoM(union bpf_attr, map_flags),
41static_assert(offsetof(struct BPF_MAP_CREATE_struct, map_flags) == offsetof(union bpf_attr, map_fl…
[all …]
/external/llvm-project/libcxx/test/std/experimental/simd/simd.traits/
Dis_simd_mask.pass.cpp26 static_assert(ex::is_simd_mask<ex::native_simd_mask<int8_t>>::value, "");
27 static_assert(ex::is_simd_mask<ex::native_simd_mask<int16_t>>::value, "");
28 static_assert(ex::is_simd_mask<ex::native_simd_mask<int32_t>>::value, "");
29 static_assert(ex::is_simd_mask<ex::native_simd_mask<int64_t>>::value, "");
30 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint8_t>>::value, "");
31 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint16_t>>::value, "");
32 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint32_t>>::value, "");
33 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint64_t>>::value, "");
34 static_assert(ex::is_simd_mask<ex::native_simd_mask<float>>::value, "");
35 static_assert(ex::is_simd_mask<ex::native_simd_mask<double>>::value, "");
[all …]
Dis_simd.pass.cpp26 static_assert(ex::is_simd<ex::native_simd<int8_t>>::value, "");
27 static_assert(ex::is_simd<ex::native_simd<int16_t>>::value, "");
28 static_assert(ex::is_simd<ex::native_simd<int32_t>>::value, "");
29 static_assert(ex::is_simd<ex::native_simd<int64_t>>::value, "");
30 static_assert(ex::is_simd<ex::native_simd<uint8_t>>::value, "");
31 static_assert(ex::is_simd<ex::native_simd<uint16_t>>::value, "");
32 static_assert(ex::is_simd<ex::native_simd<uint32_t>>::value, "");
33 static_assert(ex::is_simd<ex::native_simd<uint64_t>>::value, "");
34 static_assert(ex::is_simd<ex::native_simd<float>>::value, "");
35 static_assert(ex::is_simd<ex::native_simd<double>>::value, "");
[all …]
/external/libcxx/test/std/experimental/simd/simd.traits/
Dis_simd_mask.pass.cpp27 static_assert(ex::is_simd_mask<ex::native_simd_mask<int8_t>>::value, "");
28 static_assert(ex::is_simd_mask<ex::native_simd_mask<int16_t>>::value, "");
29 static_assert(ex::is_simd_mask<ex::native_simd_mask<int32_t>>::value, "");
30 static_assert(ex::is_simd_mask<ex::native_simd_mask<int64_t>>::value, "");
31 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint8_t>>::value, "");
32 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint16_t>>::value, "");
33 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint32_t>>::value, "");
34 static_assert(ex::is_simd_mask<ex::native_simd_mask<uint64_t>>::value, "");
35 static_assert(ex::is_simd_mask<ex::native_simd_mask<float>>::value, "");
36 static_assert(ex::is_simd_mask<ex::native_simd_mask<double>>::value, "");
[all …]
Dis_simd.pass.cpp27 static_assert(ex::is_simd<ex::native_simd<int8_t>>::value, "");
28 static_assert(ex::is_simd<ex::native_simd<int16_t>>::value, "");
29 static_assert(ex::is_simd<ex::native_simd<int32_t>>::value, "");
30 static_assert(ex::is_simd<ex::native_simd<int64_t>>::value, "");
31 static_assert(ex::is_simd<ex::native_simd<uint8_t>>::value, "");
32 static_assert(ex::is_simd<ex::native_simd<uint16_t>>::value, "");
33 static_assert(ex::is_simd<ex::native_simd<uint32_t>>::value, "");
34 static_assert(ex::is_simd<ex::native_simd<uint64_t>>::value, "");
35 static_assert(ex::is_simd<ex::native_simd<float>>::value, "");
36 static_assert(ex::is_simd<ex::native_simd<double>>::value, "");
[all …]

12345678910>>...234