Home
last modified time | relevance | path

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

1234567

/hardware/google/aemu/base/
DTypeTraits_unittest.cpp32 static_assert(is_callable_as<void(), void()>::value, "simple function"); in TEST()
33 static_assert(is_callable_as<void(&)(), void()>::value, "function reference"); in TEST()
34 static_assert(is_callable_as<void(*)(), void()>::value, "function pointer"); in TEST()
35 static_assert(is_callable_as<int(C&, C*), int(C&, C*)>::value, in TEST()
37 static_assert(is_callable_as<decltype(lambda), C*(bool)>::value, "lambda"); in TEST()
38 static_assert(is_callable_as<std::function<bool(int)>, bool(int)>::value, in TEST()
41 static_assert(!is_callable_as<int, void()>::value, "int should not be callable"); in TEST()
42 static_assert(!is_callable_as<C, void()>::value, "incomplete type"); in TEST()
43 static_assert(!is_callable_as<void(), void(int)>::value, "different arguments"); in TEST()
44 static_assert(!is_callable_as<int(), void()>::value, "different return types"); in TEST()
[all …]
DArraySize_unittest.cpp39 static_assert(ARRAY_SIZE(arr) == 20U, in TEST()
41 static_assert(arraySize(arr) == 20U, in TEST()
45 static_assert(arraySize(arr2) == 20U, in TEST()
48 static_assert(arraySize(arr) == ARRAY_SIZE(arr2), in TEST()
DOptional_unittest.cpp30 static_assert(sizeof(Optional<bool>) == 2, "bad Optional<bool> size"); in TEST()
31 static_assert(std::alignment_of<Optional<bool>>::value == in TEST()
35 static_assert(sizeof(Optional<char>) == 2, "bad Optional<char> size"); in TEST()
36 static_assert(std::alignment_of<Optional<char>>::value == in TEST()
40 static_assert(sizeof(Optional<int16_t>) == 4, "bad Optional<int16_t> size"); in TEST()
41 static_assert(std::alignment_of<Optional<int16_t>>::value == in TEST()
45 static_assert(sizeof(Optional<int32_t>) == 8, "bad Optional<int32_t> size"); in TEST()
46 static_assert(std::alignment_of<Optional<int32_t>>::value == in TEST()
50 static_assert(sizeof(Optional<int64_t>) == 16, in TEST()
52 static_assert(std::alignment_of<Optional<int64_t>>::value == in TEST()
[all …]
/hardware/interfaces/tv/cec/1.0/default/
DHdmiCec.cpp32 static_assert(CEC_DEVICE_INACTIVE == static_cast<int>(CecDeviceType::INACTIVE),
34 static_assert(CEC_DEVICE_TV == static_cast<int>(CecDeviceType::TV),
36 static_assert(CEC_DEVICE_RECORDER == static_cast<int>(CecDeviceType::RECORDER),
38 static_assert(CEC_DEVICE_TUNER == static_cast<int>(CecDeviceType::TUNER),
40 static_assert(CEC_DEVICE_PLAYBACK == static_cast<int>(CecDeviceType::PLAYBACK),
42 static_assert(CEC_DEVICE_AUDIO_SYSTEM == static_cast<int>(CecDeviceType::AUDIO_SYSTEM),
44 static_assert(CEC_DEVICE_MAX == static_cast<int>(CecDeviceType::MAX),
47 static_assert(CEC_ADDR_TV == static_cast<int>(CecLogicalAddress::TV),
49 static_assert(CEC_ADDR_RECORDER_1 == static_cast<int>(CecLogicalAddress::RECORDER_1),
51 static_assert(CEC_ADDR_RECORDER_2 == static_cast<int>(CecLogicalAddress::RECORDER_2),
[all …]
/hardware/interfaces/broadcastradio/1.0/default/
DUtils.cpp38 static_assert(RADIO_CLASS_AM_FM == static_cast<int>(Class::AM_FM),
40 static_assert(RADIO_CLASS_SAT == static_cast<int>(Class::SAT),
42 static_assert(RADIO_CLASS_DT == static_cast<int>(Class::DT),
45 static_assert(RADIO_BAND_AM == static_cast<int>(Band::AM),
47 static_assert(RADIO_BAND_FM == static_cast<int>(Band::FM),
49 static_assert(RADIO_BAND_AM_HD == static_cast<int>(Band::AM_HD),
51 static_assert(RADIO_BAND_FM_HD == static_cast<int>(Band::FM_HD),
54 static_assert(RADIO_RDS_NONE == static_cast<int>(Rds::NONE),
56 static_assert(RADIO_RDS_WORLD == static_cast<int>(Rds::WORLD),
58 static_assert(RADIO_RDS_US == static_cast<int>(Rds::US),
[all …]
/hardware/interfaces/graphics/composer/aidl/android/hardware/graphics/composer3/
DHidl2AidlAsserts.cpp46 static_assert(
50 static_assert(
53 static_assert(
56 static_assert(
59 static_assert(
62 static_assert(
65 static_assert(
68 static_assert(
71 static_assert(
75 static_assert(
[all …]
/hardware/google/gchips/gralloc4/src/hidl_common/
DSharedMetadata_struct.h133 static_assert(offsetof(shared_metadata, blend_mode) == 0, "bad alignment");
134 static_assert(sizeof(shared_metadata::blend_mode) == 8, "bad size");
136 static_assert(offsetof(shared_metadata, crop) == 8, "bad alignment");
137 static_assert(sizeof(shared_metadata::crop) == 20, "bad size");
139 static_assert(offsetof(shared_metadata, cta861_3) == 28, "bad alignment");
140 static_assert(sizeof(shared_metadata::cta861_3) == 12, "bad size");
142 static_assert(offsetof(shared_metadata, dataspace) == 40, "bad alignment");
143 static_assert(sizeof(shared_metadata::dataspace) == 8, "bad size");
145 static_assert(offsetof(shared_metadata, smpte2086) == 48, "bad alignment");
146 static_assert(sizeof(shared_metadata::smpte2086) == 44, "bad size");
[all …]
DBufferDescriptor.h71 static_assert(sizeof(val) % sizeof(vecT) == 0, "Unsupported vector type"); in push_descriptor_uint32()
80 static_assert(sizeof(val) % sizeof(vecT) == 0, "Unsupported vector type"); in pop_descriptor_uint32()
89 static_assert(sizeof(val) % sizeof(vecT) == 0, "Unsupported vector type"); in push_descriptor_uint64()
98 static_assert(sizeof(val) % sizeof(vecT) == 0, "Unsupported vector type"); in pop_descriptor_uint64()
126 static_assert(sizeof(uint32_t) % sizeof(vecT) == 0, "Unsupported vector type"); in grallocEncodeBufferDescriptor()
157 static_assert(sizeof(uint32_t) % sizeof(vecT) == 0, "Unsupported vector type"); in grallocDecodeBufferDescriptor()
/hardware/interfaces/health/aidl/android/hardware/health/
Dtranslate-ndk.cpp21 static_assert(aidl::android::hardware::health::BatteryStatus::UNKNOWN ==
24 static_assert(aidl::android::hardware::health::BatteryStatus::CHARGING ==
27 static_assert(aidl::android::hardware::health::BatteryStatus::DISCHARGING ==
30 static_assert(aidl::android::hardware::health::BatteryStatus::NOT_CHARGING ==
33 static_assert(aidl::android::hardware::health::BatteryStatus::FULL ==
37 static_assert(aidl::android::hardware::health::BatteryHealth::UNKNOWN ==
40 static_assert(aidl::android::hardware::health::BatteryHealth::GOOD ==
43 static_assert(aidl::android::hardware::health::BatteryHealth::OVERHEAT ==
46 static_assert(aidl::android::hardware::health::BatteryHealth::DEAD ==
49 static_assert(aidl::android::hardware::health::BatteryHealth::OVER_VOLTAGE ==
[all …]
/hardware/interfaces/tv/input/1.0/default/
DTvInput.cpp29 static_assert(TV_INPUT_TYPE_OTHER_HARDWARE == static_cast<int>(TvInputType::OTHER),
31 static_assert(TV_INPUT_TYPE_TUNER == static_cast<int>(TvInputType::TUNER),
33 static_assert(TV_INPUT_TYPE_COMPOSITE == static_cast<int>(TvInputType::COMPOSITE),
35 static_assert(TV_INPUT_TYPE_SVIDEO == static_cast<int>(TvInputType::SVIDEO),
37 static_assert(TV_INPUT_TYPE_SCART == static_cast<int>(TvInputType::SCART),
39 static_assert(TV_INPUT_TYPE_COMPONENT == static_cast<int>(TvInputType::COMPONENT),
41 static_assert(TV_INPUT_TYPE_VGA == static_cast<int>(TvInputType::VGA),
43 static_assert(TV_INPUT_TYPE_DVI == static_cast<int>(TvInputType::DVI),
45 static_assert(TV_INPUT_TYPE_HDMI == static_cast<int>(TvInputType::HDMI),
47 static_assert(TV_INPUT_TYPE_DISPLAY_PORT == static_cast<int>(TvInputType::DISPLAY_PORT),
[all …]
/hardware/interfaces/sensors/common/convert/
Dconvert.cpp28 static_assert(sizeof(sensors_event_t) == sizeof(ASensorEvent)); in convertASensorEvent()
29 static_assert(offsetof(sensors_event_t, timestamp) == offsetof(ASensorEvent, timestamp)); in convertASensorEvent()
30 static_assert(offsetof(sensors_event_t, flags) == offsetof(ASensorEvent, flags)); in convertASensorEvent()
/hardware/google/aemu/base/include/aemu/base/memory/
DLazyInstance.h129 static_assert(std::is_standard_layout<LazyInstanceState>::value,
132 static_assert(is_trivially_default_constructible<LazyInstanceState>::value,
148 static_assert(!std::is_same<T, Lock>::value &&
194 static_assert(std::is_standard_layout<LazyInstance>::value, in ptrInternal()
198 static_assert( in ptrInternal()
/hardware/interfaces/wifi/1.0/vts/functional/
Dwifi_hidl_call_util_selftest.cpp76 static_assert(std::is_same<int, detail::functionArgSaver<
80 static_assert(
85 static_assert(
91 static_assert(std::is_same<Dummy, detail::functionArgSaver<std::function<
/hardware/interfaces/light/2.0/default/
DLight.cpp31 static_assert(LIGHT_FLASH_NONE == static_cast<int>(Flash::NONE),
33 static_assert(LIGHT_FLASH_TIMED == static_cast<int>(Flash::TIMED),
35 static_assert(LIGHT_FLASH_HARDWARE == static_cast<int>(Flash::HARDWARE),
38 static_assert(BRIGHTNESS_MODE_USER == static_cast<int>(Brightness::USER),
40 static_assert(BRIGHTNESS_MODE_SENSOR == static_cast<int>(Brightness::SENSOR),
42 static_assert(BRIGHTNESS_MODE_LOW_PERSISTENCE ==
/hardware/google/interfaces/light/1.0/default/
DLight.cpp31 static_assert(LIGHT_FLASH_NONE == static_cast<int>(Flash::NONE),
33 static_assert(LIGHT_FLASH_TIMED == static_cast<int>(Flash::TIMED),
35 static_assert(LIGHT_FLASH_HARDWARE == static_cast<int>(Flash::HARDWARE),
38 static_assert(BRIGHTNESS_MODE_USER == static_cast<int>(Brightness::USER),
40 static_assert(BRIGHTNESS_MODE_SENSOR == static_cast<int>(Brightness::SENSOR),
42 static_assert(BRIGHTNESS_MODE_LOW_PERSISTENCE ==
/hardware/google/interfaces/light/1.1/default/
DLight.cpp31 static_assert(LIGHT_FLASH_NONE == static_cast<int>(Flash::NONE),
33 static_assert(LIGHT_FLASH_TIMED == static_cast<int>(Flash::TIMED),
35 static_assert(LIGHT_FLASH_HARDWARE == static_cast<int>(Flash::HARDWARE),
38 static_assert(BRIGHTNESS_MODE_USER == static_cast<int>(Brightness::USER),
40 static_assert(BRIGHTNESS_MODE_SENSOR == static_cast<int>(Brightness::SENSOR),
42 static_assert(BRIGHTNESS_MODE_LOW_PERSISTENCE ==
/hardware/google/pixel/pixelstats/
DBatteryCapacityReporter.cpp47 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_UNKNOWN) == in BatteryCapacityReporter()
49 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_CONNECTED) == in BatteryCapacityReporter()
51 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_DISCONNECTED) == in BatteryCapacityReporter()
53 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_FULL_CHARGE) == in BatteryCapacityReporter()
55 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_PERCENT_SKIP) == in BatteryCapacityReporter()
57 static_assert(static_cast<int>(BatteryCapacityReporter::LOG_REASON_DIVERGING_FG) == in BatteryCapacityReporter()
/hardware/interfaces/health/storage/aidl/default/
DStorage.cpp30 static_assert(static_cast<AResult>(HResult::SUCCESS) == AResult::SUCCESS);
31 static_assert(static_cast<AResult>(HResult::IO_ERROR) == AResult::IO_ERROR);
32 static_assert(static_cast<AResult>(HResult::UNKNOWN_ERROR) == AResult::UNKNOWN_ERROR);
/hardware/google/pixel/power-libperfmgr/aidl/tests/
DPhysicalQuantityTypeTest.cpp37 static_assert(Cycles(10) * 2 == Cycles(20));
38 static_assert(100_hz + 200_hz == Frequency(300));
39 static_assert(Cycles(100) / 1s == Frequency(100));
/hardware/interfaces/boot/1.1/default/boot_control/include/private/
Dboot_control_definition.h55 static_assert(sizeof(struct bootloader_message_ab) == 4096,
110 static_assert(sizeof(struct bootloader_control) ==
/hardware/ti/am57x/bootctrl/
Dbootloader_message.h87 static_assert(sizeof(struct bootloader_message) == 2048,
124 static_assert(sizeof(struct bootloader_message_ab) == 4096,
177 static_assert(sizeof(struct bootloader_control) ==
/hardware/google/gfxstream/host/apigen-codec-common/
DProtocolUtils.h45 static_assert(sizeof(T) == sizeof(S), in unpack()
97 static_assert(Align == 1 || Align == 2 || Align == 4 || Align == 8,
134 static_assert(Align == 1 || Align == 2 || Align == 4 || Align == 8,
/hardware/google/gfxstream/guest/android-emu/aemu/base/fit/
DUtilityInternal.h121 static_assert(isCompleteOrUnboundedArray(Identity<T>{}),
127 static_assert(isCompleteOrUnboundedArray(Identity<T>{}),
134 static_assert(isCompleteOrUnboundedArray(Identity<T>{}),
140 static_assert(isCompleteOrUnboundedArray(Identity<T>{}),
/hardware/interfaces/automotive/vehicle/2.0/default/common/include/vhal_v2_0/
DVehicleConnector.h59 static_assert(std::is_base_of_v<IVehicleClient, VehicleClientType>);
60 static_assert(std::is_base_of_v<IVehicleServer, VehicleServerType>);
/hardware/google/graphics/common/gralloc-headers/pixel-gralloc/
Dmapper.h40 static_assert(always_false<T>::value, "Unspecialized ReturnType is not supported");
46 static_assert(always_false<T>::value, "Unspecialized get is not supported"); in get()
99 static_assert(always_false<T>::value, "Unspecialized set is not supported"); in set()

1234567