CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
isq.h
Go to the documentation of this file.
1// -*- C++ -*-
14#ifndef __cxz_isq_h__
15#define __cxz_isq_h__
16
17#include <cstdlib>
18#include <utility>
19#include "types.h"
20
21namespace CNORXZ
22{
24 template <SizeT O, SizeT... Is>
25 std::index_sequence<(Is+O)...> mkIsqAdd(std::index_sequence<Is...> is) { return {}; }
26
27 template <SizeT B, SizeT E>
28 struct MkIsq
29 {
30 static auto make()
31 {
32 static_assert(B <= E, "begin of sequence must be smaller than end of sequence");
33 return mkIsqAdd<B>( std::make_index_sequence<E-B>{} );
34 }
35
36 typedef decltype(make()) type;
37 };
44 template <SizeT B, SizeT E>
45 using Isqr = typename MkIsq<B,E>::type;
46}
47
48#endif
typename MkIsq< B, E >::type Isqr
Definition isq.h:45
Sptr< Range > rangeCast(const RangePtr r)
Declaration of all library types.