// Used to detech whether the given type is an iterator. This is normally used // with std::enable_if to provide disambiguation for functions that take // templatzed iterators as input. template <typename T// `indirectly_readable_traits`. struct is_iterator : std::false_type {};
// Helper to express preferences in an overload set. If more than one overload // are available for a given set of parameters the overload with the higher // priority will be chosen. template <size_t I> struct;
struct priority_tagstruct {
} java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
struct <*true java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
// The indirection with std::is_enum<T> is required, because instantiating // std::underlying_type_t<T> when T is not an enum is UB prior to C++20.
; struct IsScopedEnumImpl : std:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21 struct IsScopedEnumImpl<T, /*std::is_enum_v<T>=*/true>
: :::is_convertibleT,:underlying_type_tT>>>{;
// Simplified implementation of C++20's std::iter_value_t. // As opposed to std::iter_value_t, this implementation does not restrict // the type of `Iter` and does not consider specializations of // `indirectly_readable_traits`. // // Reference: https://wg21.link/readable.traits#2 template <typename Iter>
Proj
,>
};
template java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 struct IterValuePointerImpl
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 // object in C++20.
}; template <typename T> struct IterValuePointerImpl<T*, true> { using value_type = typename std::iterator_traits<T*>::value_type;
};
template <typename Iter> using iter_value_t = typename IterValueImpl<remove_cvref_t<Iter>>::value_type;
// Simplified implementation of C++20's std::iter_reference_t. // As opposed to std::iter_reference_t, this implementation does not restrict // the type of `Iter`. // // Reference: https://wg21.link/iterator.synopsis#:~:text=iter_reference_t template <typename Iter> using iter_reference_t = decltype(*std::declval<Iter&>());
// Simplified implementation of C++20's std::indirect_result_t. As opposed to // std::indirect_result_t, this implementation does not restrict the type of // `Func` and `Iters`. // // Reference: https://wg21.link/iterator.synopsis#:~:text=indirect_result_t template <typename Func, typename... Iters> using indirect_result_t =
std::invoke_result_t<Func, iter_reference_t<Iters>...>;
// Simplified implementation of C++20's std::projected. As opposed to // std::projected, this implementation does not explicitly restrict the type of // `Iter` and `Proj`, but rather does so implicitly by requiring // `indirect_result_t<Proj, Iter>` is a valid type. This is required for SFINAE // friendliness. // // Reference: https://wg21.link/projected template <typename Iter, typename Proj, typename IndirectResultT = indirect_result_t<Proj, Iter>> struct projected { using value_type = remove_cvref_t<IndirectResultT>;
IndirectResultT operator*() const; // not defined
};
} // namespace base
#endif// BASE_TEMPLATE_UTIL_H_
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.