SUNphi  1.0
IntSeqRemove.hpp File Reference

Go to the source code of this file.

Typedefs

template<int Ins, typename IS , int IncrAft = 0, bool IgnoreIfNotPresent = true>
using SUNphi::RemoveFromOrderedIntSeq = decltype(_removeFromOrderedIntSeq< Ins, IncrAft, IgnoreIfNotPresent >(IntSeq<>{}, typename ConstrainIsOrderedIntSeq< Unqualified< IS >>::type{}))
 
template<int Ins, typename IS , int IncrAft = 0, bool IgnoreIfPresent = false>
using SUNphi::RemoveFromOrderedUniqueIntSeq = typename ConstrainIsOrderedUniqueIntSeq< decltype(_removeFromOrderedIntSeq< Ins, IncrAft, IgnoreIfPresent >(IntSeq<>{}, typename ConstrainIsOrderedUniqueIntSeq< IS >::type{}))>::type
 

Functions

template<int Rem, int IncrAft, bool IgnoreIfNotPresent, int... Bef, int HeadAft, int... TailAft>
decltype(auto) SUNphi::_removeFromOrderedIntSeq (const IntSeq< Bef... > &, const IntSeq< HeadAft, TailAft... > &)
 
template<int Rem, int IncrAft, bool IgnoreIfPresent>
decltype(auto) SUNphi::_removeFromOrderedIntSeq (const IntSeq<> &, const IntSeq<> &)
 Remove the integer Ins in a previously empty IntSeq.
 

Typedef Documentation

template<int Ins, typename IS , int IncrAft = 0, bool IgnoreIfNotPresent = true>
using SUNphi::RemoveFromOrderedIntSeq = typedef decltype(_removeFromOrderedIntSeq<Ins,IncrAft,IgnoreIfNotPresent>(IntSeq<>{},typename ConstrainIsOrderedIntSeq<Unqualified<IS>>::type{}))

Remove the integer Rem in an ordered IntSeq

The elements after are incremented by IncrAft. The removal is valid if IgnoreIfNotPresent is true. Examples:

using A=IntSeq<0,1,3>;
using B=RemoveFromOrderedIntSeq<w,A,10,true>; // IntSeq<0,1,13>
INVALID using C=InsertInOrderedIntSeq<3,A,10,false>; // IntSeq<0,1,3,13>

Definition at line 70 of file IntSeqRemove.hpp.

template<int Ins, typename IS , int IncrAft = 0, bool IgnoreIfPresent = false>
using SUNphi::RemoveFromOrderedUniqueIntSeq = typedef typename ConstrainIsOrderedUniqueIntSeq< decltype(_removeFromOrderedIntSeq<Ins,IncrAft,IgnoreIfPresent> (IntSeq<>{},typename ConstrainIsOrderedUniqueIntSeq<IS>::type{}))>::type

Remove the integer Rem from an ordered unique IntSeq

Care is taken to ensure that Ins is not already in IS The elements after are incremented by IncrAft. See RemovefromOrderedIntSeq for examples

Definition at line 84 of file IntSeqRemove.hpp.

Function Documentation

template<int Rem, int IncrAft, bool IgnoreIfNotPresent, int... Bef, int HeadAft, int... TailAft>
decltype(auto) SUNphi::_removeFromOrderedIntSeq ( const IntSeq< Bef... > &  ,
const IntSeq< HeadAft, TailAft... > &   
)

Remove the integer Ins in order of HeadAft,TailAft...

Technically, the two IntSeq do not have to be ordered, the removal is done when HeadAft is largeer than Rem. The elements after are incremented by IncrAft. The removal is always accepted if IgnoreIfPresent is true.

Definition at line 24 of file IntSeqRemove.hpp.