Lines Matching defs:value

82     static constexpr bool value =
83 alignof(T) <= alignof(max_align_t) && std::is_trivially_copyable<T>::value && sizeof(T) <= STACK_STORAGE_SIZE;
88 static constexpr bool value = alignof(T) <= alignof(max_align_t) && std::is_nothrow_move_constructible<T>::value &&
94 static constexpr bool value = std::is_reference<T>::value || std::is_copy_constructible<T>::value;
130 inline typename std::enable_if<std::is_enum<T>::value, bool>::type MakeAnyFromParcel(Any& value, MessageParcel& parcel);
132 inline typename std::enable_if<!std::is_enum<T>::value, bool>::type MakeAnyFromParcel(Any& value, MessageParcel& parcel)
134 (void)value;
140 inline typename std::enable_if<std::is_enum<T>::value, bool>::type WriteValueToParcel(const T &value,
143 parcel.WriteInt32(static_cast<int32_t>(value));
147 inline typename std::enable_if<!std::is_enum<T>::value, bool>::type WriteValueToParcel(const T &value,
150 (void)value;
156 inline typename std::enable_if<std::is_enum<T>::value, bool>::type WriteValueToParcelInt64(const T &value,
159 parcel.WriteInt64(static_cast<int64_t>(value));
163 inline typename std::enable_if<!std::is_enum<T>::value, bool>::type WriteValueToParcelInt64(const T &value,
166 (void)value;
199 * constructor from right reference value with type of ValueType.
202 * @param value content
204 template <typename ValueType, enable_if_t<!std::is_same<decay_t<ValueType>, Any>::value &&
205 std::is_copy_constructible<decay_t<ValueType>>::value,
207 Any(ValueType&& value) // NOLINT: explicit
209 DoEmplace<decay_t<ValueType>>(std::forward<ValueType>(value));
230 * @param value content
233 template <typename ValueType, enable_if_t<!std::is_same<decay_t<ValueType>, Any>::value &&
234 std::is_copy_constructible<decay_t<ValueType>>::value,
236 Any& operator=(ValueType&& value)
238 *this = Any(std::forward<ValueType>(value));
277 enable_if_t<std::is_constructible<decay_t<ValueType>, Args...>::value &&
278 std::is_copy_constructible<decay_t<ValueType>>::value,
298 enable_if_t<std::is_constructible<decay_t<ValueType>, std::initializer_list<U>&, Args...>::value &&
299 std::is_copy_constructible<decay_t<ValueType>>::value,
358 return "empty"; // no value
365 return false; // no value
408 friend bool AnyCast(const Any* operand, T& value) noexcept;
411 using Stack = std::aligned_storage<STACK_STORAGE_SIZE, std::alignment_of<void*>::value>::type;
451 // Only support parcel enum value to int32_t except base types
461 T value;
462 if (AnyCast(operand, value)) {
463 WriteValueToParcelInt64(value, parcel);
468 T value;
469 if (AnyCast(operand, value)) {
470 WriteValueToParcel(value, parcel);
527 // Only support parcel enum value to int32_t except base types
537 T value;
538 if (AnyCast(operand, value)) {
539 WriteValueToParcelInt64(value, parcel);
544 T value;
545 if (AnyCast(operand, value)) {
546 WriteValueToParcel(value, parcel);
604 // Only support parcel enum value to int32_t except base types
614 T value;
615 if (AnyCast(operand, value)) {
616 WriteValueToParcelInt64(value, parcel);
621 T value;
622 if (AnyCast(operand, value)) {
623 WriteValueToParcel(value, parcel);
669 conditional_t<IsTrivialStackStorable<DecayedValueType>::value,
671 conditional_t<IsStackStorable<DecayedValueType>::value,
700 if (IsTrivialStackStorable<DecayedValueType>::value || IsStackStorable<DecayedValueType>::value) {
733 return IsTrivialStackStorable<DecayedValueType>::value
735 : (IsStackStorable<DecayedValueType>::value
753 return IsTrivialStackStorable<DecayedValueType>::value
755 : (IsStackStorable<DecayedValueType>::value
768 * @tparam ValueType target value type
771 * const value contained by operand.
776 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
777 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
786 * @tparam ValueType target value type
788 * @param value ValueType
790 * value contained by operand.
793 bool AnyCast(const Any* operand, ValueType& value) noexcept
795 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
796 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
808 value = *casted_value;
818 * @tparam ValueType target value type
821 * value contained by operand.
826 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
827 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
836 * @tparam ValueType target value type. It must match both conditions:
847 static_assert(IsValidCast<ValueType>::value, "template argument must be a reference or has copy constructors");
848 static_assert(std::is_constructible<ValueType, const U&>::value,
858 * @tparam ValueType target value type. It must match both conditions:
869 static_assert(IsValidCast<ValueType>::value, "template argument must be a reference or has copy constructors");
870 static_assert(std::is_constructible<ValueType, U&>::value,
880 * @tparam ValueType target value type. It must match both conditions:
891 static_assert(IsValidCast<ValueType>::value, "template argument must be a reference or has copy constructors");
892 static_assert(std::is_constructible<ValueType, U>::value,
934 inline typename std::enable_if<std::is_enum<T>::value, bool>::type MakeAnyFromParcel(Any& value, MessageParcel
938 value.Emplace<T>(static_cast<T>(parcel.ReadInt64()));
941 value.Emplace<T>(static_cast<T>(parcel.ReadInt32()));