12#ifndef __cxz_range_base_cc_h__
13#define __cxz_range_base_cc_h__
22 template <
class Range>
25 typedef typename Range::IndexType
IndexType;
29 template <
class Range>
32 typedef typename Range::IndexType
IndexType;
36 template <
class Range>
39 typedef typename Range::IndexType
IndexType;
44 template <
class Range>
47 CXZ_ERROR(
"cast from '" << r->type().name() <<
"' to '"
48 <<
typeid(
Range).name() <<
"' not available");
52 template <
class Range>
55 if(
typeid(
Range) == r->type()) {
56 return std::dynamic_pointer_cast<Range>(r);
#define CXZ_ERROR(errmsg)
virtual DIndex index(SizeT pos) const override final
Dynamic index declaration.
MRange, GMIndex and MIndex declaration.
Sptr< RangeBase > RangePtr
Sptr< XIndexBase > XIndexPtr
Sptr< Range > rangeCast(const RangePtr r)
std::shared_ptr< T > Sptr
static Sptr< Range > func(const RangePtr &r)