12#ifndef __cxz_index_base_cc_h__
13#define __cxz_index_base_cc_h__
23 template <
class I,
typename MetaType>
24 IndexInterface<I,MetaType>::IndexInterface()
26 mPtrId =
reinterpret_cast<PtrId>(
this);
29 template <
class I,
typename MetaType>
30 IndexInterface<I,MetaType>::IndexInterface(
const IndexInterface&
in) :
33 mPtrId =
reinterpret_cast<PtrId>(
this);
36 template <
class I,
typename MetaType>
37 IndexInterface<I,MetaType>::IndexInterface(IndexInterface&& in) :
40 mPtrId =
reinterpret_cast<PtrId>(
this);
43 template <
class I,
typename MetaType>
44 IndexInterface<I,MetaType>& IndexInterface<I,MetaType>::operator=(
const IndexInterface& in)
50 template <
class I,
typename MetaType>
51 IndexInterface<I,MetaType>& IndexInterface<I,MetaType>::operator=(IndexInterface&& in)
57 template <
class I,
typename MetaType>
58 IndexInterface<I,MetaType>::IndexInterface(SizeT pos) :
61 mPtrId =
reinterpret_cast<PtrId>(
this);
64 template <
class I,
typename MetaType>
67 return in.
lex() == lex() and *in.
range() == *range();
70 template <
class I,
typename MetaType>
73 return in.
lex() != lex() or *in.
range() != *range();
76 template <
class I,
typename MetaType>
79 return lex() < in.
lex();
82 template <
class I,
typename MetaType>
85 return lex() > in.
lex();
88 template <
class I,
typename MetaType>
91 return lex() <= in.
lex();
94 template <
class I,
typename MetaType>
97 return lex() >= in.
lex();
100 template <
class I,
typename MetaType>
106 template <
class I,
typename MetaType>
110 assert(mPtrId ==
reinterpret_cast<PtrId>(
this));
119 template <
class I,
typename MetaType>
126 template <
class I,
typename MetaType>
133 template <
class I,
typename MetaType>
136 return std::make_shared<IndexInterface<I,MetaType>>( *i + n );
139 template <
class I,
typename MetaType>
142 return std::make_shared<IndexInterface<I,MetaType>>( *i - n );
148 return std::make_shared<I>(std::forward<I>(i));
decltype(auto) range() const
constexpr decltype(auto) operator+(const COpInterface< Op1 > &op1, const COpInterface< Op2 > &op2)
Sptr< I > moveToPtr(I &&i)
IndexPtr< I, MetaType > & operator--(const IndexPtr< I, MetaType > &i)
constexpr decltype(auto) operator-(const COpInterface< Op > &op)
IndexPtr< I, MetaType > & operator++(const IndexPtr< I, MetaType > &i)
decltype(auto) xpr(const Sptr< I > &i)
Sptr< Range > rangeCast(const RangePtr r)
Sptr< IndexInterface< I, MetaType > > IndexPtr
std::shared_ptr< T > Sptr