Lines Matching defs:std

36 using decay_t = typename std::decay<T>::type;
39 using enable_if_t = typename std::enable_if<B, T>::type;
42 using conditional_t = typename std::conditional<B, T, F>::type;
45 using remove_cv_t = typename std::remove_cv<T>::type;
48 using remove_reference_t = typename std::remove_reference<T>::type;
54 alignof(T) <= alignof(max_align_t) && std::is_trivially_copyable<T>::value && sizeof(T) <= STACK_STORAGE_SIZE;
59 static constexpr bool value = alignof(T) <= alignof(max_align_t) && std::is_nothrow_move_constructible<T>::value &&
65 static constexpr bool value = std::is_reference<T>::value || std::is_copy_constructible<T>::value;
77 class BadAnyCast : public std::bad_cast {
118 template <typename ValueType, enable_if_t<!std::is_same<decay_t<ValueType>, Any>::value &&
119 std::is_copy_constructible<decay_t<ValueType>>::value,
123 DoEmplace<decay_t<ValueType>>(std::forward<ValueType>(value));
135 MoveFrom(std::forward<Any>(other));
147 template <typename ValueType, enable_if_t<!std::is_same<decay_t<ValueType>, Any>::value &&
148 std::is_copy_constructible<decay_t<ValueType>>::value,
152 *this = Any(std::forward<ValueType>(value));
157 static constexpr std::string_view GetTypeName() noexcept
160 std::string_view stringInfo = charInfo;
163 std::string_view typeName(charInfo + beginIndex, endIndex - beginIndex + 1);
191 enable_if_t<std::is_constructible<decay_t<ValueType>, Args...>::value &&
192 std::is_copy_constructible<decay_t<ValueType>>::value,
197 return DoEmplace<decay_t<ValueType>>(std::forward<Args>(args)...);
212 enable_if_t<std::is_constructible<decay_t<ValueType>, std::initializer_list<U>&, Args...>::value &&
213 std::is_copy_constructible<decay_t<ValueType>>::value,
215 decay_t<ValueType>& Emplace(std::initializer_list<U> il, Args&&... args)
218 return DoEmplace<decay_t<ValueType>>(il, std::forward<Args>(args)...);
240 Any tmp(std::move(*this));
241 *this = std::move(other);
242 other = std::move(tmp);
261 const std::type_info& Type() const noexcept
269 std::string_view TypeName() const noexcept
279 bool SameTypeWith(const std::type_info& otherInfo) const noexcept
287 bool SameTypeWith(std::string_view otherTypeName) const noexcept
314 using Stack = std::aligned_storage<STACK_STORAGE_SIZE, std::alignment_of<void*>::value>::type;
317 std::array<uint8_t, STACK_STORAGE_SIZE> trivialStack_;
324 const std::type_info& (*type)() noexcept;
326 std::string_view (*type_name)() noexcept;
338 static const std::type_info& Type() noexcept
343 static std::string_view TypeName() noexcept
380 static const std::type_info& Type() noexcept
385 static std::string_view TypeName() noexcept
405 new (reinterpret_cast<T*>(GetPtr(dest))) T(std::move(*reinterpret_cast<T*>(GetPtr(source))));
423 static const std::type_info& Type() noexcept
428 static std::string_view TypeName() noexcept
494 new (ptr) DecayedValueType(std::forward<Args>(args)...);
496 storage_.heap_ = new DecayedValueType(std::forward<Args>(args)...);
568 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
569 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
587 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
588 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
618 static_assert(!std::is_void<ValueType>::value, "ValueType of any_cast must not be void");
619 if (std::is_function<ValueType>::value || std::is_array<ValueType>::value || operand == nullptr) {
630 * 2. Let U be remove_cv_t<remove_reference_t<ValueType>>, then std::is_constructible<ValueType, const U&> must be true
640 static_assert(std::is_constructible<ValueType, const U&>::value,
655 * 2. Let U be remove_cv_t<remove_reference_t<ValueType>>, then std::is_constructible<ValueType, U&> must be true
665 static_assert(std::is_constructible<ValueType, U&>::value,
680 * 2. Let U be remove_cv_t<remove_reference_t<ValueType>>, then std::is_constructible<ValueType, U> must be true
690 static_assert(std::is_constructible<ValueType, U>::value,
697 return static_cast<ValueType>(std::move(*ptr));
712 tmp.Emplace<T, Args...>(std::forward<Args>(args)...);
727 Any MakeAny(std::initializer_list<U> il, Args&&... args)
730 tmp.Emplace<T, U, Args...>(il, std::forward<Args>(args)...);
737 namespace std {
742 } // namespace std