1#ifndef NEFORCE_CORE_TYPEINFO_CONCEPTS_HPP__
2#define NEFORCE_CORE_TYPEINFO_CONCEPTS_HPP__
12NEFORCE_BEGIN_NAMESPACE__
14#ifdef NEFORCE_STANDARD_20
30template <
typename T1,
typename T2>
44template <
typename T1,
typename T2>
64template <
typename T1,
typename T2>
85template <
typename Derived,
typename Base>
95template <
typename T,
typename... Args>
130 ::new (
static_cast<void*
>(
nullptr)) T;
141template <
typename To,
typename From>
144 requires(To x, From&& y) {
183template <
typename T1,
typename T2>
195template <
typename T1,
typename T2>
212template <
typename T1,
typename T2>
226template <
typename T1,
typename T2>
240template <
typename T1,
typename T2>
259template <
typename T1,
typename T2>
311template <
typename Iterator>
329template <
typename Iterator>
331 requires(Iterator it1, Iterator it2) {
342template <
typename Iterator>
355template <
typename Iterator>
375template <
typename Iterator>
391template <
typename Sentinel,
typename Iterator>
406template <
typename Sentinel,
typename Iterator>
410 } &&
requires(
const Iterator& i,
const Sentinel& s) {
426NEFORCE_BEGIN_RANGES__
436template <
typename Derived>
439 constexpr const Derived& derived()
const noexcept {
return static_cast<const Derived&
>(*this); }
441 constexpr Derived& derived()
noexcept {
return static_cast<Derived&
>(*this); }
448 constexpr decltype(
auto)
begin()
const {
return derived().begin(); }
453 constexpr decltype(
auto)
end()
const {
return derived().end(); }
458 constexpr decltype(
auto)
begin() {
return derived().begin(); }
463 constexpr decltype(
auto)
end() {
return derived().end(); }
502template <
typename,
typename =
void>
503NEFORCE_INLINE17
constexpr bool __is_iterator_with_cate_v =
false;
504template <
typename Iterator>
505NEFORCE_INLINE17
constexpr bool __is_iterator_with_cate_v<Iterator, void_t<iter_category_t<Iterator>>> =
true;
516template <
typename Iterator>
517NEFORCE_INLINE17
constexpr bool is_ranges_iter_v = inner::__is_iterator_with_cate_v<Iterator>;
524template <
typename Iterator>
526#ifdef NEFORCE_STANDARD_20
539template <
typename Iterator>
548template <
typename Iterator>
550#ifdef NEFORCE_STANDARD_20
560template <
typename Iterator>
568template <
typename Iterator>
570#ifdef NEFORCE_STANDARD_20
580template <
typename Iterator>
588template <
typename Iterator>
590#ifdef NEFORCE_STANDARD_20
600template <
typename Iterator>
608template <
typename Iterator>
610#ifdef NEFORCE_STANDARD_20
620template <
typename Iterator>
628template <
typename Iterator>
630#ifdef NEFORCE_STANDARD_20
638NEFORCE_END_NAMESPACE__
typename add_reference< T >::lvalue add_lvalue_reference_t
add_lvalue_reference的便捷别名
NEFORCE_INLINE17 constexpr bool is_base_of_v
is_base_of的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_lvalue_reference_v
is_lvalue_reference的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_pod_v
is_pod的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_object_v
is_object的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_convertible_v
is_convertible的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_ranges_input_iter_v
检查是否为范围输入迭代器
NEFORCE_INLINE17 constexpr bool is_ranges_iter_v
检查类型是否为范围迭代器
NEFORCE_INLINE17 constexpr bool is_bid_iter_v
检查是否为双向迭代器
NEFORCE_INLINE17 constexpr bool is_ranges_fwd_iter_v
检查是否为范围前向迭代器
NEFORCE_INLINE17 constexpr bool is_ranges_bid_iter_v
检查是否为范围双向迭代器
NEFORCE_INLINE17 constexpr bool is_rnd_iter_v
检查是否为随机访问迭代器
NEFORCE_INLINE17 constexpr bool is_iter_v
检查类型是否为迭代器
NEFORCE_INLINE17 constexpr bool is_cot_iter_v
检查是否为连续迭代器
NEFORCE_INLINE17 constexpr bool is_input_iter_v
检查是否为输入迭代器
NEFORCE_INLINE17 constexpr bool is_fwd_iter_v
检查是否为前向迭代器
NEFORCE_INLINE17 constexpr bool is_ranges_cot_iter_v
检查是否为范围连续迭代器
NEFORCE_INLINE17 constexpr bool is_ranges_rnd_iter_v
检查是否为范围随机访问迭代器
typename iterator_traits< Iterator >::value_type iter_value_t
获取迭代器的值类型
constexpr decltype(auto) to_address(const Ptr &ptr) noexcept
安全地获取任意指针类型指向的地址
typename remove_cvref< T >::type remove_cvref_t
remove_cvref的便捷别名
typename remove_reference< T >::type remove_reference_t
remove_reference的便捷别名
typename remove_cv< T >::type remove_cv_t
remove_cv的便捷别名
NEFORCE_INLINE17 constexpr bool is_swappable_v
is_swappable的便捷变量模板
typename common_type< Types... >::type common_type_t
common_type的便捷别名
typename common_reference< Types... >::type common_reference_t
common_reference的便捷别名
NEFORCE_INLINE17 constexpr bool is_constructible_v
is_constructible的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_move_constructible_v
is_move_constructible的便捷变量模板
NEFORCE_INLINE17 constexpr bool is_same_v
is_same的便捷变量模板
bool_constant< true > true_type
表示true的类型
bool_constant< false > false_type
表示false的类型
NEFORCE_INLINE17 constexpr bool is_view_v
is_view的便捷变量模板
constexpr decltype(auto) begin()
获取范围的起始迭代器
constexpr decltype(auto) end() const
获取范围的结束const迭代器
constexpr decltype(auto) begin() const
获取范围的起始const迭代器
constexpr decltype(auto) end()
获取范围的结束迭代器