Upgrade: down with typename!!

Yet another chainsaw massacre.

One of the most obnoxious annoyances with C++ metaprogramming
is the need to insert `typename` and `template` qualifiers into
most definitions, to help the compiler to cope with the syntax,
which is not context-free.

The recent standards adds several clarifications, so that most
of these qualifiers are redundant now, at least at places where
it is unambiguously clear that only a type can be given.

GCC already supports most of these relaxing rules
(Clang unfortunately lags way behind with support of newer language features...)
This commit is contained in:
Fischlurch 2025-07-05 20:08:18 +02:00
parent 2cd3e95228
commit 20f3252892
124 changed files with 954 additions and 884 deletions

View file

@ -171,8 +171,8 @@ namespace advice {
};
typedef vector<Entry> EntryList;
typedef typename EntryList::iterator EIter;
using EntryList = vector<Entry>;
using EIter = EntryList::iterator;
struct Cluster
@ -249,7 +249,7 @@ namespace advice {
POA*
find_latest_solution (POA& requestElm)
{
typedef typename EntryList::reverse_iterator RIter;
using RIter = EntryList::reverse_iterator;
Binding::Matcher pattern (requestElm.getMatcher());
for (RIter ii=this->elms_.rbegin();
ii!=this->elms_.rend();
@ -514,8 +514,8 @@ namespace advice {
bool
Index<POA>::isValid() const
{
typedef typename RTable::const_iterator RTIter;
typedef typename PTable::const_iterator PTIter;
using RTIter = RTable::const_iterator;
using PTIter = PTable::const_iterator;
try {
for (PTIter ii =provisionEntries_.begin();

View file

@ -112,7 +112,7 @@ namespace lumiera {
/** The ServiceHandle automatically creates and manages the Proxy instance */
template<class I, class FA>
using ServiceHandle = typename lib::DependInject<FA>::template ServiceInstance<Proxy<InstanceHandle<I,FA>>>;
using ServiceHandle = lib::DependInject<FA>::template ServiceInstance<Proxy<InstanceHandle<I,FA>>>;
/**

View file

@ -538,7 +538,7 @@ namespace lumiera {
template<class RES>
inline typename Query<RES>::Builder
inline Query<RES>::Builder
Query<RES>::build (Kind queryType)
{
return Builder(defineQueryTypeID (queryType));
@ -546,7 +546,7 @@ namespace lumiera {
template<class RES>
inline typename Query<RES>::Builder
inline Query<RES>::Builder
Query<RES>::rebuild() const
{
return Builder(this->id_, getQueryDefinition());

View file

@ -78,7 +78,7 @@ namespace query {
/** we maintain an independent defaults registry
* for every participating kind of object. */
typedef std::vector< P<TableEntry> > Table;
using Table = std::vector< P<TableEntry> >;
/**
@ -132,7 +132,7 @@ namespace query {
struct Slot
: public TableEntry
{
typedef std::set<Record<TAR>> Registry;
using Registry = std::set<Record<TAR>>;
Registry registry;
static size_t index; ///< where to find this Slot in every Table
@ -194,7 +194,7 @@ namespace query {
class Iter
{
friend class DefsRegistry;
typedef typename Slot<TAR>::Registry::iterator II;
using II = Slot<TAR>::Registry::iterator;
II p,i,e;
P<TAR> next, ptr;
@ -251,12 +251,12 @@ namespace query {
{
P<TAR> dummy;
Record<TAR> entry (query, dummy);
typedef typename Slot<TAR>::Registry Registry;
using Registry = Slot<TAR>::Registry;
Registry& registry = Slot<TAR>::access(table_);
// try to get a possible direct match (same query)
typename Registry::iterator pos = registry.find (entry);
typename Registry::iterator end = registry.end();
auto pos = registry.find (entry);
auto end = registry.end();
if (pos==end)
return Iter<TAR> (registry.begin(), end); // just enumerate contents
@ -277,8 +277,8 @@ namespace query {
put (P<TAR> const& obj, Query<TAR> const& query)
{
Record<TAR> entry (query, obj);
typedef typename Slot<TAR>::Registry Registry;
typedef typename Registry::iterator RIter;
using Registry = Slot<TAR>::Registry;
using RIter = Registry::iterator;
Registry& registry = Slot<TAR>::access(table_);
RIter pos = registry.lower_bound (entry);
@ -306,8 +306,8 @@ namespace query {
bool
forget (P<TAR> const& obj)
{
typedef typename Slot<TAR>::Registry Registry;
typedef typename Record<TAR>::Search SearchFunc;
using Registry = Slot<TAR>::Registry;
using SearchFunc = Record<TAR>::Search;
Registry& registry = Slot<TAR>::access(table_);
return util::remove_if(registry, SearchFunc (obj));

View file

@ -137,7 +137,7 @@ namespace lumiera {
template<typename RES>
inline typename Query<RES>::iterator
inline Query<RES>::iterator
Query<RES>::resolveBy (QueryResolver const& resolver) const
{
PReso resultSet = resolver.issue (*this);
@ -150,7 +150,7 @@ namespace lumiera {
/** notational convenience shortcut,
* synonymous to Query<RES>::resolveBy() */
template<typename RES>
inline typename Query<RES>::iterator
inline Query<RES>::iterator
Query<RES>::operator() (QueryResolver const& resolver) const
{
return resolveBy (resolver);

View file

@ -347,14 +347,14 @@ namespace lib {
struct SetupSeveral<std::void_t, lib::AllocationCluster&>
{
template<typename X>
using Adapter = typename AllocationCluster::template Allocator<X>;
using Adapter = AllocationCluster::template Allocator<X>;
template<class I, class E>
struct Policy
: AllocationPolicy<I,E,Adapter>
{
using Base = AllocationPolicy<I,E,Adapter>;
using Bucket = typename Base::Bucket;
using Bucket = Base::Bucket;
/** @warning allocation size is severely limited in AllocationCluster. */
size_t static constexpr ALLOC_LIMIT = AllocationCluster::max_size();

View file

@ -89,7 +89,7 @@ namespace lib {
{
using Allo = ALO;
using AlloT = std::allocator_traits<Allo>;
using BaseType = typename Allo::value_type;
using BaseType = Allo::value_type;
Allo& baseAllocator() { return *this; }
@ -97,7 +97,7 @@ namespace lib {
auto
adaptAllocator()
{
using XAllo = typename AlloT::template rebind_alloc<X>;
using XAllo = AlloT::template rebind_alloc<X>;
if constexpr (std::is_constructible_v<XAllo, Allo>)
return XAllo{baseAllocator()};
else
@ -105,8 +105,8 @@ namespace lib {
}
template<class ALOT, typename...ARGS>
typename ALOT::pointer
construct (typename ALOT::allocator_type& allo, ARGS&& ...args)
ALOT::pointer
construct (ALOT::allocator_type& allo, ARGS&& ...args)
{
auto loc = ALOT::allocate (allo, 1);
try { ALOT::construct (allo, loc, std::forward<ARGS>(args)...); }
@ -120,7 +120,7 @@ namespace lib {
template<class ALOT>
void
destroy (typename ALOT::allocator_type& allo, typename ALOT::pointer elm)
destroy (ALOT::allocator_type& allo, ALOT::pointer elm)
{
ALOT::destroy (allo, elm);
ALOT::deallocate (allo, elm, 1);
@ -167,7 +167,7 @@ namespace lib {
}
else
{
using XAlloT = typename AlloT::template rebind_traits<TY>;
using XAlloT = AlloT::template rebind_traits<TY>;
auto xAllo = adaptAllocator<TY>();
return construct<XAlloT> (xAllo, std::forward<ARGS>(args)...);
}
@ -184,7 +184,7 @@ namespace lib {
}
else
{
using XAlloT = typename AlloT::template rebind_traits<TY>;
using XAlloT = AlloT::template rebind_traits<TY>;
auto xAllo = adaptAllocator<TY>();
destroy<XAlloT> (xAllo, elm);
}

View file

@ -148,8 +148,8 @@ namespace lib {
class DependInject
: util::NoInstance
{
using Factory = typename Depend<SRV>::Factory;
using Lock = typename Depend<SRV>::Lock;
using Factory = Depend<SRV>::Factory;
using Lock = Depend<SRV>::Lock;
public:
/** configure dependency-injection for type SRV to build a subclass singleton.
@ -178,8 +178,8 @@ namespace lib {
static void
useSingleton (FUN&& ctor)
{
using Sub = typename SubclassFactoryType<FUN>::Subclass;
using Fun = typename SubclassFactoryType<FUN>::Functor;
using Sub = SubclassFactoryType<FUN>::Subclass;
using Fun = SubclassFactoryType<FUN>::Functor;
__assert_compatible<Sub>();
installFactory<Sub,Fun> (forward<FUN> (ctor));
@ -372,9 +372,9 @@ namespace lib {
static_assert (meta::_Fun<FUN>(),
"Need a Lambda or Function object to create a heap allocated instance");
using Functor = typename meta::_Fun<FUN>::Functor; // suitable type to store for later invocation
using ResultVal = typename meta::_Fun<FUN>::Ret;
using Subclass = typename meta::Strip<ResultVal>::TypePlain;
using Functor = meta::_Fun<FUN>::Functor; // suitable type to store for later invocation
using ResultVal = meta::_Fun<FUN>::Ret;
using Subclass = meta::Strip<ResultVal>::TypePlain;
static_assert (std::is_pointer<ResultVal>::value,
"Function must yield a pointer to a heap allocated instance");

View file

@ -106,7 +106,7 @@ namespace diff{
struct InterpreterScheme ///< base case is to expect typedef I::Val
{
using Interpreter = I;
using Val = typename I::Val;
using Val = I::Val;
using Handler = HandlerFun<I,Val>;
};
@ -188,12 +188,12 @@ namespace diff{
struct DiffStepBuilder
{
using Scheme = InterpreterScheme<I>;
using Handler = typename Scheme::Handler;
using Val = typename Scheme::Val;
using Handler = Scheme::Handler;
using Val = Scheme::Val;
using Lang = DiffLanguage<I,Val>;
using Step = typename Lang::DiffStep;
using Verb = typename Lang::DiffVerb;
using Step = Lang::DiffStep;
using Verb = Lang::DiffVerb;
Handler handler;
Literal id;
@ -239,7 +239,7 @@ namespace diff{
* @warning use for internal state marking only --
* invoking this token produces undefined behaviour */
template<class I, typename E>
const typename DiffLanguage<I,E>::DiffStep DiffLanguage<I,E>::NIL = DiffStep(DiffVerb(), E());
const DiffLanguage<I,E>::DiffStep DiffLanguage<I,E>::NIL = DiffStep(DiffVerb(), E());

View file

@ -119,7 +119,7 @@ namespace diff{
struct RecordSetup<GenNode>
{
using Storage = std::vector<GenNode>;
using ElmIter = typename Storage::const_iterator;
using ElmIter = Storage::const_iterator;
/** using const reference data access
* relevant for handling large subtrees */
@ -516,7 +516,7 @@ namespace diff{
using No = lib::meta::No_t;
template<class X>
static Yes check(typename variant::CanBuildFrom<X, DataValues>::Type*);
static Yes check(variant::CanBuildFrom<X, DataValues>::Type*);
template<class X>
static No check(...);

View file

@ -69,8 +69,8 @@ namespace diff{
/* === forwarded sequence access === */
using iterator = typename std::vector<VAL>::iterator;
using const_iterator = typename std::vector<VAL>::const_iterator;
using iterator = std::vector<VAL>::iterator;
using const_iterator = std::vector<VAL>::const_iterator;
iterator begin() { return data_.begin(); }
iterator end() { return data_.end(); }

View file

@ -64,7 +64,7 @@ namespace diff{
: public ListDiffInterpreter<E>
{
using Vec = vector<E,ARGS...>;
using Iter = typename Vec::iterator;
using Iter = Vec::iterator;
Vec orig_;
Vec& seq_;

View file

@ -78,14 +78,14 @@ namespace diff{
class DiffDetector
: util::NonCopyable
{
using Val = typename SEQ::value_type;
using Val = SEQ::value_type;
using Idx = IndexTable<Val>;
Idx refIdx_;
SEQ const& currentData_;
using DiffStep = typename ListDiffLanguage<Val>::DiffStep;
using DiffStep = ListDiffLanguage<Val>::DiffStep;
/** @internal state frame for diff detection and generation. */
class DiffFrame;

View file

@ -140,9 +140,9 @@ namespace diff{
template<typename VAL>
class Record
{
using Storage = typename RecordSetup<VAL>::Storage;
using ElmIter = typename RecordSetup<VAL>::ElmIter;
using Access = typename RecordSetup<VAL>::Access;
using Storage = RecordSetup<VAL>::Storage;
using ElmIter = RecordSetup<VAL>::ElmIter;
using Access = RecordSetup<VAL>::Access;
string type_;
@ -307,7 +307,7 @@ namespace diff{
/* ==== Exposing scope and contents for iteration ====== */
using iterator = IterAdapter<ElmIter, const Record*>;
using scopeIter = typename iter_stl::_SeqT<const Storage>::Range;
using scopeIter = iter_stl::_SeqT<const Storage>::Range;
using keyIter = TransformIter<scopeIter, string>;
using valIter = TransformIter<scopeIter, Access>;
@ -595,10 +595,10 @@ namespace diff{
* @see tree-diff-application.hpp
*/
template<typename VAL>
inline typename Record<VAL>::Mutator&
inline Record<VAL>::Mutator&
mutateInPlace (Record<VAL>& record_to_mutate)
{
return reinterpret_cast<typename Record<VAL>::Mutator &> (record_to_mutate);
return reinterpret_cast<Record<VAL>::Mutator &> (record_to_mutate);
}
@ -713,8 +713,8 @@ namespace diff{
struct RecordSetup<string>
{
using Storage = std::vector<string>;
using ElmIter = typename Storage::const_iterator;
using Access = string; ///< data access by value copy
using ElmIter = Storage::const_iterator;
using Access = string; ///< data access by value copy
};

View file

@ -195,8 +195,8 @@ namespace diff{
public:
using iterator = typename iter_stl::_SeqT<VecG>::Range;
using const_iterator = typename iter_stl::_SeqT<const VecG>::Range;
using iterator = iter_stl::_SeqT<VecG>::Range;
using const_iterator = iter_stl::_SeqT<const VecG>::Range;
const_iterator begin() const { return eachElm(content_); }
const_iterator end() const { return const_iterator(); }

View file

@ -364,7 +364,7 @@ namespace diff{
void
initDiffApplication()
{
using Target = typename TreeDiffTraits<TAR>::Ret;
using Target = TreeDiffTraits<TAR>::Ret;
Target target = mutatorBinding (subject_);
buildMutator(target)->init();

View file

@ -200,10 +200,10 @@ namespace diff{
* the return value in local scope as long as necessary
*/
template<class TAR>
typename TreeDiffTraits<TAR>::Ret
TreeDiffTraits<TAR>::Ret
mutatorBinding (TAR& subject)
{
using Wrapper = typename TreeDiffTraits<TAR>::Ret;
using Wrapper = TreeDiffTraits<TAR>::Ret;
return Wrapper(subject);
}

View file

@ -236,9 +236,9 @@ namespace diff{
class ChangeOperation
: public AttributeBindingBase<PAR>
{
using CloArgs = typename lib::meta::_Fun<CLO>::Args;
using ValueType = typename lib::meta::Pick<CloArgs, 0>::Type;
using ID = idi::EntryID<ValueType>;
using CloArgs = lib::meta::_Fun<CLO>::Args;
using ValueType = lib::meta::Pick<CloArgs, 0>::Type;
using ID = idi::EntryID<ValueType>;
CLO setter_;

View file

@ -121,8 +121,8 @@ namespace diff{
struct ContainerTraits<V, IF_is_vector<V> >
{
using Vec = _AsVector<V>;
using Elm = typename Vec::value_type;
using Itr = typename Vec::iterator;
using Elm = Vec::value_type;
using Itr = Vec::iterator;
static Itr
recentElmRawIter (Vec& vec)
@ -141,8 +141,8 @@ namespace diff{
struct ContainerTraits<M, IF_is_map<M> >
{
using Map = _AsMap<M>;
using Key = typename Map::key_type;
using Val = typename Map::mapped_type;
using Key = Map::key_type;
using Val = Map::mapped_type;
using Elm = std::pair<const Key, Val>;
/** heuristic for `std::map`: lookup via reverse iterator.
@ -188,12 +188,12 @@ namespace diff{
struct CollectionBinding
: util::MoveOnly
{
using Coll = typename Strip<COLL>::TypeReferred;
using Elm = typename Coll::value_type;
using Coll = Strip<COLL>::TypeReferred;
using Elm = Coll::value_type;
using Trait = ContainerTraits<Coll>;
using iterator = typename lib::iter_stl::_SeqT<Coll>::Range;
using const_iterator = typename lib::iter_stl::_SeqT<const Coll>::Range;
using iterator = lib::iter_stl::_SeqT<Coll>::Range;
using const_iterator = lib::iter_stl::_SeqT<const Coll>::Range;
ASSERT_VALID_SIGNATURE (MAT, bool(GenNode const& spec, Elm const& elm))
@ -306,7 +306,7 @@ namespace diff{
class ChildCollectionMutator
: public PAR
{
using Iter = typename BIN::iterator;
using Iter = BIN::iterator;
BIN binding_;
Iter pos_;
@ -582,7 +582,7 @@ namespace diff{
inline auto
createCollectionBindingBuilder (COLL& coll, MAT m, CTR c, SEL s, ASS a, MUT u)
{
using Coll = typename Strip<COLL>::TypeReferred;
using Coll = Strip<COLL>::TypeReferred;
return CollectionBindingBuilder<Coll, MAT,CTR,SEL,ASS,MUT> {coll, m,c,s,a,u};
}
@ -738,7 +738,7 @@ namespace diff{
inline auto
collection (COLL& coll)
{
using Elm = typename COLL::value_type;
using Elm = COLL::value_type;
return _DefaultBinding<Elm>::attachTo(coll);
}

View file

@ -82,8 +82,8 @@ namespace lib {
: public std::vector<P<ELM>>
{
using _Vec = std::vector<P<ELM>>;
using Iter = typename _Vec::iterator;
using CIter = typename _Vec::const_iterator;
using Iter = _Vec::iterator;
using CIter = _Vec::const_iterator;
public:
~ElementTracker()
@ -226,7 +226,7 @@ namespace lib {
/** storage for the functor to link an AutoRegistered entity
* to the corresponding registration service */
template<typename TAR>
typename AutoRegistered<TAR>::RegistryLink AutoRegistered<TAR>::getRegistry;
AutoRegistered<TAR>::RegistryLink AutoRegistered<TAR>::getRegistry;

View file

@ -190,7 +190,7 @@ namespace util {
inline std::string
toString (TY const& val) noexcept
{
using PlainVal = typename lib::meta::Strip<TY>::TypeReferred;
using PlainVal = lib::meta::Strip<TY>::TypeReferred;
return StringConv<PlainVal>::invoke (val);
}

View file

@ -133,7 +133,7 @@ namespace util {
inline auto
stringify (IT&& src)
{
using Val = typename lib::meta::ValueTypeBinding<IT>::value_type;
using Val = lib::meta::ValueTypeBinding<IT>::value_type;
return lib::transformIterator(forward<IT>(src), util::toString<Val>);
}
@ -144,7 +144,7 @@ namespace util {
template<class CON, typename TOGGLE = void>
struct _RangeIter
{
using StlIter = typename CON::const_iterator;
using StlIter = CON::const_iterator;
lib::RangeIter<StlIter> iter;
@ -193,7 +193,7 @@ namespace util {
inline string
join (COLL&& coll, string const& delim =", ")
{
using Coll = typename lib::meta::Strip<COLL>::TypePlain;
using Coll = lib::meta::Strip<COLL>::TypePlain;
_RangeIter<Coll> range(std::forward<COLL>(coll)); // copies when CON is reference
auto strings = stringify (std::move (range.iter));

View file

@ -183,7 +183,7 @@ namespace lib {
/** access type to reside in the given slot of the _complete chain_ */
template<size_t slot>
using Elm_t = typename PickType<slot>::type;
using Elm_t = PickType<slot>::type;
/** access data elements within _complete chain_ by index pos */
@ -272,10 +272,10 @@ namespace lib {
}
template<typename...XVALS>
using ChainExtent = typename ChainType::template Chain<XVALS...>;
using ChainExtent = ChainType::template Chain<XVALS...>;
template<size_t slot>
using Accessor = typename ChainType::template Accessor<_Self::size()+slot>;
using Accessor = ChainType::template Accessor<_Self::size()+slot>;
template<typename X>
using AccessorFor = Accessor<meta::indexOfType<X,VALS...>()>;
@ -310,7 +310,7 @@ namespace lib {
using _FrontBlock = HeteroData<meta::Node<StorageFrame<0, DATA...>, meta::Nil>>;
public:
using NewFrame = typename _FrontBlock::Frame;
using NewFrame = _FrontBlock::Frame;
using ChainType = _FrontBlock;
using _FrontBlock::_FrontBlock;
@ -434,7 +434,7 @@ namespace std { // Specialisation to support C++ »Tuple Protocol« and structur
template<size_t I, typename...DATA>
struct tuple_element<I, lib::HeteroData<DATA...> >
{
using type = typename lib::HeteroData<DATA...>::template Elm_t<I>;
using type = lib::HeteroData<DATA...>::template Elm_t<I>;
};
template<size_t I>
struct tuple_element<I, lib::HeteroData<lib::meta::Nil> >

View file

@ -50,8 +50,8 @@ namespace lib {
using ResVal = decltype(data_->operator[](0));
using value_type = typename meta::RefTraits<ResVal>::Value;
using reference = typename meta::RefTraits<ResVal>::Reference;
using value_type = meta::RefTraits<ResVal>::Value;
using reference = meta::RefTraits<ResVal>::Reference;
bool
checkPoint() const
@ -113,7 +113,7 @@ namespace lib {
: public iter::IndexAccessCore<PTR>::IterWrapper
{
using _Cor = iter::IndexAccessCore<PTR>;
using _Par = typename _Cor::IterWrapper;
using _Par = _Cor::IterWrapper;
public:
IndexIter() = default;

View file

@ -60,10 +60,10 @@ namespace lib {
public:
/** this iterator adapter is meant to wrap an iterator yielding pointer values */
using pointer = typename meta::ValueTypeBinding<IT>::value_type;
using pointer = meta::ValueTypeBinding<IT>::value_type;
static_assert(std::is_pointer_v<pointer>);
using value_type = typename std::remove_pointer_t<pointer>;
using value_type = std::remove_pointer_t<pointer>;
using reference = value_type&;
@ -72,10 +72,10 @@ namespace lib {
// the purpose of the following typedefs is to support building a correct "const iterator"
using ValueTypeBase = typename std::remove_const_t<value_type>; // value_type without const
using ValueTypeBase = std::remove_const_t<value_type>; // value_type without const
using WrappedIterType = typename IterType<IT>::template SimilarIter< ValueTypeBase* * >::Type;
using WrappedConstIterType = typename IterType<IT>::template SimilarIter<const ValueTypeBase* * >::Type;
using WrappedIterType = IterType<IT>::template SimilarIter< ValueTypeBase* * >::Type;
using WrappedConstIterType = IterType<IT>::template SimilarIter<const ValueTypeBase* * >::Type;
using IterType = PtrDerefIter<WrappedIterType>;
using ConstIterType = PtrDerefIter<WrappedConstIterType>;
@ -220,7 +220,7 @@ namespace lib {
template<class IT>
class AddressExposingIter
{
using _Ptr = typename IT::pointer;
using _Ptr = IT::pointer;
IT i_; ///< nested source iterator
@ -238,9 +238,9 @@ namespace lib {
public:
using pointer = typename IT::pointer const*;
using reference = typename IT::pointer const&;
using value_type = typename IT::pointer const ;
using pointer = IT::pointer const*;
using reference = IT::pointer const&;
using value_type = IT::pointer const ;
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (AddressExposingIter);

View file

@ -49,9 +49,9 @@ namespace iter_stl {
class DistinctIter
{
public:
using value_type = typename IT::value_type;
using reference = typename IT::reference;
using pointer = typename IT::pointer;
using value_type = IT::value_type;
using reference = IT::reference;
using pointer = IT::pointer;
private:
IT i_;
@ -96,9 +96,9 @@ namespace iter_stl {
template<typename DEF>
struct WrappedStlIter : DEF
{
using Iter = typename DEF::Iter;
using reference = typename DEF::reference;
using pointer = typename DEF::pointer;
using Iter = DEF::Iter;
using reference = DEF::reference;
using pointer = DEF::pointer;
WrappedStlIter() : i_() { }
@ -127,9 +127,9 @@ namespace iter_stl {
struct Wrapped_Identity
{
using Iter = IT;
using value_type = typename IT::value_type;
using reference = typename IT::reference;
using pointer = typename IT::pointer;
using value_type = IT::value_type;
using reference = IT::reference;
using pointer = IT::pointer;
static Iter get (Iter& it) { return & (*it); }
};
@ -142,7 +142,7 @@ namespace iter_stl {
struct Wrapped_PickKey
{
using Iter = IT;
using value_type = typename IT::value_type::first_type;
using value_type = IT::value_type::first_type;
using reference = value_type &;
using pointer = value_type *;
@ -157,7 +157,7 @@ namespace iter_stl {
struct Wrapped_PickVal
{
using Iter = IT;
using value_type = typename IT::value_type::second_type;
using value_type = IT::value_type::second_type;
using reference = value_type &;
using pointer = value_type *;
@ -168,7 +168,7 @@ namespace iter_stl {
struct Wrapped_PickConstVal
{
using Iter = IT;
using value_type = const typename IT::value_type::second_type;
using value_type = const IT::value_type::second_type;
using reference = const value_type &;
using pointer = const value_type *;
@ -185,17 +185,17 @@ namespace iter_stl {
template<class MAP>
struct _MapTypeSelector
{
using Key = typename MAP::value_type::first_type;
using Val = typename MAP::value_type::second_type;
using Itr = typename MAP::iterator;
using Key = MAP::value_type::first_type;
using Val = MAP::value_type::second_type;
using Itr = MAP::iterator;
};
template<class MAP>
struct _MapTypeSelector<const MAP>
{
using Key = typename MAP::value_type::first_type;
using Val = typename MAP::value_type::second_type const;
using Itr = typename MAP::const_iterator;
using Key = MAP::value_type::first_type;
using Val = MAP::value_type::second_type const;
using Itr = MAP::const_iterator;
};
/** helper to access the parts of the pair values correctly...*/
@ -219,13 +219,13 @@ namespace iter_stl {
template<class MAP>
struct _MapT
{
using KeyType = typename _MapTypeSelector<MAP>::Key;
using ValType = typename _MapTypeSelector<MAP>::Val;
using EntryIter = typename _MapTypeSelector<MAP>::Itr;
using KeyType = _MapTypeSelector<MAP>::Key;
using ValType = _MapTypeSelector<MAP>::Val;
using EntryIter = _MapTypeSelector<MAP>::Itr;
using DetectConst = typename EntryIter::reference;
using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
using DetectConst = EntryIter::reference;
using PickKeyIter = _MapSubSelector<EntryIter,DetectConst>::PickKey;
using PickValIter = _MapSubSelector<EntryIter,DetectConst>::PickVal;
using KeyIter = RangeIter<PickKeyIter>;
using ValIter = RangeIter<PickValIter>;
@ -239,12 +239,12 @@ namespace iter_stl {
{
using EntryIter = IT;
using KeyType = typename EntryIter::value_type::first_type;
using ValType = typename EntryIter::value_type::second_type;
using KeyType = EntryIter::value_type::first_type;
using ValType = EntryIter::value_type::second_type;
using DetectConst = typename EntryIter::reference;
using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
using DetectConst = EntryIter::reference;
using PickKeyIter = _MapSubSelector<EntryIter,DetectConst>::PickKey;
using PickValIter = _MapSubSelector<EntryIter,DetectConst>::PickVal;
using KeyIter = RangeIter<PickKeyIter>;
using ValIter = RangeIter<PickValIter>;
@ -257,7 +257,7 @@ namespace iter_stl {
template<class SEQ>
struct _SeqT
{
using Iter = typename SEQ::iterator;
using Iter = SEQ::iterator;
using Range = RangeIter<Iter>;
using DistinctVals = DistinctIter<Range>;
using Addrs = AddressExposingIter<Range>;
@ -266,7 +266,7 @@ namespace iter_stl {
template<class SEQ>
struct _SeqT<const SEQ>
{
using Iter = typename SEQ::const_iterator;
using Iter = SEQ::const_iterator;
using Range = RangeIter<Iter>;
using DistinctVals = DistinctIter<Range>;
using Addrs = AddressExposingIter<Range>;
@ -281,10 +281,10 @@ namespace iter_stl {
* to yield each Element from a STL container
*/
template<class CON>
inline typename _SeqT<CON>::Range
inline _SeqT<CON>::Range
eachElm (CON& coll)
{
using Range = typename _SeqT<CON>::Range;
using Range = _SeqT<CON>::Range;
return Range (coll.begin(), coll.end());
}
@ -293,10 +293,10 @@ namespace iter_stl {
* exposing the address of each Element within a STL
*/
template<class CON>
inline typename _SeqT<CON>::Addrs
inline _SeqT<CON>::Addrs
eachAddress (CON& coll)
{
using Addresses = typename _SeqT<CON>::Addrs;
using Addresses = _SeqT<CON>::Addrs;
return Addresses (eachElm (coll));
}
@ -305,11 +305,11 @@ namespace iter_stl {
* each key of a map/multimap
*/
template<class MAP>
inline typename _MapT<MAP>::KeyIter
inline _MapT<MAP>::KeyIter
eachKey (MAP& map)
{
using Range = typename _MapT<MAP>::KeyIter;
using PickKey = typename _MapT<MAP>::PickKeyIter;
using Range = _MapT<MAP>::KeyIter;
using PickKey = _MapT<MAP>::PickKeyIter;
return Range (PickKey (map.begin()), PickKey (map.end()));
}
@ -319,11 +319,11 @@ namespace iter_stl {
* from a given range of (key,value) pairs
*/
template<class IT>
inline typename _MapIterT<IT>::KeyIter
inline _MapIterT<IT>::KeyIter
eachKey (IT const& begin, IT const& end)
{
using Range = typename _MapIterT<IT>::KeyIter;
using PickKey = typename _MapIterT<IT>::PickKeyIter;
using Range = _MapIterT<IT>::KeyIter;
using PickKey = _MapIterT<IT>::PickKeyIter;
return Range (PickKey (begin), PickKey (end));
}
@ -333,11 +333,11 @@ namespace iter_stl {
* each value within a map/multimap
*/
template<class MAP>
inline typename _MapT<MAP>::ValIter
inline _MapT<MAP>::ValIter
eachVal (MAP& map)
{
using Range = typename _MapT<MAP>::ValIter;
using PickVal = typename _MapT<MAP>::PickValIter;
using Range = _MapT<MAP>::ValIter;
using PickVal = _MapT<MAP>::PickValIter;
return Range (PickVal (map.begin()), PickVal (map.end()));
}
@ -347,11 +347,11 @@ namespace iter_stl {
* from a given range of (key,value) pairs
*/
template<class IT>
inline typename _MapIterT<IT>::ValIter
inline _MapIterT<IT>::ValIter
eachVal (IT const& begin, IT const& end)
{
using Range = typename _MapIterT<IT>::ValIter;
using PickVal = typename _MapIterT<IT>::PickValIter;
using Range = _MapIterT<IT>::ValIter;
using PickVal = _MapIterT<IT>::PickValIter;
return Range (PickVal (begin), PickVal (end));
}
@ -361,11 +361,11 @@ namespace iter_stl {
* any repetitions in the given sequence.
*/
template<class SEQ>
inline typename _SeqT<SEQ>::DistinctVals
inline _SeqT<SEQ>::DistinctVals
eachDistinct (SEQ& seq)
{
using Range = typename _SeqT<SEQ>::Range;
using DistinctValues = typename _SeqT<SEQ>::DistinctVals;
using Range = _SeqT<SEQ>::Range;
using DistinctValues = _SeqT<SEQ>::DistinctVals;
return DistinctValues (Range (seq.begin(), seq.end()));
}
@ -376,7 +376,7 @@ namespace iter_stl {
* @warning full scan of all keys, dropping repetitions
*/
template<class MAP>
inline typename _MapT<MAP>::DistinctKeys
inline _MapT<MAP>::DistinctKeys
eachDistinctKey (MAP& map)
{
return typename _MapT<MAP>::DistinctKeys (eachKey (map));
@ -388,12 +388,12 @@ namespace iter_stl {
* @warning full scan of all keys, dropping repetitions
*/
template<class MMAP, typename KEY>
inline typename _MapT<MMAP>::ValIter
inline _MapT<MMAP>::ValIter
eachValForKey (MMAP& multimap, KEY key)
{
using Pos = typename _MapT<MMAP>::EntryIter;
using Range = typename _MapT<MMAP>::ValIter;
using PickVal = typename _MapT<MMAP>::PickValIter;
using Pos = _MapT<MMAP>::EntryIter;
using Range = _MapT<MMAP>::ValIter;
using PickVal = _MapT<MMAP>::PickValIter;
std::pair<Pos,Pos> valRange = multimap.equal_range (key);

View file

@ -212,9 +212,9 @@ namespace lib {
using _ValTrait = meta::ValueTypeBinding<std::remove_pointer_t<POS>>;
public:
using value_type = typename _ValTrait::value_type;
using reference = typename _ValTrait::reference;
using pointer = typename _ValTrait::pointer;
using value_type = _ValTrait::value_type;
using reference = _ValTrait::reference;
using pointer = _ValTrait::pointer;
IterAdapter (CON src, POS const& startpos)
@ -302,7 +302,7 @@ namespace lib {
protected:
using ConRef = typename meta::RefTraits<CON>::Reference;
using ConRef = meta::RefTraits<CON>::Reference;
/** allow derived classes to access backing container */
ConRef source() { return source_; }
@ -376,9 +376,9 @@ namespace lib {
ST core_;
public:
using value_type = typename meta::RefTraits<T>::Value;
using reference = typename meta::RefTraits<T>::Reference;
using pointer = typename meta::RefTraits<T>::Pointer;
using value_type = meta::RefTraits<T>::Value;
using reference = meta::RefTraits<T>::Reference;
using pointer = meta::RefTraits<T>::Pointer;
IterStateWrapper (ST&& initialState)
: core_(std::forward<ST>(initialState))
@ -519,7 +519,7 @@ namespace lib {
return bool(srcIter());
}
typename IT::reference
IT::reference
yield() const
{
return *srcIter();
@ -614,7 +614,7 @@ namespace lib {
class ContainerCore
: public CON
{
using Iter = typename CON::iterator;
using Iter = CON::iterator;
Iter p_;
@ -694,9 +694,9 @@ namespace lib {
public:
using YieldRes = iter::CoreYield<COR>;
using value_type = typename meta::RefTraits<YieldRes>::Value;
using reference = typename meta::RefTraits<YieldRes>::Reference;
using pointer = typename meta::RefTraits<YieldRes>::Pointer;
using value_type = meta::RefTraits<YieldRes>::Value;
using reference = meta::RefTraits<YieldRes>::Reference;
using pointer = meta::RefTraits<YieldRes>::Pointer;
/** by default, pass anything down for initialisation of the core.
@ -803,11 +803,11 @@ namespace lib {
using _ValTrait = meta::ValueTypeBinding<meta::remove_pointer_t<IT>>;
public:
using pointer = typename _ValTrait::pointer;
using reference = typename _ValTrait::reference;
using pointer = _ValTrait::pointer;
using reference = _ValTrait::reference;
/// @note special twist, since a STL const_iterator would yield a non-const `value_type`
using value_type = typename std::remove_reference<reference>::type;
using value_type = std::remove_reference<reference>::type;
RangeIter (IT const& start, IT const& end)
@ -1052,7 +1052,7 @@ namespace lib {
template<class T2>
struct SimilarIter ///< rebind to rewritten Iterator wrapped into RangeIter
{
using WrappedIter = typename IterType<IT>::template SimilarIter<T2>::Type;
using WrappedIter = IterType<IT>::template SimilarIter<T2>::Type;
using Type = RangeIter<WrappedIter>;
};
};
@ -1067,9 +1067,9 @@ namespace lib {
public:
using value_type = const typename IT::value_type;
using pointer = const typename IT::pointer ;
using reference = const typename IT::reference ;
using value_type = const IT::value_type;
using pointer = const IT::pointer ;
using reference = const IT::reference ;
ConstIter (IT srcIter)
: i_(srcIter)

View file

@ -150,11 +150,11 @@ namespace iter {
: public _IterChainSetup<SRC>::Pipeline
{
using _Trait = _IterChainSetup<SRC>;
using _Base = typename _Trait::Pipeline;
using _Base = _Trait::Pipeline;
using Value = typename _Base::value_type;
using Filter = typename _Trait::Filter;
using Step = typename _Trait::StepFunctor;
using Value = _Base::value_type;
using Filter = _Trait::Filter;
using Step = _Trait::StepFunctor;
/** Storage for a sequence of filter configuration functors */
std::vector<Step> stepChain_;

View file

@ -56,9 +56,9 @@ namespace lib {
public:
using pointer = typename meta::ValueTypeBinding<IT>::pointer;
using reference = typename meta::ValueTypeBinding<IT>::reference;
using value_type = typename std::remove_reference<reference>::type; ///< @note will be const for const iterators (while const_iterator::value_type isn't)
using pointer = meta::ValueTypeBinding<IT>::pointer;
using reference = meta::ValueTypeBinding<IT>::reference;
using value_type = std::remove_reference<reference>::type; ///< @note will be const for const iterators (while const_iterator::value_type isn't)
CursorGear()

View file

@ -133,9 +133,9 @@ namespace lib {
namespace iter_explorer { // basic iterator wrappers...
template<class CON>
using iterator = typename meta::Strip<CON>::TypeReferred::iterator;
using iterator = meta::Strip<CON>::TypeReferred::iterator;
template<class CON>
using const_iterator = typename meta::Strip<CON>::TypeReferred::const_iterator;
using const_iterator = meta::Strip<CON>::TypeReferred::const_iterator;
/**
* Adapt STL compliant container.
@ -190,7 +190,7 @@ namespace lib {
class IterSourceIter
: public ISO::iterator
{
using Iterator = typename ISO::iterator;
using Iterator = ISO::iterator;
public:
IterSourceIter() =default;
@ -273,8 +273,8 @@ namespace lib {
template<class SRC>
struct _DecoratorTraits<SRC, enable_if<is_StateCore<SRC>>>
{
using SrcRaw = typename lib::meta::Strip<SRC>::Type;
using SrcVal = typename meta::RefTraits<iter::CoreYield<SrcRaw>>::Value;
using SrcRaw = lib::meta::Strip<SRC>::Type;
using SrcVal = meta::RefTraits<iter::CoreYield<SrcRaw>>::Value;
using SrcIter = lib::IterableDecorator<lib::CheckedCore<SrcRaw>>;
};
@ -282,7 +282,7 @@ namespace lib {
struct _DecoratorTraits<SRC, enable_if<shall_use_Lumiera_Iter<SRC>>>
{
using SrcIter = remove_reference_t<SRC>;
using SrcVal = typename SrcIter::value_type;
using SrcVal = SrcIter::value_type;
};
template<class SRC>
@ -291,14 +291,14 @@ namespace lib {
static_assert (not std::is_rvalue_reference<SRC>::value,
"container needs to exist elsewhere during the lifetime of the iteration");
using SrcIter = iter_explorer::StlRange<SRC>;
using SrcVal = typename SrcIter::value_type;
using SrcVal = SrcIter::value_type;
};
template<class ISO>
struct _DecoratorTraits<ISO*, enable_if<is_base_of<IterSource<typename ISO::value_type>, ISO>>>
{
using SrcIter = iter_explorer::IterSourceIter<ISO>;
using SrcVal = typename ISO::value_type;
using SrcVal = ISO::value_type;
};
template<class ISO>
@ -324,7 +324,7 @@ namespace lib {
template<class SRC, class RES>
struct _ExpanderTraits
{
using ResIter = typename _DecoratorTraits<RES>::SrcIter;
using ResIter = _DecoratorTraits<RES>::SrcIter;
using SrcYield = iter::Yield<SRC>;
using ResYield = iter::Yield<ResIter>;
using _CommonT = meta::CommonResultYield<SrcYield,ResYield>;
@ -336,10 +336,10 @@ namespace lib {
static_assert (is_const_v<SrcYield> == is_const_v<ResYield>,
"source and expanded types differ in const-ness");
using YieldRes = typename _CommonT::ResType;
using value_type = typename _CommonT::value_type;
using reference = typename _CommonT::reference;
using pointer = typename _CommonT::pointer;
using YieldRes = _CommonT::ResType;
using value_type = _CommonT::value_type;
using reference = _CommonT::reference;
using pointer = _CommonT::pointer;
};
}//(End) IterExplorer traits
@ -389,22 +389,22 @@ namespace lib {
template<typename F, typename SEL =void>
struct FunDetector
{
using Sig = typename _Fun<F>::Sig;
using Sig = _Fun<F>::Sig;
};
/** handle a generic lambda, accepting a reference to the `SRC` iterator */
template<typename F>
struct FunDetector<F, disable_if<_Fun<F>> >
{
using Arg = typename std::add_lvalue_reference<SRC>::type;
using Arg = std::add_lvalue_reference<SRC>::type;
using Ret = decltype(std::declval<F>() (std::declval<Arg>()));
using Sig = Ret(Arg);
};
using Sig = typename FunDetector<FUN>::Sig;
using Arg = typename _Fun<Sig>::Args::List::Head; // assuming function with a single argument
using Res = typename _Fun<Sig>::Ret;
using Sig = FunDetector<FUN>::Sig;
using Arg = _Fun<Sig>::Args::List::Head; // assuming function with a single argument
using Res = _Fun<Sig>::Ret;
static_assert (meta::is_UnaryFun<Sig>());
@ -442,7 +442,7 @@ namespace lib {
, is_base_of<IterSource<typename IT::value_type>, remove_reference_t<Arg>>
> >>
{
using Source = typename IT::Source;
using Source = IT::Source;
static auto
wrap (function<Sig> rawFun) ///< extract the (abstracted) IterSource
@ -466,7 +466,7 @@ namespace lib {
inline void
static_assert_isPredicate()
{
using Res = typename _FunTraits<FUN,SRC>::Res;
using Res = _FunTraits<FUN,SRC>::Res;
static_assert(std::is_constructible<bool, Res>::value, "Functor must be a predicate");
}
@ -477,8 +477,8 @@ namespace lib {
template<class SRC, class FUN>
struct _ReduceTraits
{
using Result = typename iter_explorer::_FunTraits<FUN,SRC>::Res;
using ResVal = typename lib::meta::RefTraits<Result>::Value;
using Result = iter_explorer::_FunTraits<FUN,SRC>::Res;
using ResVal = lib::meta::RefTraits<Result>::Value;
};
@ -557,7 +557,7 @@ namespace lib {
static_assert(can_IterForEach<SRC>::value, "Lumiera Iterator required as source");
using _Trait = _ExpanderTraits<SRC,RES>;
using ResIter = typename _Trait::ResIter;
using ResIter = _Trait::ResIter;
using RootExpandFunctor = function<RES(SRC&)>;
using ChldExpandFunctor = function<RES(ResIter&)>;
@ -621,10 +621,10 @@ namespace lib {
public: /* === Iteration control API for IterableDecorator === */
/** @note result type bindings based on a common type of source and expanded result */
using YieldRes = typename _Trait::YieldRes;
using value_type = typename _Trait::value_type;
using reference = typename _Trait::reference;
using pointer = typename _Trait::pointer;
using YieldRes = _Trait::YieldRes;
using value_type = _Trait::value_type;
using reference = _Trait::reference;
using pointer = _Trait::pointer;
bool
@ -791,9 +791,9 @@ namespace lib {
TransformedItem treated_;
public:
using value_type = typename meta::ValueTypeBinding<RES>::value_type;
using reference = typename meta::ValueTypeBinding<RES>::reference;
using pointer = typename meta::ValueTypeBinding<RES>::pointer;
using value_type = meta::ValueTypeBinding<RES>::value_type;
using reference = meta::ValueTypeBinding<RES>::reference;
using pointer = meta::ValueTypeBinding<RES>::pointer;
template<typename FUN>
@ -896,7 +896,7 @@ namespace lib {
protected:
using Group = std::array<RES, grp>;
using Iter = typename Group::iterator;
using Iter = Group::iterator;
struct Buffer
: lib::UninitialisedStorage<RES,grp>
{
@ -1028,7 +1028,7 @@ namespace lib {
static_assert(can_IterForEach<SRC>::value, "Lumiera Iterator required as source");
protected:
using SrcValue = typename meta::ValueTypeBinding<SRC>::value_type;
using SrcValue = meta::ValueTypeBinding<SRC>::value_type;
using Grouping = function<GRP(SRC&)>;
using Aggregator = function<void(AGG&, SrcValue&)>;
@ -1038,9 +1038,9 @@ namespace lib {
Aggregator aggregate_;
public:
using value_type = typename meta::RefTraits<AGG>::Value;
using reference = typename meta::RefTraits<AGG>::Reference;
using pointer = typename meta::RefTraits<AGG>::Pointer;
using value_type = meta::RefTraits<AGG>::Value;
using reference = meta::RefTraits<AGG>::Reference;
using pointer = meta::RefTraits<AGG>::Pointer;
GroupAggregator() =default;
// inherited default copy operations
@ -1152,7 +1152,7 @@ namespace lib {
return bool(srcIter());
}
typename SRC::reference
SRC::reference
yield() const
{
return *srcIter();
@ -1446,7 +1446,7 @@ namespace lib {
, public ChildExpandableSource<typename SRC::value_type>
{
using Parent = WrappedLumieraIter<SRC>;
using Val = typename SRC::value_type; ///////////////////////////////////TICKET #1125 : get rid of Val
using Val = SRC::value_type; ///////////////////////////////////TICKET #1125 : get rid of Val
~PackagedIterExplorerSource() { }
public:
@ -1583,9 +1583,9 @@ namespace lib {
public:
using value_type = typename meta::ValueTypeBinding<SRC>::value_type;
using reference = typename meta::ValueTypeBinding<SRC>::reference;
using pointer = typename meta::ValueTypeBinding<SRC>::pointer;
using value_type = meta::ValueTypeBinding<SRC>::value_type;
using reference = meta::ValueTypeBinding<SRC>::reference;
using pointer = meta::ValueTypeBinding<SRC>::pointer;
using TAG_IterExplorer_Src = SRC; ///< @internal for \ref _PipelineDetector
@ -1640,10 +1640,10 @@ namespace lib {
auto
expand (FUN&& expandFunctor)
{
using ExpandedChildren = typename iter_explorer::_FunTraits<FUN,SRC>::Res;
using ExpandedChildren = iter_explorer::_FunTraits<FUN,SRC>::Res;
using ResCore = iter_explorer::Expander<SRC, ExpandedChildren>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this), forward<FUN>(expandFunctor)});
}
@ -1664,7 +1664,7 @@ namespace lib {
expandAll()
{
using ResCore = iter_explorer::AutoExpander<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this)});
}
@ -1692,7 +1692,7 @@ namespace lib {
expandOnIteration()
{
using ResCore = iter_explorer::ScheduledExpander<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this)});
}
@ -1712,10 +1712,10 @@ namespace lib {
auto
transform (FUN&& transformFunctor)
{
using Product = typename iter_explorer::_FunTraits<FUN,SRC>::Res;
using Product = iter_explorer::_FunTraits<FUN,SRC>::Res;
using ResCore = iter_explorer::Transformer<SRC, Product>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this), forward<FUN>(transformFunctor)});
}
@ -1733,9 +1733,9 @@ namespace lib {
auto
grouped()
{
using Value = typename meta::ValueTypeBinding<SRC>::value_type;
using Value = meta::ValueTypeBinding<SRC>::value_type;
using ResCore = iter_explorer::Grouping<SRC, Value, grp>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this)});
}
@ -1756,14 +1756,14 @@ namespace lib {
auto
groupedBy (FGRP&& groupFun, FAGG&& aggFun)
{
using GroupVal = typename iter_explorer::_FunTraits<FGRP,SRC>::Res;
using GroupVal = iter_explorer::_FunTraits<FGRP,SRC>::Res;
static_assert (meta::is_BinaryFun<FAGG>());
using ArgType1 = typename _Fun<FAGG>::Args::List::Head;
using Aggregate = typename meta::RefTraits<ArgType1>::Value;
using ArgType1 = _Fun<FAGG>::Args::List::Head;
using Aggregate = meta::RefTraits<ArgType1>::Value;
using ResCore = iter_explorer::GroupAggregator<SRC, Aggregate, GroupVal>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this)
,forward<FGRP> (groupFun)
@ -1775,7 +1775,7 @@ namespace lib {
auto
groupedBy (FGRP&& groupFun)
{
using Value = typename meta::ValueTypeBinding<SRC>::value_type;
using Value = meta::ValueTypeBinding<SRC>::value_type;
return groupedBy (forward<FGRP> (groupFun)
,[](Value& agg, Value const& val){ agg += val; }
);
@ -1792,7 +1792,7 @@ namespace lib {
iter_explorer::static_assert_isPredicate<FUN,SRC>();
using ResCore = iter_explorer::StopTrigger<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this), forward<FUN>(whileCond)});
}
@ -1808,8 +1808,8 @@ namespace lib {
iter_explorer::static_assert_isPredicate<FUN,SRC>();
using ResCore = iter_explorer::StopTrigger<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ArgType = typename iter_explorer::_FunTraits<FUN,SRC>::Arg;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
using ArgType = iter_explorer::_FunTraits<FUN,SRC>::Arg;
return IterExplorer<ResIter> (ResCore { move(*this)
,[whileCond = forward<FUN>(untilCond)](ArgType val)
@ -1833,7 +1833,7 @@ namespace lib {
iter_explorer::static_assert_isPredicate<FUN,SRC>();
using ResCore = iter_explorer::Filter<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this), forward<FUN>(filterPredicate)});
}
@ -1863,7 +1863,7 @@ namespace lib {
iter_explorer::static_assert_isPredicate<FUN,SRC>();
using ResCore = iter_explorer::MutableFilter<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this), forward<FUN>(filterPredicate)});
}
@ -1893,7 +1893,7 @@ namespace lib {
processingLayer()
{
using ResCore = LAY<SRC>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
return IterExplorer<ResIter> (ResCore {move(*this)});
}
@ -1904,7 +1904,7 @@ namespace lib {
auto
asPtr()
{
using Val = typename meta::ValueTypeBinding<SRC>::value_type;
using Val = meta::ValueTypeBinding<SRC>::value_type;
static_assert (not std::is_pointer_v<Val>);
return IterExplorer::transform ([](Val& ref){ return &ref; });
}
@ -1913,7 +1913,7 @@ namespace lib {
auto
derefPtr()
{
using Ptr = typename meta::ValueTypeBinding<SRC>::value_type;
using Ptr = meta::ValueTypeBinding<SRC>::value_type;
return IterExplorer::transform ([](Ptr ptr){ return *ptr; });
}
@ -1925,9 +1925,9 @@ namespace lib {
auto
deduplicate()
{
using Value = typename meta::ValueTypeBinding<SRC>::value_type;
using Value = meta::ValueTypeBinding<SRC>::value_type;
using ResCore = ContainerCore<SET<Value>>;
using ResIter = typename _DecoratorTraits<ResCore>::SrcIter;
using ResIter = _DecoratorTraits<ResCore>::SrcIter;
SET<Value> buffer;
for (auto& val : *this)
buffer.emplace (val);
@ -2106,7 +2106,7 @@ namespace lib {
template<class COR> // used when actually a CheckedCore was attached
struct _UnstripAdapter<COR, std::void_t<typename COR::TAG_CheckedCore_Raw> >
{
using RawIter = typename COR::TAG_CheckedCore_Raw;
using RawIter = COR::TAG_CheckedCore_Raw;
};
@ -2123,8 +2123,8 @@ namespace lib {
template<class SRC>
struct _PipelineDetector<SRC, std::void_t<typename SRC::TAG_IterExplorer_Src> >
{
using _SrcIT = typename SRC::TAG_IterExplorer_Src;
using RawIter = typename _UnstripAdapter<_SrcIT>::RawIter;
using _SrcIT = SRC::TAG_IterExplorer_Src;
using RawIter = _UnstripAdapter<_SrcIT>::RawIter;
};
}//(End)internal adapter logic
@ -2188,9 +2188,9 @@ namespace lib {
inline auto
explore (IT&& srcSeq)
{
using RawIter = typename _PipelineDetector<IT>::RawIter; // possibly strip an underlying IterExplorer
using SrcIter = typename _DecoratorTraits<RawIter>::SrcIter; // then decide how to adapt the source / iterator
using Base = typename _BaseDetector<SrcIter>::BaseAdapter; // detect if a BaseAdapter exists or must be added
using RawIter = _PipelineDetector<IT>::RawIter; // possibly strip an underlying IterExplorer
using SrcIter = _DecoratorTraits<RawIter>::SrcIter; // then decide how to adapt the source / iterator
using Base = _BaseDetector<SrcIter>::BaseAdapter; // detect if a BaseAdapter exists or must be added
return IterExplorer<Base> (std::forward<IT> (srcSeq));
}

View file

@ -206,7 +206,7 @@ namespace lib {
/** storage for the empty data-source constant */
template<typename TY>
typename IterSource<TY>::iterator IterSource<TY>::EMPTY_SOURCE = iterator();
IterSource<TY>::iterator IterSource<TY>::EMPTY_SOURCE = iterator();
@ -226,7 +226,7 @@ namespace lib {
IT src_;
protected:
using Pos = typename ISO::Pos;
using Pos = ISO::Pos;
Pos ////////////////////////////////////////////////////TICKET #1125 : this API should use three control functions, similar to IterStateWrapper
firstResult ()
@ -276,55 +276,55 @@ namespace lib {
template<class CON>
struct _SeqT
{
using Val = typename CON::iterator::value_type;
using Iter = typename IterSource<Val>::iterator;
using Val = CON::iterator::value_type;
using Iter = IterSource<Val>::iterator;
};
template<class IT>
struct _RangeT
{
using Val = typename IT::value_type;
using Iter = typename IterSource<Val>::iterator;
using Val = IT::value_type;
using Iter = IterSource<Val>::iterator;
};
template<class MAP>
struct _MapT
{
using Key = typename MAP::key_type;
using Val = typename MAP::value_type::second_type;
using KeyIter = typename IterSource<Key>::iterator;
using ValIter = typename IterSource<Val>::iterator;
using Key = MAP::key_type;
using Val = MAP::value_type::second_type;
using KeyIter = IterSource<Key>::iterator;
using ValIter = IterSource<Val>::iterator;
};
template<class IT>
struct _IterT
{
using Src = typename std::remove_reference<IT>::type;
using Val = typename Src::value_type;
using Iter = typename IterSource<Val>::iterator;
using Src = std::remove_reference<IT>::type;
using Val = Src::value_type;
using Iter = IterSource<Val>::iterator;
};
template<class IT, class FUN>
struct _TransformIterT
{
using Src = typename std::remove_reference<IT>::type;
using ResVal = typename lib::meta::_Fun<FUN>::Ret;
using Src = std::remove_reference<IT>::type;
using ResVal = lib::meta::_Fun<FUN>::Ret;
using TransIter = TransformIter<Src, ResVal>;
using Iter = typename IterSource<ResVal>::iterator;
using Iter = IterSource<ResVal>::iterator;
};
template<class IT>
struct _PairIterT
{
using Src = typename std::remove_reference<IT>::type;
using PairType = typename Src::value_type;
using ValType = typename PairType::second_type;
using ConstKeyType = typename PairType::first_type;
using Src = std::remove_reference<IT>::type;
using PairType = Src::value_type;
using ValType = PairType::second_type;
using ConstKeyType = PairType::first_type;
// since we're returning the keys always by value,
// we can strip the const added by the STL map types
using KeyType = typename std::remove_const<ConstKeyType>::type;
using KeyType = std::remove_const<ConstKeyType>::type;
using KeyIter = TransformIter<Src, KeyType>;
using ValIter = TransformIter<Src, ValType>;
@ -335,14 +335,14 @@ namespace lib {
template<class IT>
typename _PairIterT<IT>::KeyIter
_PairIterT<IT>::KeyIter
takePairFirst (IT&& source)
{
return transformIterator(forward<IT>(source), _PairIterT<IT>::takeFirst );
}
template<class IT>
typename _PairIterT<IT>::ValIter
_PairIterT<IT>::ValIter
takePairSecond (IT&& source)
{
return transformIterator(forward<IT>(source), _PairIterT<IT>::takeSecond );
@ -356,11 +356,11 @@ namespace lib {
* exposing just a IterSource based frontend.
*/
template<class IT>
typename _IterT<IT>::Iter
_IterT<IT>::Iter
wrapIter (IT&& source)
{
using Src = typename _IterT<IT>::Src;
using Val = typename _IterT<IT>::Val;
using Src = _IterT<IT>::Src;
using Val = _IterT<IT>::Val;
return IterSource<Val>::build (new WrappedLumieraIter<Src> (forward<IT>(source)));
}
@ -376,7 +376,7 @@ namespace lib {
singleVal (VAL&& something)
{
using Src = decltype(singleValIterator (forward<VAL>(something)));
using Val = typename _IterT<Src>::Val;
using Val = _IterT<Src>::Val;
return IterSource<Val>::build (new WrappedLumieraIter<Src>{singleValIterator (forward<VAL>(something))});
}
@ -392,11 +392,11 @@ namespace lib {
* function call for every fetched element.
*/
template<class IT, class FUN>
typename _TransformIterT<IT,FUN>::Iter
_TransformIterT<IT,FUN>::Iter
transform (IT&& source, FUN processingFunc)
{
using ValType = typename _TransformIterT<IT,FUN>::ResVal;
using TransIT = typename _TransformIterT<IT,FUN>::TransIter;
using ValType = _TransformIterT<IT,FUN>::ResVal;
using TransIT = _TransformIterT<IT,FUN>::TransIter;
return IterSource<ValType>::build (
new WrappedLumieraIter<TransIT> (
@ -408,7 +408,7 @@ namespace lib {
* all the keys of the given Map or Hashtable
*/
template<class MAP>
typename _MapT<MAP>::KeyIter
_MapT<MAP>::KeyIter
eachMapKey (MAP& map)
{
using Range = RangeIter<typename MAP::iterator>;
@ -422,7 +422,7 @@ namespace lib {
* all the values of the given Map or Hashtable
*/
template<class MAP>
typename _MapT<MAP>::ValIter
_MapT<MAP>::ValIter
eachMapVal (MAP& map)
{
using Range = RangeIter<typename MAP::iterator>;
@ -438,7 +438,7 @@ namespace lib {
* the distinct keys
*/
template<class MAP>
typename _MapT<MAP>::KeyIter
_MapT<MAP>::KeyIter
eachDistinctKey (MAP& map)
{
using Range = RangeIter<typename MAP::iterator>;
@ -453,10 +453,10 @@ namespace lib {
* @note obviously in case of a Map we'll get at most one result.
*/
template<class MAP>
typename _MapT<MAP>::ValIter
_MapT<MAP>::ValIter
eachValForKey (MAP& map, typename _MapT<MAP>::Key key)
{
using Pos = typename MAP::iterator;
using Pos = MAP::iterator;
using Range = RangeIter<Pos>;
std::pair<Pos,Pos> valuesForKey = map.equal_range(key);
@ -472,10 +472,10 @@ namespace lib {
* starting with \c begin and excluding \c end .
*/
template<class CON>
typename _SeqT<CON>::Iter
_SeqT<CON>::Iter
eachEntry (CON& container)
{
using ValType = typename _SeqT<CON>::Val;
using ValType = _SeqT<CON>::Val;
using Range = RangeIter<typename CON::iterator>;
Range contents (container.begin(), container.end());
@ -487,10 +487,10 @@ namespace lib {
* defined by a classical Iterator range.
*/
template<class IT>
typename _RangeT<IT>::Iter
_RangeT<IT>::Iter
eachEntry (IT const& begin, IT const& end)
{
using ValType = typename _RangeT<IT>::Val;
using ValType = _RangeT<IT>::Val;
using Range = RangeIter<IT>;
Range contents (begin, end);

View file

@ -137,9 +137,9 @@ namespace lib {
return bool(source_);
}
using pointer = typename IT::pointer;
using reference = typename IT::reference;
using value_type = typename IT::value_type;
using pointer = IT::pointer;
using reference = IT::reference;
using value_type = IT::value_type;
};
@ -186,9 +186,9 @@ namespace lib {
public:
using pointer = typename CORE::pointer;
using reference = typename CORE::reference;
using value_type = typename CORE::value_type;
using pointer = CORE::pointer;
using reference = CORE::reference;
using value_type = CORE::value_type;
IterTool (CORE&& setup)
@ -341,7 +341,7 @@ namespace lib {
typedef IterTool<_Filter> _Impl;
public:
static bool acceptAll(typename _Filter::Val) { return true; }
static bool acceptAll(_Filter::Val) { return true; }
FilterIter ()
@ -378,7 +378,7 @@ namespace lib {
inline auto
filterIterator (IT&& src, PRED filterPredicate)
{
using SrcIT = typename std::remove_reference<IT>::type;
using SrcIT = std::remove_reference<IT>::type;
return FilterIter<SrcIT>{forward<IT>(src), filterPredicate};
}
@ -411,7 +411,7 @@ namespace lib {
: public FilterIter<IT>
{
using _Filter = FilterCore<IT>;
using Val = typename _Filter::Val;
using Val = _Filter::Val;
void
reEvaluate()
@ -739,9 +739,9 @@ namespace lib {
return bool(source_);
}
using pointer = typename ValueTypeBinding<VAL>::pointer;
using reference = typename ValueTypeBinding<VAL>::reference;
using value_type = typename ValueTypeBinding<VAL>::value_type;
using pointer = ValueTypeBinding<VAL>::pointer;
using reference = ValueTypeBinding<VAL>::reference;
using value_type = ValueTypeBinding<VAL>::value_type;
};
@ -787,7 +787,7 @@ namespace lib {
inline auto
transformIterator (IT const& src, FUN processingFunc)
{
using OutVal = typename lib::meta::_Fun<FUN>::Ret;
using OutVal = lib::meta::_Fun<FUN>::Ret;
return TransformIter<IT,OutVal>{src,processingFunc};
}
@ -795,8 +795,8 @@ namespace lib {
inline auto
transformIterator (IT&& src, FUN processingFunc)
{
using SrcIT = typename std::remove_reference<IT>::type;
using OutVal = typename lib::meta::_Fun<FUN>::Ret;
using SrcIT = std::remove_reference<IT>::type;
using OutVal = lib::meta::_Fun<FUN>::Ret;
return TransformIter<SrcIT,OutVal>{forward<IT>(src), processingFunc};
}
@ -815,10 +815,10 @@ namespace lib {
template<class IT>
inline typename IT::value_type
inline IT::value_type
pull_last (IT iter)
{
using Val = typename IT::value_type;
using Val = IT::value_type;
using Item = wrapper::ItemWrapper<Val>;
Item lastElm;
@ -845,7 +845,7 @@ namespace lib {
inline auto
filterRepetitions (IT const& source)
{
using Val = typename meta::ValueTypeBinding<IT>::value_type;
using Val = meta::ValueTypeBinding<IT>::value_type;
return filterIterator (source, SkipRepetition<Val>());
}
@ -853,7 +853,7 @@ namespace lib {
inline auto
filterRepetitions (IT&& source)
{
using Val = typename meta::ValueTypeBinding<IT>::value_type;
using Val = meta::ValueTypeBinding<IT>::value_type;
return filterIterator (forward<IT>(source), SkipRepetition<Val>() );
}

View file

@ -179,7 +179,7 @@ namespace lib {
generateTrap (DEL* delegate)
{
static_assert (_Fun<DEL>(), "Delegate must be function-like");
using Ret = typename _Fun<DEL>::Ret;
using Ret = _Fun<DEL>::Ret;
static_assert (_Fun<Ret>(), "Result from invoking delegate must also be function-like");
static_assert (has_Sig<Ret, SIG>(), "Result from delegate must expose target signature");

View file

@ -184,7 +184,7 @@ namespace lib {
* discarding of node elements
*/
explicit
LinkedElements (typename ALO::CustomAllocator allo)
LinkedElements (ALO::CustomAllocator allo)
: ALO{allo}
, head_{nullptr}
{ }

View file

@ -114,7 +114,7 @@
{ \
\
template<class X> \
static Yes_t check(typename X::_TYPE_ *); \
static Yes_t check(X::_TYPE_ *); \
template<class> \
static No_t check(...); \
\
@ -183,30 +183,30 @@
* and return type. Yet a non-function member will not trigger this detector.
* @note this check will fail if there are overloads or similar ambiguity
*/
#define META_DETECT_FUNCTION_NAME(_FUN_NAME_) \
template<typename TY> \
class HasFunName_##_FUN_NAME_ \
{ \
template<typename SEL> \
struct Probe; \
template<class C, typename RET, typename...ARGS> \
struct Probe<RET (C::*) (ARGS...)> \
{ \
using Match = void; \
}; \
template<class C, typename RET, typename...ARGS> \
struct Probe<RET (C::*) (ARGS...) const> \
{ \
using Match = void; \
}; \
\
template<class X> \
static Yes_t check(typename Probe<decltype(&X::_FUN_NAME_)>::Match * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
#define META_DETECT_FUNCTION_NAME(_FUN_NAME_) \
template<typename TY> \
class HasFunName_##_FUN_NAME_ \
{ \
template<typename SEL> \
struct Probe; \
template<class C, typename RET, typename...ARGS> \
struct Probe<RET (C::*) (ARGS...)> \
{ \
using Match = void; \
}; \
template<class C, typename RET, typename...ARGS> \
struct Probe<RET (C::*) (ARGS...) const> \
{ \
using Match = void; \
}; \
\
template<class X> \
static Yes_t check(Probe<decltype(&X::_FUN_NAME_)>::Match * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
};
@ -216,22 +216,22 @@
* @remarks the presence of overloads is irrelevant, since we explicitly
* from an invocation to that function (within `decltype`)
*/
#define META_DETECT_FUNCTION_ARGLESS(_FUN_) \
template<typename TY> \
class HasArglessFun_##_FUN_ \
{ \
template<typename X, \
#define META_DETECT_FUNCTION_ARGLESS(_FUN_) \
template<typename TY> \
class HasArglessFun_##_FUN_ \
{ \
template<typename X, \
typename SEL = decltype(std::declval<X>()._FUN_())>\
struct Probe \
{ }; \
\
template<class X> \
static Yes_t check(Probe<X> * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
struct Probe \
{ }; \
\
template<class X> \
static Yes_t check(Probe<X> * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
};
@ -245,22 +245,22 @@
* type checks, the extension point is assumed to be supported.
* @warning beware of implicit type conversions
*/
#define META_DETECT_EXTENSION_POINT(_FUN_) \
template<typename TY> \
class HasExtensionPoint_##_FUN_ \
{ \
template<typename X, \
#define META_DETECT_EXTENSION_POINT(_FUN_) \
template<typename TY> \
class HasExtensionPoint_##_FUN_ \
{ \
template<typename X, \
typename SEL = decltype( _FUN_(std::declval<X>()))>\
struct Probe \
{ }; \
\
template<class X> \
static Yes_t check(Probe<X> * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
struct Probe \
{ }; \
\
template<class X> \
static Yes_t check(Probe<X> * ); \
template<class> \
static No_t check(...); \
\
public: \
static const bool value = (sizeof(Yes_t)==sizeof(check<TY>(0))); \
};

View file

@ -96,7 +96,7 @@ namespace func{
template<typename X, typename TAIL, size_t i>
struct PlaceholderTuple<Node<X,TAIL>, i>
{
using TailPlaceholders = typename PlaceholderTuple<TAIL,i+1>::List;
using TailPlaceholders = PlaceholderTuple<TAIL,i+1>::List;
using List = Node<_Placeholder<i>, TailPlaceholders>;
};
@ -136,7 +136,7 @@ namespace func{
struct PartiallyInitTuple
{
template<size_t i>
using DestType = typename std::tuple_element_t<i, TAR>;
using DestType = std::tuple_element_t<i, TAR>;
/**
@ -257,8 +257,8 @@ namespace func{
buildInvokableWrapper (FUN&& fun)
{
static_assert (is_Typelist<TYPES>::value);
using ArgTypes = typename TYPES::Seq;
using Builder = typename lib::meta::RebindVariadic<AdaptInvokable, ArgTypes>::Type;
using ArgTypes = TYPES::Seq;
using Builder = lib::meta::RebindVariadic<AdaptInvokable, ArgTypes>::Type;
return Builder::buildWrapper (forward<FUN> (fun));
}
@ -290,11 +290,11 @@ namespace func{
template<typename SIG, typename VAL>
class PApply
{
using Args = typename _Fun<SIG>::Args;
using Ret = typename _Fun<SIG>::Ret;
using ArgsList = typename Args::List;
using ValList = typename VAL::List;
using ValTypes = typename Types<ValList>::Seq; // reconstruct a type-seq from a type-list
using Args = _Fun<SIG>::Args;
using Ret = _Fun<SIG>::Ret;
using ArgsList = Args::List;
using ValList = VAL::List;
using ValTypes = Types<ValList>::Seq; // reconstruct a type-seq from a type-list
enum { ARG_CNT = count<ArgsList>()
, VAL_CNT = count<ValList>()
@ -303,34 +303,34 @@ namespace func{
// create list of the *remaining* arguments, after applying the ValList
using LeftReduced = typename Splice<ArgsList, ValList>::Back;
using RightReduced = typename Splice<ArgsList, ValList, ROFFSET>::Front;
using LeftReduced = Splice<ArgsList, ValList>::Back;
using RightReduced = Splice<ArgsList, ValList, ROFFSET>::Front;
using ArgsL = typename Types<LeftReduced>::Seq;
using ArgsR = typename Types<RightReduced>::Seq;
using ArgsL = Types<LeftReduced>::Seq;
using ArgsR = Types<RightReduced>::Seq;
// build a list, where each of the *remaining* arguments is replaced by a placeholder marker
using TrailingPlaceholders = typename func::PlaceholderTuple<LeftReduced>::List;
using LeadingPlaceholders = typename func::PlaceholderTuple<RightReduced>::List;
using TrailingPlaceholders = func::PlaceholderTuple<LeftReduced>::List;
using LeadingPlaceholders = func::PlaceholderTuple<RightReduced>::List;
// ... and splice these placeholders on top of the original argument type list,
// thus retaining the types to be closed, but setting a placeholder for each remaining argument
using LeftReplaced = typename Splice<ArgsList, TrailingPlaceholders, VAL_CNT>::List;
using RightReplaced = typename Splice<ArgsList, LeadingPlaceholders, 0 >::List;
using LeftReplaced = Splice<ArgsList, TrailingPlaceholders, VAL_CNT>::List;
using RightReplaced = Splice<ArgsList, LeadingPlaceholders, 0 >::List;
using LeftReplacedTypes = typename Types<LeftReplaced>::Seq;
using RightReplacedTypes = typename Types<RightReplaced>::Seq;
using LeftReplacedTypes = Types<LeftReplaced>::Seq;
using RightReplacedTypes = Types<RightReplaced>::Seq;
// create a "builder" helper, which accepts exactly the value tuple elements
// and puts them at the right location, while default-constructing the remaining
// (=placeholder)-arguments. Using this builder helper, we can finally set up
// the argument tuples (Left/RightReplacedArgs) used for the std::bind call
template<class SRC, class TAR, size_t i>
using IdxSelectorL = typename PartiallyInitTuple<SRC, TAR, 0>::template IndexMapper<i>;
using IdxSelectorL = PartiallyInitTuple<SRC, TAR, 0>::template IndexMapper<i>;
template<class SRC, class TAR, size_t i>
using IdxSelectorR = typename PartiallyInitTuple<SRC, TAR, ROFFSET>::template IndexMapper<i>;
using IdxSelectorR = PartiallyInitTuple<SRC, TAR, ROFFSET>::template IndexMapper<i>;
using BuildL = TupleConstructor<LeftReplacedTypes, IdxSelectorL>;
using BuildR = TupleConstructor<RightReplacedTypes, IdxSelectorR>;
@ -404,31 +404,31 @@ namespace func{
template<typename SIG, typename X, uint pos>
class BindToArgument
{
using Args = typename _Fun<SIG>::Args;
using Ret = typename _Fun<SIG>::Ret;
using ArgsList = typename Args::List;
using ValList = typename Types<X>::List;
using Args = _Fun<SIG>::Args;
using Ret = _Fun<SIG>::Ret;
using ArgsList = Args::List;
using ValList = Types<X>::List;
enum { ARG_CNT = count<ArgsList>() };
using RemainingFront = typename Splice<ArgsList, ValList, pos>::Front;
using RemainingBack = typename Splice<ArgsList, ValList, pos>::Back;
using PlaceholdersBefore = typename func::PlaceholderTuple<RemainingFront>::List;
using PlaceholdersBehind = typename func::PlaceholderTuple<RemainingBack,pos+1>::List;
using RemainingFront = Splice<ArgsList, ValList, pos>::Front;
using RemainingBack = Splice<ArgsList, ValList, pos>::Back;
using PlaceholdersBefore = func::PlaceholderTuple<RemainingFront>::List;
using PlaceholdersBehind = func::PlaceholderTuple<RemainingBack,pos+1>::List;
using PreparedArgsRaw = typename Append<typename Append<PlaceholdersBefore // arguments before the splice: passed-through
,ValList >::List // splice in the value tuple
,PlaceholdersBehind // arguments behind the splice: passed-through
>::List;
using PreparedArgs = Prefix<PreparedArgsRaw, ARG_CNT>;
using ReducedArgs = typename Append<RemainingFront, RemainingBack>::List;
using ReducedArgs = Append<RemainingFront, RemainingBack>::List;
using PreparedArgTypes = typename Types<PreparedArgs>::Seq;
using RemainingArgs = typename Types<ReducedArgs>::Seq;
using PreparedArgTypes = Types<PreparedArgs>::Seq;
using RemainingArgs = Types<ReducedArgs>::Seq;
template<class SRC, class TAR, size_t i>
using IdxSelector = typename PartiallyInitTuple<SRC, TAR, pos>::template IndexMapper<i>;
using IdxSelector = PartiallyInitTuple<SRC, TAR, pos>::template IndexMapper<i>;
using BuildPreparedArgs = TupleConstructor<PreparedArgTypes, IdxSelector>;
@ -461,10 +461,10 @@ namespace func{
template<typename FUN1, typename FUN2>
struct _Chain
{
using Ret = typename _Fun<FUN2>::Ret;
using Args = typename _Fun<FUN1>::Args;
using Ret = _Fun<FUN2>::Ret;
using Args = _Fun<FUN1>::Args;
using FunType = typename BuildFunType<Ret,Args>::Fun;
using FunType = BuildFunType<Ret,Args>::Fun;
static auto adaptedFunType() { return FunType{}; }

View file

@ -250,7 +250,7 @@ namespace meta{
/** abbreviation for referring to a function's return type */
template<typename FUN>
using _FunRet = typename _Fun<FUN>::Ret;
using _FunRet = _Fun<FUN>::Ret;
namespace {
template<typename FUN>
@ -259,14 +259,14 @@ namespace meta{
static_assert(_Fun<FUN>() , "something funktion-like required");
static_assert(_Fun<FUN>::ARITY == 1 , "function with exactly one argument required");
using Sig = typename _Fun<FUN>::Sig;
using Arg = typename _Fun<Sig>::Args::List::Head;
using Sig = _Fun<FUN>::Sig;
using Arg = _Fun<Sig>::Args::List::Head;
};
}
/** abbreviation for referring to a function's single Argument type */
template<typename FUN>
using _FunArg = typename _DetectSingleArgFunction<FUN>::Arg;
using _FunArg = _DetectSingleArgFunction<FUN>::Arg;

View file

@ -236,7 +236,7 @@ namespace meta {
* reference to an anonymous temporary.
*/
template<typename X>
typename Unwrap<X>::Type&
Unwrap<X>::Type&
unwrap (X const& wrapped)
{
return Unwrap<X>::extract(wrapped);
@ -258,7 +258,7 @@ namespace meta {
using TypePointee = remove_pointer_t<TypeReferred>;
using TypePlain = remove_cv_t<TypePointee>;
using Type = typename Unwrap<TypePlain>::Type;
using Type = Unwrap<TypePlain>::Type;
};
@ -509,7 +509,7 @@ namespace meta {
template<typename T>
class can_IterForEach
{
using Type = typename Strip<T>::Type;
using Type = Strip<T>::Type;
META_DETECT_NESTED(value_type);
META_DETECT_OPERATOR_DEREF();
@ -533,7 +533,7 @@ namespace meta {
template<typename T>
class is_StateCore
{
using Type = typename Strip<T>::Type;
using Type = Strip<T>::Type;
META_DETECT_FUNCTION_ARGLESS(checkPoint);
META_DETECT_FUNCTION_ARGLESS(iterNext);
@ -554,7 +554,7 @@ namespace meta {
template<typename T>
class can_STL_ForEach
{
using Type = typename Strip<T>::Type;
using Type = Strip<T>::Type;
struct is_iterable
{
@ -618,7 +618,7 @@ namespace meta {
template<typename T>
class can_STL_backIteration
{
using Type = typename Strip<T>::Type;
using Type = Strip<T>::Type;
struct is_backIterable
{

View file

@ -133,8 +133,8 @@ namespace meta{
static auto
wrapBuilder (CLO closureFun) ///< need to provide the remaining arguments as a tuple
{
using RemainingArgs = typename _Fun<CLO>::Args;
using RemainingParams = typename lib::meta::RebindVariadic<TUP, RemainingArgs>::Type;
using RemainingArgs = _Fun<CLO>::Args;
using RemainingParams = lib::meta::RebindVariadic<TUP, RemainingArgs>::Type;
struct Wrap
{
@ -186,13 +186,13 @@ namespace meta{
template<typename T, size_t N>
struct _Adapt
{
using NFold = typename Repeat<T,N>::Seq;
using Array = typename RebindVariadic<ArrayAdapt, NFold>::Type;
using NFold = Repeat<T,N>::Seq;
using Array = RebindVariadic<ArrayAdapt, NFold>::Type;
static_assert(N,"attempt to partially close empty array");
};
template<typename T, size_t N>
using _AdaptArray_t = typename _Adapt<T,N>::Array;
using _AdaptArray_t = _Adapt<T,N>::Array;
}
/** @note adding seamless conversion and compount-init */

View file

@ -179,17 +179,17 @@ namespace meta {
struct _InvokeMetafunTup
{
using Tupl = std::decay_t<TUP>;
using Elms = typename ElmTypes<Tupl>::Seq;
using Args = typename Prepend<FUN, Elms>::Seq;
using Type = typename RebindVariadic<META, Args>::Type;
using Elms = ElmTypes<Tupl>::Seq;
using Args = Prepend<FUN, Elms>::Seq;
using Type = RebindVariadic<META, Args>::Type;
};
template<template<typename...> class META, class FUN, class TUP>
struct _InvokeMetafunTup<META, FUN, TUP&>
{
using Tupl = std::decay_t<TUP>;
using Elms = typename ElmTypes<Tupl>::Apply<std::add_lvalue_reference_t>;
using Args = typename Prepend<FUN, Elms>::Seq;
using Type = typename RebindVariadic<META, Args>::Type;
using Elms = typename ElmTypes<Tupl>::template Apply<std::add_lvalue_reference_t>;
using Args = Prepend<FUN, Elms>::Seq;
using Type = RebindVariadic<META, Args>::Type;
};
template<class FUN, class TUP>
@ -282,20 +282,20 @@ namespace meta {
static constexpr size_t SIZ = std::tuple_size_v<TUP>;
using Idx = std::make_index_sequence<SIZ>;
using Seq = typename Extract<Idx>::ElmTypes;
using Tup = typename RebindVariadic<std::tuple, Seq>::Type;
using Seq = Extract<Idx>::ElmTypes;
using Tup = RebindVariadic<std::tuple, Seq>::Type;
template<template<class> class META>
using Apply = typename ElmTypes<Seq>::template Apply<META>;
using Apply = ElmTypes<Seq>::template Apply<META>;
template<template<typename...> class O>
using Rebind = typename RebindVariadic<O, Seq>::Type;
using Rebind = RebindVariadic<O, Seq>::Type;
template<template<class> class PRED>
using AndAll = typename ElmTypes<Apply<PRED>>::template Rebind<std::__and_>;
using AndAll = ElmTypes<Apply<PRED>>::template Rebind<std::__and_>;
template<template<class> class PRED>
using OrAll = typename ElmTypes<Apply<PRED>>::template Rebind<std::__or_>;
using OrAll = ElmTypes<Apply<PRED>>::template Rebind<std::__or_>;
};
@ -318,8 +318,8 @@ namespace meta {
template<class H, typename TAIL>
struct BuildTupleType<Node<H, TAIL>>
{
using Seq = typename Types<Node<H,TAIL>>::Seq;
using Type = typename BuildTupleType<Seq>::Type;
using Seq = Types<Node<H,TAIL>>::Seq;
using Type = BuildTupleType<Seq>::Type;
};
template<>
@ -339,7 +339,7 @@ namespace meta {
* over clever re-use of existing types.
*/
template<typename TYPES>
using Tuple = typename BuildTupleType<TYPES>::Type;
using Tuple = BuildTupleType<TYPES>::Type;
using std::tuple_size;
@ -351,14 +351,14 @@ namespace meta {
template<typename...TYPES>
struct RebindTupleTypes
{
using Seq = typename Types<TYPES...>::Seq;
using List = typename Seq::List;
using Seq = Types<TYPES...>::Seq;
using List = Seq::List;
};
template<typename...TYPES>
struct RebindTupleTypes<std::tuple<TYPES...>>
{
using Seq = typename Types<TYPES...>::Seq;
using List = typename Seq::List;
using Seq = Types<TYPES...>::Seq;
using List = Seq::List;
};
@ -396,7 +396,7 @@ namespace meta {
: Tuple<TYPES>
{
/** meta-sequence to drive instantiation of the ElmMapper */
using SequenceIterator = typename BuildIdxIter<TYPES>::Ascending;
using SequenceIterator = BuildIdxIter<TYPES>::Ascending;
template<size_t idx, class SRC>
static auto
@ -436,7 +436,7 @@ namespace meta {
template<class SRC, class TAR, size_t i>
using ExtractArg = typename ElementExtractor<SRC, TAR>::template Access<i>;
using ExtractArg = ElementExtractor<SRC, TAR>::template Access<i>;
/**
@ -489,10 +489,10 @@ namespace meta {
class BuildTupleAccessor
{
// prepare recursion...
using Head = typename Split<TYPES>::Head;
using Tail = typename Split<TYPES>::Tail;
using Head = Split<TYPES>::Head;
using Tail = Split<TYPES>::Tail;
using NextBuilder = BuildTupleAccessor<_X_, Tail,TUP, i+1>;
using NextAccessor = typename NextBuilder::Product;
using NextAccessor = NextBuilder::Product;
public:
/** type of the product created by this template.
@ -575,7 +575,7 @@ namespace meta {
dump (std::tuple<TYPES...> const& tuple)
{
using BuildAccessor = BuildTupleAccessor<TupleElementDisplayer, Types<TYPES...>>;
using Displayer = typename BuildAccessor::Product ;
using Displayer = BuildAccessor::Product ;
return static_cast<Displayer const&> (tuple)
.dump();

View file

@ -107,7 +107,7 @@ namespace meta {
>
{ };
using SupportedSourceTypes = typename Filter<DataValues::List, allow_Conversion>::List;
using SupportedSourceTypes = Filter<DataValues::List, allow_Conversion>::List;
@ -193,7 +193,7 @@ namespace meta {
struct ElementExtractor<lib::diff::Rec, std::tuple<TYPES...>>
{
template<size_t i>
using TargetType = typename Pick<Types<TYPES...>, i>::Type;
using TargetType = Pick<Types<TYPES...>, i>::Type;
template<size_t i>

View file

@ -74,7 +74,7 @@ namespace meta {
template<class TY, class TYPES, size_t i>
struct Pick<Node<TY,TYPES>, i>
{
using Type = typename Pick<TYPES, i-1>::Type;
using Type = Pick<TYPES, i-1>::Type;
};
@ -111,11 +111,11 @@ namespace meta {
template< class TY, class TYPES
, template<class> class _P_
>
struct Filter<Node<TY,TYPES>,_P_> { using List = typename CondNode< _P_<TY>::value
, TY
, typename Filter<TYPES,_P_>::List
>::Next
; };
struct Filter<Node<TY,TYPES>,_P_> { using List = CondNode< _P_<TY>::value
, TY
, typename Filter<TYPES,_P_>::List
>::Next
; };
/** append (concatenate) lists-of-types */
@ -157,11 +157,11 @@ namespace meta {
using List = Nil; };
template<class TY, class TYPES>
struct PickLast<Node<TY,TYPES>> { using Type = typename PickLast<TYPES>::Type;
using List = typename Append< TY
, typename PickLast<TYPES>::List
>::List
; };
struct PickLast<Node<TY,TYPES>> { using Type = PickLast<TYPES>::Type;
using List = Append< TY
, typename PickLast<TYPES>::List
>::List
; };
@ -203,11 +203,11 @@ namespace meta {
/** extract prefix of given length */
template<class LI, uint l>
using Prefix = typename Splice<LI, Nil, l>::Front;
using Prefix = Splice<LI, Nil, l>::Front;
/** extract suffix starting at given pos */
template<class LI, uint p>
using Suffix = typename Splice<LI, Nil, p>::Back;
using Suffix = Splice<LI, Nil, p>::Back;
@ -222,13 +222,13 @@ namespace meta {
template<class T, class TYPES>
struct Dissect<Node<T,TYPES>>
{
using List = Node<T,TYPES>; ///< the complete list
using Head = T; ///< first element
using First = Node<T,Nil>; ///< a list containing the first element
using Tail = TYPES; ///< remainder of the list starting with the second elm.
using Prefix = typename PickLast<List>::List; ///< all of the list, up to but excluding the last element
using End = typename PickLast<List>::Type; ///< the last element
using Last = Node<End,Nil>; ///< a list containing the last element
using List = Node<T,TYPES>; ///< the complete list
using Head = T; ///< first element
using First = Node<T,Nil>; ///< a list containing the first element
using Tail = TYPES; ///< remainder of the list starting with the second elm.
using Prefix = PickLast<List>::List; ///< all of the list, up to but excluding the last element
using End = PickLast<List>::Type; ///< the last element
using Last = Node<End,Nil>; ///< a list containing the last element
};
template<>
@ -276,7 +276,7 @@ namespace meta {
* sources, i.e. the Cartesian product.
*/
template<class TY1,class TY2>
struct Distribute { using List = typename PrefixAll<TY1,TY2>::List; };
struct Distribute { using List = PrefixAll<TY1,TY2>::List; };
template<class TY>
struct Distribute<Nil,TY> { using List = Nil; };
@ -284,10 +284,10 @@ namespace meta {
template< class TY, class TYPES
, class TAIL
>
struct Distribute<Node<TY,TYPES>,TAIL> { using List = typename Append< typename PrefixAll<TY,TAIL>::List
, typename Distribute<TYPES,TAIL>::List
>::List
; };
struct Distribute<Node<TY,TYPES>,TAIL> { using List = Append< typename PrefixAll<TY,TAIL>::List
, typename Distribute<TYPES,TAIL>::List
>::List
; };
@ -306,17 +306,17 @@ namespace meta {
*/
template< class X
, template<class> class _ENUM_>
struct Combine { using List = typename Distribute< typename _ENUM_<X>::List
, NilNode
>::List; };
struct Combine { using List = Distribute< typename _ENUM_<X>::List
, NilNode
>::List; };
template< template<class> class _ENUM_>
struct Combine<Nil, _ENUM_ > { using List = NilNode; };
template< class TY, class TYPES
, template<class> class _ENUM_>
struct Combine<Node<TY,TYPES>,_ENUM_> { using List = typename Distribute< typename _ENUM_<TY>::List
, typename Combine<TYPES,_ENUM_>::List
>::List; };
struct Combine<Node<TY,TYPES>,_ENUM_> { using List = Distribute< typename _ENUM_<TY>::List
, typename Combine<TYPES,_ENUM_>::List
>::List; };
/** enumeration generator for the Combine metafunction,
* yielding an "on" and "off" case; the latter is
@ -334,7 +334,7 @@ namespace meta {
template<class FLAGS>
struct CombineFlags
{
using List = typename Combine<FLAGS, FlagOnOff>::List;
using List = Combine<FLAGS, FlagOnOff>::List;
};

View file

@ -94,7 +94,7 @@ namespace meta {
struct Prepend<T, Types<TYPES...>>
{
using Seq = Types<T, TYPES...>;
using List = typename Types<T, TYPES...>::List;
using List = Types<T, TYPES...>::List;
};
@ -108,9 +108,9 @@ namespace meta {
struct Types< Node<H,T> >
{
using List = Node<H,T>;
using Seq = typename Prepend< H
, typename Types<T>::Seq
>::Seq;
using Seq = Prepend< H
, typename Types<T>::Seq
>::Seq;
};
template<>
struct Types<Nil>
@ -135,7 +135,7 @@ namespace meta {
template<typename T1, typename...TS>
struct Split<Types<T1,TS...> >
{
using List = typename Types<T1,TS...>::List;
using List = Types<T1,TS...>::List;
using Head = T1;
using First = Types<T1>;
@ -143,11 +143,11 @@ namespace meta {
// for finding the end we need the help of typelist-util.hpp
using PrefixList = typename PickLast<List>::List;
using TailList = typename Tail::List;
using PrefixList = PickLast<List>::List;
using TailList = Tail::List;
using Prefix = typename Types<PrefixList>::Seq;
using End = typename PickLast<List>::Type;
using Prefix = Types<PrefixList>::Seq;
using End = PickLast<List>::Type;
using Last = Types<End>;
};
@ -180,17 +180,17 @@ namespace meta {
template<class TYPES, uint i=1>
class Shifted
{
using Tail = typename Split<TYPES>::Tail;
using Tail = Split<TYPES>::Tail;
public:
using Type = typename Shifted<Tail,i-1>::Type;
using Head = typename Split<Type>::Head;
using Type = Shifted<Tail,i-1>::Type;
using Head = Split<Type>::Head;
};
template<class TYPES>
struct Shifted<TYPES,0>
{
using Type = TYPES;
using Head = typename Split<Type>::Head; ///< @warning may be Nil in case of an empty list
using Head = Split<Type>::Head; ///< @warning may be Nil in case of an empty list
};
@ -202,7 +202,7 @@ namespace meta {
template<typename...TYPES, size_t i>
struct Pick<Types<TYPES...>, i>
{
using Type = typename Shifted<Types<TYPES...>, i>::Head;
using Type = Shifted<Types<TYPES...>, i>::Head;
};
@ -214,8 +214,8 @@ namespace meta {
template<typename T, size_t N>
struct Repeat
{
using Rem = typename Repeat<T, N-1>::Seq;
using Seq = typename Prepend<T,Rem>::Seq;
using Rem = Repeat<T, N-1>::Seq;
using Seq = Prepend<T,Rem>::Seq;
};
template<typename T>

View file

@ -84,10 +84,10 @@ namespace meta {
* @see [std::enable_if](http://en.cppreference.com/w/cpp/types/enable_if)
*/
template <class Cond, class T = void>
using enable_if = typename enable_if_c<Cond::value, T>::type;
using enable_if = enable_if_c<Cond::value, T>::type;
template <class Cond, class T = void>
using disable_if = typename enable_if_c<not Cond::value, T>::type;
using disable_if = enable_if_c<not Cond::value, T>::type;
@ -114,9 +114,9 @@ namespace meta {
class _DetectNested_TypeResult
{
template<class ZZ>
static Yes_t check(typename ZZ::type *);
static Yes_t check(ZZ::type *);
template<class X>
static Yes_t check(typename X::Type *);
static Yes_t check(X::Type *);
template<class>
static No_t check(...);
@ -145,7 +145,7 @@ namespace meta {
}
/** helper to extract the first argument from a variadic arg pack, if any */
template<typename...XS>
using extractFirst_t = typename _ExtractFirst<XS...>::Type;
using extractFirst_t = _ExtractFirst<XS...>::Type;
@ -204,7 +204,7 @@ namespace meta {
class is_Typelist
{
template<class X>
static Yes_t check(typename X::List *);
static Yes_t check(X::List *);
template<class>
static No_t check(...);
@ -492,7 +492,7 @@ namespace util {
inline std::string
showSmartPtr (SP const& smPtr, std::string label = "smP")
{
using TargetType = typename SP::element_type;
using TargetType = SP::element_type;
return smPtr? label+"("+showAdr(smPtr.get()) + ") ↗" + StringConv<TargetType>::invoke(*smPtr)
: BOTTOM_INDICATOR + " «" + typeStr(smPtr) + "»";

View file

@ -107,20 +107,20 @@ namespace meta {
template<typename TY, typename SEL =void>
struct ValueTypeBinding
{
using value_type = typename RefTraits<TY>::Value;
using reference = typename RefTraits<TY>::Reference;
using pointer = typename RefTraits<TY>::Pointer;
using value_type = RefTraits<TY>::Value;
using reference = RefTraits<TY>::Reference;
using pointer = RefTraits<TY>::Pointer;
};
/** specialisation for classes providing STL style type binding definitions */
template<typename TY>
struct ValueTypeBinding<TY, enable_if<use_ValueTypebindings<TY>> >
{
using _SrcType = typename RefTraits<TY>::Value;
using _SrcType = RefTraits<TY>::Value;
using value_type = typename _SrcType::value_type;
using reference = typename _SrcType::reference;
using pointer = typename _SrcType::pointer;
using value_type = _SrcType::value_type;
using reference = _SrcType::reference;
using pointer = _SrcType::pointer;
};
@ -159,9 +159,9 @@ namespace meta {
>;
using ResType = _ValRef;
using value_type = typename RefTraits<ResType>::Value;
using reference = typename RefTraits<ResType>::Reference;
using pointer = typename RefTraits<ResType>::Pointer;
using value_type = RefTraits<ResType>::Value;
using reference = RefTraits<ResType>::Reference;
using pointer = RefTraits<ResType>::Pointer;
};

View file

@ -70,20 +70,20 @@ namespace meta {
template<size_t n>
struct BuildIndexSeq
{
using Ascending = typename BuildIndexSeq<n-1>::Ascending::template AppendElm<n-1>;
using Descending = typename BuildIndexSeq<n-1>::Descending::template PrependElm<n-1>;
using Ascending = BuildIndexSeq<n-1>::Ascending::template AppendElm<n-1>;
using Descending = BuildIndexSeq<n-1>::Descending::template PrependElm<n-1>;
template<size_t d>
using OffsetBy = typename BuildIndexSeq<n-1>::template OffsetBy<d>::template AppendElm<n-1+d>;
using OffsetBy = BuildIndexSeq<n-1>::template OffsetBy<d>::template AppendElm<n-1+d>;
template<size_t x>
using FilledWith = typename BuildIndexSeq<n-1>::template FilledWith<x>::template AppendElm<x>;
using FilledWith = BuildIndexSeq<n-1>::template FilledWith<x>::template AppendElm<x>;
template<size_t c>
using First = typename BuildIndexSeq<std::min(c,n)>::Ascending;
using First = BuildIndexSeq<std::min(c,n)>::Ascending;
template<size_t c>
using After = typename BuildIndexSeq< (n>c)? n-c : 0>::template OffsetBy<c>;
using After = BuildIndexSeq< (n>c)? n-c : 0>::template OffsetBy<c>;
};
template<>
@ -118,20 +118,20 @@ namespace meta {
enum {SIZ = sizeof...(TYPES) };
using Builder = BuildIndexSeq<SIZ>;
using Ascending = typename Builder::Ascending;
using Descending = typename Builder::Descending;
using Ascending = Builder::Ascending;
using Descending = Builder::Descending;
template<size_t d>
using OffsetBy = typename Builder::template OffsetBy<d>;
using OffsetBy = Builder::template OffsetBy<d>;
template<size_t x>
using FilledWith = typename Builder::template FilledWith<x>;
using FilledWith = Builder::template FilledWith<x>;
template<size_t c>
using First = typename Builder::template First<c>;
using First = Builder::template First<c>;
template<size_t c>
using After = typename Builder::template After<c>;
using After = Builder::template After<c>;
};
/** build an index number sequence from a type sequence */
@ -193,13 +193,13 @@ namespace meta {
using Apply = Types<META<TYPES>...>;
template<template<typename...> class O>
using Rebind = typename lib::meta::RebindVariadic<O, Seq>::Type;
using Rebind = lib::meta::RebindVariadic<O, Seq>::Type;
template<template<class> class PRED>
using AndAll = typename ElmTypes<Apply<PRED>>::template Rebind<std::__and_>;
using AndAll = ElmTypes<Apply<PRED>>::template Rebind<std::__and_>;
template<template<class> class PRED>
using OrAll = typename ElmTypes<Apply<PRED>>::template Rebind<std::__or_>;
using OrAll = ElmTypes<Apply<PRED>>::template Rebind<std::__or_>;
};
// Note: a further specialisation for any »tuple-like« is defined in tuple-helper.hpp

View file

@ -34,13 +34,13 @@
** template<typename...CASES>
** struct MyModel
** {
** using SubSeq = typename _Vari<MyModel, CASES...>::Prefix;
** using SubSeq = _Vari<MyModel, CASES...>::Prefix;
**
** // adapt a predecessor sequence
** MyModel (SubSeq&& subModel);
**
**
** using Tuple = typename RebindVariadic<std::tuple, CASES...>::Type;
** using Tuple = RebindVariadic<std::tuple, CASES...>::Type;
** }
** \endcode
** @see param-weaving-pattern.hpp "usage example"
@ -138,15 +138,15 @@ namespace meta {
template<template<class...> class L, typename X, typename...XS>
struct _Vari<L, X,XS...>
{
using Penult = typename _Vari<L,XS...>::Penult;
using Ultima = typename _Vari<L,XS...>::Ultima;
using Penult = _Vari<L,XS...>::Penult;
using Ultima = _Vari<L,XS...>::Ultima;
using _Tail_Pre_ = typename _Vari<L,XS...>::Prefix;
using _Tail_Rev_ = typename _Vari<L,XS...>::Revers;
using _Tail_Pre_ = _Vari<L,XS...>::Prefix;
using _Tail_Rev_ = _Vari<L,XS...>::Revers;
using Remain = L<XS...>;
using Prefix = typename _Vari<L, X, _Tail_Pre_>::Prepend;
using Revers = typename _Vari<L, Ultima, _Tail_Rev_>::Prepend;
using Prefix = _Vari<L, X, _Tail_Pre_>::Prepend;
using Revers = _Vari<L, Ultima, _Tail_Rev_>::Prepend;
};
}} // namespace lib::meta

View file

@ -103,7 +103,7 @@ namespace lib {
template<typename RAW>
struct BuildRefcountPtr
{
using RawType = typename std::remove_pointer<RAW>::type;
using RawType = std::remove_pointer<RAW>::type;
using BareType = RawType *;
using ResultType = std::shared_ptr<RawType>;
@ -210,8 +210,8 @@ namespace lib {
struct FabConfig
{
using WrapFunctor = Wrapper<TY>;
using BareProduct = typename WrapFunctor::BareType;
using WrappedProduct = typename WrapFunctor::ResultType;
using BareProduct = WrapFunctor::BareType;
using WrappedProduct = WrapFunctor::ResultType;
typedef BareProduct SIG_Fab(void);
@ -228,8 +228,8 @@ namespace lib {
struct FabConfig<RET(ARGS...), Wrapper>
{
using WrapFunctor = Wrapper<RET>;
using BareProduct = typename WrapFunctor::BareType;
using WrappedProduct = typename WrapFunctor::ResultType;
using BareProduct = WrapFunctor::BareType;
using WrappedProduct = WrapFunctor::ResultType;
typedef BareProduct SIG_Fab(ARGS...);
@ -259,14 +259,14 @@ namespace lib {
: public FabConfig<SIG,Wrapper>::WrapFunctor
{
using _Conf = FabConfig<SIG,Wrapper>;
using SIG_Fab = typename _Conf::SIG_Fab;
using SIG_Fab = _Conf::SIG_Fab;
using _Fab = Fab<SIG_Fab,ID>;
_Fab funcTable_;
protected:
using Creator = typename _Fab::FactoryFunc;
using Creator = _Fab::FactoryFunc;
Creator&
selectProducer (ID const& id)
@ -276,7 +276,7 @@ namespace lib {
public:
using Product = typename _Conf::WrappedProduct;
using Product = _Conf::WrappedProduct;
/**
* Core operation of the factory:

View file

@ -200,7 +200,7 @@ namespace lib {
>
class InPlaceAnyHolder
{
using BaseP = typename AccessPolicy::Base *;
using BaseP = AccessPolicy::Base *;
/** Inner capsule managing the contained object (interface) */
struct Buffer

View file

@ -203,7 +203,7 @@ namespace util {
using PFun = FUN;
PFun parse;
using Result = typename _Fun<PFun>::Ret::Result;
using Result = _Fun<PFun>::Ret::Result;
Connex (FUN pFun)
: parse{pFun}
@ -281,7 +281,7 @@ namespace util {
inline auto
buildConnex (Syntax<PAR> const& anchor)
{
using Con = typename Syntax<PAR>::Connex;
using Con = Syntax<PAR>::Connex;
return Con{anchor};
}
@ -336,9 +336,9 @@ namespace util {
inline auto
adaptConnex (CON&& connex, BIND&& modelBinding)
{
using RX = typename CON::Result;
using RX = CON::Result;
using Arg = std::add_rvalue_reference_t<RX>;
using AdaptedRes = typename _ProbeFunReturn<Arg,BIND>::Ret;
using AdaptedRes = _ProbeFunReturn<Arg,BIND>::Ret;
return Connex{[origConnex = forward<CON>(connex)
,binding = forward<BIND>(modelBinding)
]
@ -357,7 +357,7 @@ namespace util {
inline auto
toStringConnex (CON&& connex, uint part)
{
using Result = typename CON::Result;
using Result = CON::Result;
return Connex([baseConnex = forward<CON>(connex)
,part
]
@ -442,9 +442,9 @@ namespace util {
/* === Builder functions to mark which side of the combinator to pick === */
using SubSeq = typename _Vari<AltModel, CASES...>::Prefix; ///< a nested sub-model to extend
using Penult = typename _Vari<AltModel, CASES...>::Penult; ///< plain value expected for left-branch
using Ultima = typename _Vari<AltModel, CASES...>::Ultima; ///< plain value expected for right-branch
using SubSeq = _Vari<AltModel, CASES...>::Prefix; ///< a nested sub-model to extend
using Penult = _Vari<AltModel, CASES...>::Penult; ///< plain value expected for left-branch
using Ultima = _Vari<AltModel, CASES...>::Ultima; ///< plain value expected for right-branch
static AltModel
mark_left (SubSeq&& leftCases)
@ -524,9 +524,9 @@ namespace util {
inline auto
sequenceConnex (C1&& connex1, C2&& connex2)
{
using R1 = typename decay_t<C1>::Result;
using R2 = typename decay_t<C2>::Result;
using ProductResult = typename _Join<SeqModel, R1, R2>::Result;
using R1 = decay_t<C1>::Result;
using R2 = decay_t<C2>::Result;
using ProductResult = _Join<SeqModel, R1, R2>::Result;
using ProductEval = Eval<ProductResult>;
return Connex{[conL = forward<C1>(connex1)
,conR = forward<C2>(connex2)
@ -558,9 +558,9 @@ namespace util {
inline auto
branchedConnex (C1&& connex1, C2&& connex2)
{
using R1 = typename decay_t<C1>::Result;
using R2 = typename decay_t<C2>::Result;
using SumResult = typename _Join<AltModel, R1, R2>::Result;
using R1 = decay_t<C1>::Result;
using R2 = decay_t<C2>::Result;
using SumResult = _Join<AltModel, R1, R2>::Result;
using SumEval = Eval<SumResult>;
return Connex{[conL = forward<C1>(connex1)
,conR = forward<C2>(connex2)
@ -595,7 +595,7 @@ namespace util {
,C1&& delimConnex
,C2&& bodyConnex)
{
using Res = typename decay_t<C2>::Result;
using Res = decay_t<C2>::Result;
using IterResult = IterModel<Res>;
using IterEval = Eval<IterResult>;
return Connex{[sep = forward<C1>(delimConnex)
@ -636,7 +636,7 @@ namespace util {
inline auto
optionalConnex (CNX&& connex)
{
using Res = typename decay_t<CNX>::Result;
using Res = decay_t<CNX>::Result;
using OptResult = optional<Res>;
using OptEval = Eval<OptResult>;
return Connex{[body = forward<CNX>(connex)
@ -661,7 +661,7 @@ namespace util {
,C3&& bodyConnex
,bool isOptional)
{
using Res = typename decay_t<C3>::Result;
using Res = decay_t<C3>::Result;
return Connex{[opening = forward<C1>(openingConnex)
,closing = forward<C2>(closingConnex)
,body = forward<C3>(bodyConnex)
@ -704,12 +704,12 @@ namespace util {
class Parser
: public CON
{
using PFun = typename CON::PFun;
using PFun = CON::PFun;
static_assert (_Fun<PFun>(), "Connex must define a parse-function");
public:
using Connex = CON;
using Result = typename CON::Result;
using Result = CON::Result;
static_assert (has_Sig<PFun, Eval<Result>(StrView)>()
,"Signature of the parse-function not suitable");
@ -785,8 +785,8 @@ namespace util {
PAR parse_;
public:
using Connex = typename PAR::Connex;
using Result = typename PAR::Result;
using Connex = PAR::Connex;
using Result = PAR::Result;
Syntax()
: parse_{Nil()}
@ -826,7 +826,7 @@ namespace util {
Syntax&
operator= (Syntax<PX> refSyntax)
{
using ConX = typename PX::Connex;
using ConX = PX::Connex;
ConX& refConnex = refSyntax;
parse_.parse = move(refConnex.parse);
return *this;

View file

@ -259,8 +259,8 @@ namespace lib {
template<typename...ARGS>
struct Split
{
using Prefix = typename meta::BuildIndexSeq<chunk_size>::Ascending;
using Rest = typename meta::BuildIdxIter<ARGS...>::template After<chunk_size>;
using Prefix = meta::BuildIndexSeq<chunk_size>::Ascending;
using Rest = meta::BuildIdxIter<ARGS...>::template After<chunk_size>;
};
public:
@ -560,8 +560,8 @@ namespace lib {
{
if (l.size() != r.size()) return false;
typename PathArray<cl>::iterator lp = l.begin();
typename PathArray<cl>::iterator rp = r.begin();
auto lp = l.begin();
auto rp = r.begin();
while (lp and rp)
{
if (*lp != *rp) return false;

View file

@ -366,8 +366,8 @@ namespace lib {
{
private:
typedef polyvalue::Trait<CPY> _Traits;
typedef typename _Traits::CopyAPI _CopyHandlingAdapter;
typedef typename _Traits::Assignment _AssignmentPolicy; /////////////////TICKET #1197 : confusingly indirect decision logic
typedef _Traits::CopyAPI _CopyHandlingAdapter;
typedef _Traits::Assignment _AssignmentPolicy; /////////////////TICKET #1197 : confusingly indirect decision logic
enum{
siz = storage + _Traits::ADMIN_OVERHEAD
};

View file

@ -175,11 +175,11 @@ namespace lib {
: public LazyInit<POL>
{
using Lazy = LazyInit<POL>;
using Disabled = typename Lazy::MarkDisabled;
using Disabled = Lazy::MarkDisabled;
using Sig = typename _Fun<POL>::Sig;
using Fun = function<Sig>;
using Tar = typename _Fun<POL>::Ret;
using Sig = _Fun<POL>::Sig;
using Fun = function<Sig>;
using Tar = _Fun<POL>::Ret;
Tar maxResult_{Tar::maxVal()}; ///< maximum result val actually to produce < max
Tar minResult_{Tar::minVal()}; ///< minimum result val actually to produce > min
@ -363,16 +363,16 @@ namespace lib {
using _Fun = lib::meta::_Fun<FUN>;
static_assert (_Fun(), "Need something function-like.");
using Sig = typename _Fun::Sig;
using Args = typename _Fun::Args;
using BaseIn = typename lib::meta::_Fun<POL>::Args;
using Sig = _Fun::Sig;
using Args = _Fun::Args;
using BaseIn = lib::meta::_Fun<POL>::Args;
if constexpr (std::is_same_v<Args, BaseIn>)
// function accepts same arguments as this RandomDraw
return forward<FUN> (fun); // pass-through directly
else
{// attempt to find a custom adaptor via Policy template
using Adaptor = typename POL::template Adaptor<Sig>;
using Adaptor = POL::template Adaptor<Sig>;
return Adaptor::build (forward<FUN> (fun));
}
}
@ -392,7 +392,7 @@ namespace lib {
{
static_assert (lib::meta::_Fun<FUN>(), "Need something function-like.");
using Res = typename lib::meta::_Fun<FUN>::Ret;
using Res = lib::meta::_Fun<FUN>::Ret;
using lib::meta::func::chained;
using lib::meta::_FunRet;

View file

@ -280,7 +280,7 @@ namespace lib {
public:
using GEN::GEN;
typename GEN::result_type
GEN::result_type
operator()()
{
if constexpr (GEN::max() < std::numeric_limits<typename GEN::result_type>::max())

View file

@ -428,7 +428,7 @@ namespace lib {
{
public:
void
operator() (typename ScopedCollection<I,siz>::ElementHolder& storage)
operator() (ScopedCollection<I,siz>::ElementHolder& storage)
{
storage.template create<I>();
}
@ -440,7 +440,7 @@ namespace lib {
{
public:
void
operator() (typename ScopedCollection<I,siz>::ElementHolder& storage)
operator() (ScopedCollection<I,siz>::ElementHolder& storage)
{
storage.template create<TY>();
}
@ -461,7 +461,7 @@ namespace lib {
{
IT iter_;
using ElementType = typename meta::ValueTypeBinding<IT>::value_type;
using ElementType = meta::ValueTypeBinding<IT>::value_type;
public:
PullFrom (IT source)
@ -469,7 +469,7 @@ namespace lib {
{ }
void
operator() (typename ScopedCollection<I,siz>::ElementHolder& storage)
operator() (ScopedCollection<I,siz>::ElementHolder& storage)
{
storage.template create<ElementType> (*iter_);
++iter_;

View file

@ -68,13 +68,13 @@ namespace lib {
: util::MoveAssign
{
using _Vec = std::vector<T*>;
using VIter = typename _Vec::iterator;
using VIter = _Vec::iterator;
using RIter = RangeIter<VIter>;
using IterType = PtrDerefIter<RIter>;
using ConstIterType = typename IterType::ConstIterType;
using RcIter = typename IterType::WrappedConstIterType;
using ConstIterType = IterType::ConstIterType;
using RcIter = IterType::WrappedConstIterType;
_Vec vec_;

View file

@ -185,7 +185,7 @@ namespace lib {
using Bucket = ArrayBucket<I>;
template<typename X>
using XAlloT = typename AlloT::template rebind_traits<std::remove_cv_t<X>>;
using XAlloT = AlloT::template rebind_traits<std::remove_cv_t<X>>;
Allo& baseAllocator() { return *this; }
@ -193,7 +193,7 @@ namespace lib {
auto
adaptAllocator()
{
using XAllo = typename XAlloT<X>::allocator_type;
using XAllo = XAlloT<X>::allocator_type;
if constexpr (std::is_constructible_v<XAllo, Allo>)
return XAllo{baseAllocator()};
else
@ -401,7 +401,7 @@ namespace lib {
using Policy = POL<I,E>;
using Bucket = several::ArrayBucket<I>;
using Deleter = typename Bucket::Deleter;
using Deleter = Bucket::Deleter;
public:
SeveralBuilder() = default;
@ -477,7 +477,7 @@ namespace lib {
SeveralBuilder&&
appendAll (std::initializer_list<X> ili)
{
using Val = typename meta::Strip<X>::TypeReferred;
using Val = meta::Strip<X>::TypeReferred;
for (Val const& x : ili)
emplaceNewElm<Val> (x);
return move(*this);
@ -507,7 +507,7 @@ namespace lib {
SeveralBuilder&&
emplace (ARGS&& ...args)
{
using Val = typename meta::Strip<TY>::TypeReferred;
using Val = meta::Strip<TY>::TypeReferred;
emplaceNewElm<Val> (forward<ARGS> (args)...);
return move(*this);
}
@ -549,7 +549,7 @@ namespace lib {
void
emplaceCopy (IT& dataSrc)
{
using Val = typename IT::value_type;
using Val = IT::value_type;
emplaceNewElm<Val> (*dataSrc);
}
@ -557,7 +557,7 @@ namespace lib {
void
emplaceMove (IT& dataSrc)
{
using Val = typename IT::value_type;
using Val = IT::value_type;
emplaceNewElm<Val> (move (*dataSrc));
}
@ -737,9 +737,9 @@ namespace lib {
Deleter
selectDestructor()
{
using IVal = typename lib::meta::Strip<I>::TypeReferred;
using EVal = typename lib::meta::Strip<E>::TypeReferred;
using TVal = typename lib::meta::Strip<TY>::TypeReferred;
using IVal = lib::meta::Strip<I>::TypeReferred;
using EVal = lib::meta::Strip<E>::TypeReferred;
using TVal = lib::meta::Strip<TY>::TypeReferred;
typename Policy::Fac& factory(*this);
@ -783,8 +783,8 @@ namespace lib {
void
probeMoveCapability()
{
using TVal = typename lib::meta::Strip<TY>::TypeReferred;
using EVal = typename lib::meta::Strip<E>::TypeReferred;
using TVal = lib::meta::Strip<TY>::TypeReferred;
using EVal = lib::meta::Strip<E>::TypeReferred;
if (not (is_same_v<TVal,EVal> or is_trivially_copyable_v<TVal>))
lock_move = true;
@ -793,7 +793,7 @@ namespace lib {
bool
canWildMove()
{
using EVal = typename lib::meta::Strip<E>::TypeReferred;
using EVal = lib::meta::Strip<E>::TypeReferred;
return is_trivially_copyable_v<EVal> and not lock_move;
}

View file

@ -227,8 +227,8 @@ namespace lib {
friend auto begin (Several const& svl) { return svl.begin();}
friend auto end (Several const& svl) { return svl.end(); }
using value_type = typename meta::RefTraits<I>::Value;
using reference = typename meta::RefTraits<I>::Reference;
using value_type = meta::RefTraits<I>::Value;
using reference = meta::RefTraits<I>::Reference;
using const_reference = value_type const&;

View file

@ -456,7 +456,7 @@ namespace stat{
% csv.getParsedFieldCnt() % columnCnt % line};
}
using Value = typename std::remove_reference<decltype(col)>::type::ValueType;
using Value = std::remove_reference<decltype(col)>::type::ValueType;
col.get() = parseAs<Value>(*csv);
++csv;
});

View file

@ -55,8 +55,8 @@ namespace lib {
class ClassLock
: public Sync<CONF>::Lock
{
using Lock = typename Sync<CONF>::Lock;
using Monitor = typename sync::Monitor<CONF>;
using Lock = Sync<CONF>::Lock;
using Monitor = sync::Monitor<CONF>;
struct PerClassMonitor : Monitor {};

View file

@ -151,7 +151,7 @@ namespace microbenchmark {
static_assert (lib::meta::_Fun<FUN>(), "Need something function-like.");
static_assert (lib::meta::_Fun<FUN>::ARITY <=1, "Function with zero or one argument required.");
using Sig = typename lib::meta::_Fun<FUN>::Sig;
using Sig = lib::meta::_Fun<FUN>::Sig;
return Adaptor<Sig>::wrap (std::forward<FUN> (fun));
}

View file

@ -257,7 +257,7 @@ namespace test{
showType()
{
using Case = TypeDiagnostics<X>;
using Type = typename Case::Type;
using Type = Case::Type;
return Case::prefix
+ meta::humanReadableTypeID (typeid(Type).name())

View file

@ -372,10 +372,10 @@ namespace lib {
class InstanceCore
{
using ActionIter = IndexIter<const ActionSeq>;
using DataCtxIter = typename SRC::Iter;
using DataCtxIter = SRC::Iter;
using NestedCtx = std::pair<DataCtxIter, SRC>;
using CtxStack = std::stack<NestedCtx, std::vector<NestedCtx>>;
using Value = typename SRC::Value;
using Value = SRC::Value;
SRC dataSrc_;
ActionIter actionIter_;
@ -826,7 +826,7 @@ namespace lib {
/** Instantiate next Action token and expose its rendering */
template<class SRC>
inline typename SRC::Value
inline SRC::Value
TextTemplate::InstanceCore<SRC>::instantiateNext()
{
return actionIter_? actionIter_->instantiate(*this)
@ -840,7 +840,7 @@ namespace lib {
* @return the rendering produced by the selected next Action token
*/
template<class SRC>
inline typename SRC::Value
inline SRC::Value
TextTemplate::InstanceCore<SRC>::reInstatiate (Idx nextCode)
{
if (nextCode == Idx(-1))
@ -852,7 +852,7 @@ namespace lib {
/** retrieve a data value from the data source for the indiated key */
template<class SRC>
inline typename SRC::Value
inline SRC::Value
TextTemplate::InstanceCore<SRC>::getContent (string key)
{
static Value nil{};

View file

@ -523,13 +523,13 @@ namespace lib {
static_assert(1 == _Fun<FUN>::ARITY);
static_assert(1 >= _Fun<HOOK>::ARITY);
// argument type expected by the hooks down in the policy class
using Arg = typename _Fun<FUN>::Args::List::Head;
using Arg = _Fun<FUN>::Args::List::Head;
// distinguish if user provided functor takes zero or one argument
if constexpr (0 == _Fun<HOOK>::ARITY)
return [hook = forward<HOOK>(hook)](Arg){ hook(); };
else
{ // instance type expected by the user-provided hook
using Target = typename _Fun<HOOK>::Args::List::Head;
using Target = _Fun<HOOK>::Args::List::Head;
return [hook = forward<HOOK>(hook)]
(Arg& threadWrapper)
{ // build a two-step cast path from the low-level wrapper to user type
@ -764,7 +764,7 @@ namespace lib {
inline void
launchDetached (string const& threadID, INVO&& ...args)
{
using Launch = typename TAR::Launch;
using Launch = TAR::Launch;
launchDetached<TAR> (Launch{forward<INVO> (args)...}
.threadID (threadID));
}
@ -774,7 +774,7 @@ namespace lib {
inline void
launchDetached (string const& threadID, void (TAR::*memFun) (ARGS...), ARGS ...args)
{
using Launch = typename TAR::Launch;
using Launch = TAR::Launch;
launchDetached<TAR> (Launch{std::move (memFun)
,lib::meta::InstancePlaceholder<TAR>{}
,forward<ARGS> (args)...

View file

@ -151,7 +151,7 @@ namespace mutation {
TI
operator() (TI const& changedVal) const
{
typedef typename ListenerList::const_iterator Iter;
using Iter = ListenerList::const_iterator;
Iter p = listeners_.begin();
Iter e = listeners_.end();

View file

@ -217,7 +217,7 @@ namespace time {
static Supported
formats()
{
typedef typename TY::List SupportedFormats;
using SupportedFormats = TY::List;
return Supported().define(SupportedFormats());
}

View file

@ -101,7 +101,7 @@ namespace time {
bool supports() const; ///< does our implicit time grid support building that timecode format?
template<class FMT>
typename format::Traits<FMT>::TimeCode
format::Traits<FMT>::TimeCode
formatAs() const; ///< create new time code instance, then #castInto
template<class TC>
@ -133,10 +133,10 @@ namespace time {
template<class FMT>
inline typename format::Traits<FMT>::TimeCode
inline format::Traits<FMT>::TimeCode
QuTime::formatAs() const
{
using TC = typename format::Traits<FMT>::TimeCode;
using TC = format::Traits<FMT>::TimeCode;
return TC(*this);
}
@ -154,7 +154,7 @@ namespace time {
inline void
QuTime::castInto (TC& timecode) const
{
using Format = typename TC::Format;
using Format = TC::Format;
REQUIRE (supports<Format>());
Format::rebuild (timecode, *quantiser_, TimeValue(*this));

View file

@ -54,7 +54,7 @@ namespace util {
template<typename T>
struct treat_as_STL_Container
{
typedef typename lib::meta::Unwrap<T>::Type TaT;
typedef lib::meta::Unwrap<T>::Type TaT;
enum{ value = lib::meta::can_STL_ForEach<TaT>::value
&&!lib::meta::can_IterForEach<T>::value
@ -71,7 +71,7 @@ namespace util {
template<typename T>
struct can_direct_access_Last
{
typedef typename lib::meta::Unwrap<T>::Type TaT;
typedef lib::meta::Unwrap<T>::Type TaT;
enum{ value = lib::meta::can_STL_backIteration<TaT>::value
};
@ -159,7 +159,7 @@ namespace util {
inline auto
max (IT&& elms)
{
using Val = typename std::remove_reference_t<IT>::value_type;
using Val = std::remove_reference_t<IT>::value_type;
Val res = std::numeric_limits<Val>::min();
for (auto const& elm : std::forward<IT> (elms))
if (elm > res)
@ -171,7 +171,7 @@ namespace util {
inline auto
max (CON const& elms)
{
using Val = typename std::remove_reference_t<CON>::value_type;
using Val = std::remove_reference_t<CON>::value_type;
Val res = std::numeric_limits<Val>::min();
for (auto const& elm : elms)
if (elm > res)
@ -184,7 +184,7 @@ namespace util {
inline auto
min (IT&& elms)
{
using Val = typename std::remove_reference_t<IT>::value_type;
using Val = std::remove_reference_t<IT>::value_type;
Val res = std::numeric_limits<Val>::max();
for (auto const& elm : std::forward<IT> (elms))
if (elm < res)
@ -196,7 +196,7 @@ namespace util {
inline auto
min (CON const& elms)
{
using Val = typename std::remove_reference_t<CON>::value_type;
using Val = std::remove_reference_t<CON>::value_type;
Val res = std::numeric_limits<Val>::max();
for (auto const& elm : elms)
if (elm < res)

View file

@ -271,7 +271,7 @@ namespace util {
/** fetch value from a Map, or return a default if not found */
template <typename MAP>
inline typename MAP::mapped_type
inline MAP::mapped_type
getValue_or_default (MAP& map, typename MAP::key_type const& key
, typename MAP::mapped_type defaultVal)
{
@ -288,7 +288,7 @@ namespace util {
* @see lib::NullValue
*/
template <typename MAP>
inline typename MAP::mapped_type const &
inline MAP::mapped_type const &
access_or_default (MAP& map, typename MAP::key_type const& key
, typename MAP::mapped_type const& refDefault)
{
@ -302,7 +302,7 @@ namespace util {
/** shortcut for removing all copies of an Element
* in any sequential collection */
template <typename SEQ>
inline typename SEQ::iterator
inline SEQ::iterator
removeall (SEQ& coll, typename SEQ::value_type const& val)
{
typename SEQ::iterator collEnd = coll.end();
@ -318,7 +318,7 @@ namespace util {
template<class SET, typename FUN>
bool remove_if (SET& set, FUN test)
{
typedef typename SET::iterator Itor;
using Itor = SET::iterator;
bool found = false;
Itor end = set.end();
Itor begin = set.begin();

View file

@ -221,9 +221,9 @@ namespace lib {
};
template<typename RET>
using VisitorFunc = typename variant::VFunc<RET>::template VisitorInterface<TYPES>;
using VisitorFunc = variant::VFunc<RET>::template VisitorInterface<TYPES>;
template<typename RET>
using VisitorConstFunc = typename variant::VFunc<RET>::template VisitorInterface<meta::ConstAll<typename TYPES::List>>;
using VisitorConstFunc = variant::VFunc<RET>::template VisitorInterface<meta::ConstAll<typename TYPES::List>>;
/**
* to be implemented by the client for visitation
@ -443,7 +443,7 @@ namespace lib {
Variant()
{
using DefaultType = typename TYPES::List::Head;
using DefaultType = TYPES::List::Head;
new(storage_) Buff<DefaultType> (DefaultType());
}
@ -453,7 +453,7 @@ namespace lib {
{
static_assert (variant::CanBuildFrom<X, TYPES>(), "No type in Typelist can be built from the given argument");
using StorageType = typename variant::CanBuildFrom<X, TYPES>::Type;
using StorageType = variant::CanBuildFrom<X, TYPES>::Type;
new(storage_) Buff<StorageType> (forward<X>(x));
}
@ -477,7 +477,7 @@ namespace lib {
Variant&
operator= (X x)
{
using RawType = typename std::remove_reference<X>::type;
using RawType = std::remove_reference<X>::type;
static_assert (meta::isInList<RawType, typename TYPES::List>(),
"Type error: the given variant could never hold the required type");
static_assert (std::is_copy_assignable<RawType>::value, "target type does not support assignment");

View file

@ -133,13 +133,13 @@ namespace lib {
using Args = std::tuple<ARGS...>;
/** meta-sequence to pick argument values from the storage tuple */
using SequenceIterator = typename meta::BuildIdxIter<ARGS...>::Ascending;
using SequenceIterator = meta::BuildIdxIter<ARGS...>::Ascending;
/** Storage for the argument tuple */
Args args_;
template<typename...PARS>
VerbHolder (typename Verb::Handler handlerRef, Literal verbID, PARS&&... args)
VerbHolder (Verb::Handler handlerRef, Literal verbID, PARS&&... args)
: Verb{handlerRef, verbID}
, args_{std::forward<PARS> (args)...}
{ }
@ -203,7 +203,7 @@ namespace lib {
};
template<typename FUN>
using PayloadType = typename HandlerTypeDetector<FUN>::Payload *;
using PayloadType = HandlerTypeDetector<FUN>::Payload *;
public:

View file

@ -108,7 +108,7 @@ namespace visitor {
template<class TAR, class TOOL>
class Dispatcher
{
using ReturnType = typename TOOL::ReturnType;
using ReturnType = TOOL::ReturnType;
/** generator for Trampoline functions,
* used to dispatch calls down to the

View file

@ -152,7 +152,7 @@ namespace visitor {
: public Applicable<TOOLImpl, TYPES, BASE>
{
using ToolBase = typename BASE::ToolBase;
using ToolBase = BASE::ToolBase;
protected:
virtual ~Applicable () {}
@ -188,7 +188,7 @@ namespace visitor {
class Visitable
{
public:
using ReturnType = typename TOOL::ReturnType;
using ReturnType = TOOL::ReturnType;
/** to be defined by the DEFINE_PROCESSABLE_BY macro
* in all classes wanting to be treated by some tool */
@ -199,7 +199,7 @@ namespace visitor {
virtual ~Visitable () { };
/// @note may differ from TOOL
using ToolBase = typename TOOL::ToolBase;
using ToolBase = TOOL::ToolBase;
/** @internal used by the #DEFINE_PROCESSABLE_BY macro.
* Dispatches to the actual operation on the

View file

@ -53,7 +53,7 @@ namespace wrapper {
: public function<SIG>
, util::NonCopyable
{
using Res = typename _Fun<SIG>::Ret;
using Res = _Fun<SIG>::Ret;
using ResWrapper = ItemWrapper<Res>;
ResWrapper lastResult_;

View file

@ -210,10 +210,10 @@ namespace interact {
using lib::meta::Types;
using lib::meta::func::PApply;
using Ret = typename _Fun<FUN>::Ret;
using Args = typename _Fun<FUN>::Args;
using Arg1 = typename Split<Args>::Head;
using FurtherArgs = typename Split<Args>::Tail;
using Ret = _Fun<FUN>::Ret;
using Args = _Fun<FUN>::Args;
using Arg1 = Split<Args>::Head;
using FurtherArgs = Split<Args>::Tail;
static_assert (std::is_convertible<UICoord, Arg1>::value,
"Allocator function must accept UICoordinates (where to create/locate) as first argument");

View file

@ -129,7 +129,7 @@ namespace model {
template<typename X> // note the "backward" use. We pick that base interface
using canUpcast = std::is_convertible<TAR*, X>; // into which our desired result type can be upcast, because
// we know the then following dynamic_cast (downcast) can succeed
using Base = typename RawResult::FirstMatching<canUpcast>::Type;
using Base = RawResult::FirstMatching<canUpcast>::Type;
virtual void
handle (Base& pb) override

View file

@ -141,8 +141,8 @@ namespace control {
template<typename SIG>
struct _Type
{
using Args = typename _Fun<SIG>::Args;
using Ret = typename _Fun<SIG>::Ret;
using Args = _Fun<SIG>::Args;
using Ret = _Fun<SIG>::Ret;
using Sig = SIG;
using ArgTuple = Tuple<Args>;
};
@ -150,9 +150,9 @@ namespace control {
template<typename...TYPES>
struct _Type<std::tuple<TYPES...> >
{
using Args = typename Types<TYPES...>::Seq;
using Args = Types<TYPES...>::Seq;
using Ret = void;
using Sig = typename BuildFunType<void, Args>::Sig;
using Sig = BuildFunType<void, Args>::Sig;
using ArgTuple = std::tuple<TYPES...>;
};

View file

@ -98,7 +98,7 @@ namespace control {
{
Command& prototype_;
using CmdArgs = typename _Fun<SIG>::Args;
using CmdArgs = _Fun<SIG>::Args;
CompletedDefinition (Command& definedCommand)
: prototype_(definedCommand)
@ -109,7 +109,7 @@ namespace control {
}
typedef HandlingPattern::ID PattID;
using PattID = HandlingPattern::ID;
/** allow for defining the default execution pattern,
* which is used by Command::operator() */
@ -159,15 +159,15 @@ namespace control {
template<typename SIG, typename MEM>
struct UndoDefinition
{
typedef CommandSignature<SIG,MEM> CmdType;
typedef typename CmdType::OperateSig CommandOperationSig;
typedef typename CmdType::UndoOp_Sig UndoOperationSig;
typedef typename CmdType::CaptureSig UndoCaptureSig;
typedef typename CmdType::CmdArgs CmdArgs;
using CmdType = CommandSignature<SIG,MEM>;
using CommandOperationSig = CmdType::OperateSig;
using UndoOperationSig = CmdType::UndoOp_Sig;
using UndoCaptureSig = CmdType::CaptureSig;
using CmdArgs = CmdType::CmdArgs;
typedef function<CommandOperationSig> OperFunc;
typedef function<UndoOperationSig> UndoFunc;
typedef function<UndoCaptureSig> CaptFunc;
using OperFunc = function<CommandOperationSig>;
using UndoFunc = function<UndoOperationSig>;
using CaptFunc = function<UndoCaptureSig>;
Activation activatePrototype_;
OperFunc operFunctor_;
@ -233,9 +233,9 @@ namespace control {
auto
captureUndo (FUN2 how_to_capture_UndoState)
{
using Sig2 = typename _Fun<FUN2>::Sig;
using UndoCapSig = typename UndoSignature<Sig2>::CaptureSig;
using SpecificUndoDefinition = typename BuildUndoDefType<UndoSignature<Sig2>>::Type;
using Sig2 = _Fun<FUN2>::Sig;
using UndoCapSig = UndoSignature<Sig2>::CaptureSig;
using SpecificUndoDefinition = BuildUndoDefType<UndoSignature<Sig2>>::Type;
function<UndoCapSig> captureOperation (how_to_capture_UndoState);
return SpecificUndoDefinition (callback_, operation_, captureOperation);
@ -287,7 +287,7 @@ namespace control {
auto
operation (FUN operation_to_define)
{
using Sig = typename _Fun<FUN>::Sig;
using Sig = _Fun<FUN>::Sig;
function<Sig> opera1 (operation_to_define);
Activation callback_when_defined = bind (&CommandDef::activate, this, _1);

View file

@ -79,13 +79,13 @@ namespace control {
template<typename ARG>
struct _Type
{
typedef typename ARG::SIG_op SIG_op;
typedef typename ARG::SIG_cap SIG_cap;
typedef typename ARG::SIG_undo SIG_undo;
using SIG_op = ARG::SIG_op;
using SIG_cap = ARG::SIG_cap;
using SIG_undo = ARG::SIG_undo;
typedef function<SIG_op> Func_op;
typedef function<SIG_cap> Func_cap;
typedef function<SIG_undo> Func_undo;
using Func_op = function<SIG_op>;
using Func_cap = function<SIG_cap>;
using Func_undo = function<SIG_undo>;
};
#define _TY(_ID_) typename _Type<ARG>::_ID_
@ -185,7 +185,7 @@ namespace control {
typedef HandlingPattern::ID PattID;
using PattID = HandlingPattern::ID;
PattID
getDefaultHandlingPattern() const

View file

@ -126,10 +126,10 @@ namespace control {
template<typename SIG>
class OpClosure
{
using Args = typename _Fun<SIG>::Args;
using Args = _Fun<SIG>::Args;
using Builder = BuildTupleAccessor<ParamAccessor, Args>;
using ParamStorageTuple = typename Builder::Product;
using ParamStorageTuple = Builder::Product;
ParamStorageTuple params_;
bool activated_;

View file

@ -111,8 +111,8 @@ namespace control {
, util::NonCopyable
{
// using a hashtable to implement the index
typedef unordered_map<Symbol, Command, hash<Symbol>> CmdIndex;
typedef map< const Command*, Symbol, order_by_impl> ReverseIndex;
using CmdIndex = unordered_map<Symbol, Command, hash<Symbol>>;
using ReverseIndex = map< const Command*, Symbol, order_by_impl>;
TypedAllocationManager allocator_;
CmdIndex index_;
@ -236,8 +236,8 @@ namespace control {
// derive the storage type necessary
// to hold the command arguments and UNDO memento
typedef typename UndoSignature<SIG_CAPT>::Memento Mem;
typedef StorageHolder<SIG_OPER,Mem> Arguments;
using Mem = UndoSignature<SIG_CAPT>::Memento;
using Arguments = StorageHolder<SIG_OPER,Mem>;
shared_ptr<Arguments> pArg (allocator_.create<Arguments>());

View file

@ -74,15 +74,15 @@ namespace control {
template<typename SIG, typename MEM>
class CommandSignature
{
using Args = typename _Fun<SIG>::Args;
using ArgList = typename Args::List;
using ExtendedArglist = typename Append<ArgList, MEM>::List;
using ExtendedArgs = typename Types<ExtendedArglist>::Seq;
using Args = _Fun<SIG>::Args;
using ArgList = Args::List;
using ExtendedArglist = Append<ArgList, MEM>::List;
using ExtendedArgs = Types<ExtendedArglist>::Seq;
public:
using OperateSig = typename BuildFunType<void, Args>::Sig;
using CaptureSig = typename BuildFunType<MEM, Args>::Sig;
using UndoOp_Sig = typename BuildFunType<void, ExtendedArgs>::Sig;
using OperateSig = BuildFunType<void, Args>::Sig;
using CaptureSig = BuildFunType<MEM, Args>::Sig;
using UndoOp_Sig = BuildFunType<void, ExtendedArgs>::Sig;
using CmdArgs = Args;
using Memento = MEM;
};
@ -108,8 +108,8 @@ namespace control {
class UndoSignature
{
// preparation: dissect the function signature into arguments and result
using Args = typename _Fun<SIG>::Args;
using Ret = typename _Fun<SIG>::Ret;
using Args = _Fun<SIG>::Args;
using Ret = _Fun<SIG>::Ret;
/** Case1: defining the Undo-Capture function */
template<typename RET, typename ARG>
@ -117,33 +117,33 @@ namespace control {
{
using Memento = RET;
using ExtendedArglist = typename Append<ARG, Memento>::List;
using ExtendedArgs = typename Types<ExtendedArglist>::Seq;
using ExtendedArglist = Append<ARG, Memento>::List;
using ExtendedArgs = Types<ExtendedArglist>::Seq;
using OperateSig = typename BuildFunType<void, ARG>::Sig;
using CaptureSig = typename BuildFunType<Ret,ARG>::Sig;
using UndoOp_Sig = typename BuildFunType<void, ExtendedArgs>::Sig;
using OperateSig = BuildFunType<void, ARG>::Sig;
using CaptureSig = BuildFunType<Ret,ARG>::Sig;
using UndoOp_Sig = BuildFunType<void, ExtendedArgs>::Sig;
};
/** Case2: defining the actual Undo function */
template<typename ARG>
struct Case<void,ARG>
{
using Args = typename ARG::List;
using Args = ARG::List;
using Memento = typename PickLast<Args>::Type;
using OperationArglist = typename PickLast<Args>::List;
using OperationArgs = typename Types<OperationArglist>::Seq;
using Memento = PickLast<Args>::Type;
using OperationArglist = PickLast<Args>::List;
using OperationArgs = Types<OperationArglist>::Seq;
using OperateSig = typename BuildFunType<void, OperationArgs>::Sig;
using CaptureSig = typename BuildFunType<Ret,OperationArgs>::Sig;
using UndoOp_Sig = typename BuildFunType<void, ARG>::Sig;
using OperateSig = BuildFunType<void, OperationArgs>::Sig;
using CaptureSig = BuildFunType<Ret,OperationArgs>::Sig;
using UndoOp_Sig = BuildFunType<void, ARG>::Sig;
};
public:
using CaptureSig = typename Case<Ret,Args>::CaptureSig;
using UndoOp_Sig = typename Case<Ret,Args>::UndoOp_Sig;
using OperateSig = typename Case<Ret,Args>::OperateSig;
using Memento = typename Case<Ret,Args>::Memento;
using CaptureSig = Case<Ret,Args>::CaptureSig;
using UndoOp_Sig = Case<Ret,Args>::UndoOp_Sig;
using OperateSig = Case<Ret,Args>::OperateSig;
using Memento = Case<Ret,Args>::Memento;
};

View file

@ -71,8 +71,8 @@ namespace control {
using ArgHolder = OpClosure<SIG>;
using ArgumentBuff = InPlaceBuffer<ArgHolder>;
using ArgTuple = typename ArgHolder::ArgTuple;
using Args = typename lib::meta::RebindTupleTypes<ArgTuple>::Seq; // std::tuple<ARGS...> to Types<ARGS...>
using ArgTuple = ArgHolder::ArgTuple;
using Args = lib::meta::RebindTupleTypes<ArgTuple>::Seq; // std::tuple<ARGS...> to Types<ARGS...>
/* ====== in-place argument storage ====== */

View file

@ -77,8 +77,8 @@ namespace control {
using ArgumentBuff = InPlaceBuffer<ArgHolder>;
using MementoBuff = InPlaceBuffer<MemHolder>;
using ArgTuple = typename ArgHolder::ArgTuple;
using Args = typename lib::meta::RebindTupleTypes<ArgTuple>::Seq; // std::tuple<ARGS...> to Types<ARGS...>
using ArgTuple = ArgHolder::ArgTuple;
using Args = lib::meta::RebindTupleTypes<ArgTuple>::Seq; // std::tuple<ARGS...> to Types<ARGS...>
/* ====== in-place storage buffers ====== */
@ -215,9 +215,9 @@ namespace control {
}
typedef typename CommandSignature<SIG,MEM>::OperateSig SIG_op;
typedef typename CommandSignature<SIG,MEM>::CaptureSig SIG_cap;
typedef typename CommandSignature<SIG,MEM>::UndoOp_Sig SIG_undo;
using SIG_op = CommandSignature<SIG,MEM>::OperateSig;
using SIG_cap = CommandSignature<SIG,MEM>::CaptureSig;
using SIG_undo = CommandSignature<SIG,MEM>::UndoOp_Sig;
/** create a new memento storage wiring, discarding existing memento state.
* @note any bound undo/capture functions based on the previously held MementoTie

View file

@ -56,7 +56,7 @@ namespace control {
class BasicHandlingPattern
: public HandlingPattern
{
bool isValid() const { return true; }
bool isValid() const override { return true; }
void
performExec (CommandImpl& command) const override

View file

@ -76,8 +76,8 @@ namespace control {
template<typename SIG, typename MEM>
class MementoTie
{
typedef typename CommandSignature<SIG,MEM>::CaptureSig SIG_cap;
typedef typename CommandSignature<SIG,MEM>::UndoOp_Sig SIG_undo;
using SIG_cap = CommandSignature<SIG,MEM>::CaptureSig;
using SIG_undo = CommandSignature<SIG,MEM>::UndoOp_Sig;
ItemWrapper<MEM> memento_; ///< storage holding the captured state for undo

View file

@ -157,13 +157,13 @@ namespace engine {
static_assert(0 < _Fun<FUN>::ARITY , "function with at least one argument expected");
static_assert(3 >= _Fun<FUN>::ARITY , "function with up to three arguments accepted");
using Sig = typename _Fun<FUN>::Sig;
using Sig = _Fun<FUN>::Sig;
template<size_t i>
using _Arg = typename lib::meta::Pick<typename _Fun<Sig>::Args, i>::Type;
using _Arg = lib::meta::Pick<typename _Fun<Sig>::Args, i>::Type;
template<size_t i, template<class> class COND>
using AllElements = typename ElmTypes<_Arg<i>>::template AndAll<COND>;
using AllElements = ElmTypes<_Arg<i>>::template AndAll<COND>;
template<size_t i>
static constexpr bool nonEmpty = ElmTypes<_Arg<i>>::SIZ;
@ -205,9 +205,9 @@ namespace engine {
using SigI = _Arg<_Case<Sig>::SLOT_I>;
using SigO = _Arg<_Case<Sig>::SLOT_O>;
using SigP = _Arg< 0>;
using ArgI = typename ElmTypes<SigI>::Seq;
using ArgO = typename ElmTypes<SigO>::Seq;
using ArgP = typename ElmTypes<SigP>::Seq;
using ArgI = ElmTypes<SigI>::Seq;
using ArgO = ElmTypes<SigO>::Seq;
using ArgP = ElmTypes<SigP>::Seq;
// Metaprogramming helper for Buffer types (sans pointer)
using ElmsI = ElmTypes<typename ElmTypes<SigI>::template Apply<remove_pointer_t>>;
@ -252,7 +252,7 @@ namespace engine {
using Param = conditional_t<hasParam(), typename _Proc::SigP, std::tuple<>>;
template<class PF>
using Res = typename _Fun<PF>::Ret;
using Res = _Fun<PF>::Ret;
template<class PF>
using SigP = add_pointer_t<typename _Fun<PF>::Sig>;
@ -335,7 +335,7 @@ namespace engine {
using Param = conditional_t<hasParam(), typename _Trait::SigP, std::tuple<>>;
using ArgI = conditional_t<hasInput(), typename _Trait::SigI, std::tuple<>>;
using ArgO = typename _Trait::SigO;
using ArgO = _Trait::SigO;
/** FeedManifold building block: hold parameter data */
@ -368,7 +368,7 @@ namespace engine {
};
template<typename F>
using enable_if_hasParam = typename lib::meta::enable_if_c<_ProcFun<F>::hasParam()>::type;
using enable_if_hasParam = lib::meta::enable_if_c<_ProcFun<F>::hasParam()>::type;
template<class X>
using NotProvided = Tagged<Nil, X>;
@ -445,14 +445,14 @@ namespace engine {
{
using _T = _ProcFun<FUN>;
using _S = _StorageSetup<FUN>;
using _F = typename _S::Storage;
using _F = _S::Storage;
/** pass-through constructor */
using _S::Storage::Storage;
using ArgI = typename _S::ArgI;
using ArgO = typename _S::ArgO;
using Param = typename _S::Param;
using ArgI = _S::ArgI;
using ArgO = _S::ArgO;
using Param = _S::Param;
enum{ FAN_I = _S::FAN_I
, FAN_O = _S::FAN_O
, FAN_P = _S::FAN_P
@ -480,8 +480,8 @@ namespace engine {
return arg;
}
using TupI = typename _T::ElmsI::Tup;
using TupO = typename _T::ElmsO::Tup;
using TupI = _T::ElmsI::Tup;
using TupO = _T::ElmsO::Tup;
void
@ -560,13 +560,13 @@ namespace engine {
, FAN_O = Feed::FAN_O
, FAN_P = Feed::FAN_P
};
using ElmsI = typename _Proc::ElmsI;
using ElmsO = typename _Proc::ElmsO;
using ElmsI = _Proc::ElmsI;
using ElmsO = _Proc::ElmsO;
using ElmsP = conditional_t<_Trait::hasParam(), typename _Proc::ArgP, Types<>>;
using Param = typename _Proc::SigP; ///////////////////////////////////////////////////////////////////OOO qualify?
using Param = _Proc::SigP;
template<template<class> class META>
using OutTypesApply = typename ElmsO::template Apply<META>;
using OutTypesApply = ElmsO::template Apply<META>;
/** setup with processing-functor only */
@ -680,8 +680,8 @@ namespace engine {
static_assert (isSuitableParamAdaptor<TRA>(), "Given functor's output not suitable "
"for adapting the proc-functor's 1st argument");
using SigP = lib::meta::_FunArg<TRA>;
using SigI = typename _Proc::SigI;
using SigO = typename _Proc::SigO;
using SigI = _Proc::SigI;
using SigO = _Proc::SigO;
if constexpr (_Proc::hasInput())
{
return [procFun = move(procFun_)

View file

@ -177,7 +177,7 @@ namespace engine {
struct MediaWeavingPattern
: util::NonCopyable
{
using Feed = typename INVO::Feed;
using Feed = INVO::Feed;
static_assert (_verify_usable_as_InvocationAdapter<Feed>());

View file

@ -432,8 +432,8 @@ namespace engine {
auto
attachParamFun (PFX paramFunctor)
{
using AdaptedWeavingBuilder = typename WAB::template Adapted<PFX>;
using AdaptedPortBuilder = PortBuilder<POL,DAT,AdaptedWeavingBuilder>;
using AdaptedWeavingBuilder = WAB::template Adapted<PFX>;
using AdaptedPortBuilder = PortBuilder<POL,DAT,AdaptedWeavingBuilder>;
//
return AdaptedPortBuilder{move(*this)
,weavingBuilder_.adaptParam (move (paramFunctor))
@ -490,7 +490,7 @@ namespace engine {
auto
adaptParam (ADA&& paramAdaptor)
{
using DecoratedPrototype = typename WAB::template Decorated<ADA>;
using DecoratedPrototype = WAB::template Decorated<ADA>;
using AdaptedPortBuilder = PortBuilder<POL,DAT,DecoratedPrototype>;
//
return AdaptedPortBuilder{move(*this)
@ -598,7 +598,7 @@ namespace engine {
auto
PortBuilderRoot<POL,DAT>::invoke (StrView portSpec, FUN fun)
{
using Prototype = typename FeedManifold<FUN>::Prototype;
using Prototype = FeedManifold<FUN>::Prototype;
using WeavingBuilder_FUN = WeavingBuilder<POL, Prototype>;
return PortBuilder<POL,DAT, WeavingBuilder_FUN>{move(*this), move(fun), portSpec};
}
@ -621,7 +621,7 @@ namespace engine {
{
using _Par = PortBuilderRoot<POL,DAT>;
using BlockBuilder = typename SPEC::BlockBuilder;
using BlockBuilder = SPEC::BlockBuilder;
using PostProcessor = function<void(TurnoutSystem&)>;
BlockBuilder blockBuilder_;

View file

@ -141,7 +141,7 @@ namespace engine {
{
using Functors = tuple<FUNZ...>;
using ResTypes = typename ElmTypes<Functors>::template Apply<lib::meta::_FunRet>;
using ResTypes = ElmTypes<Functors>::template Apply<lib::meta::_FunRet>;
using ParamTup = Tuple<ResTypes>;
Functors functors_;
@ -185,7 +185,7 @@ namespace engine {
* @remark HeteroData defines a nested struct `Chain`, and with the help of `RebindVariadic`,
* the type sequence from the ParamTup can be used to instantiate this chain constructor.
*/
using ChainCons = typename lib::meta::RebindVariadic<ANCH::template Chain, ParamTup>::Type;
using ChainCons = lib::meta::RebindVariadic<ANCH::template Chain, ParamTup>::Type;
/** a (static) getter functor able to work on the full extended HeteroData-Chain
@ -196,7 +196,7 @@ namespace engine {
static auto&
getParamVal (TurnoutSystem& turnoutSys)
{
using StorageAccessor = typename ChainCons::template Accessor<slot>;
using StorageAccessor = ChainCons::template Accessor<slot>;
return turnoutSys.retrieveData (StorageAccessor());
}
};
@ -221,7 +221,7 @@ namespace engine {
public:
/** invoke all parameter-functors and _drop off_ the result into a »chain-block« (non-copyable) */
typename ChainCons::NewFrame
ChainCons::NewFrame
buildParamDataBlock (TurnoutSystem& turnoutSys)
{
return std::apply ([&](auto&&... paramFun)
@ -284,9 +284,9 @@ namespace engine {
struct ParamWeavingPattern
: util::MoveOnly
{
using Functors = typename SPEC::Functors;
using DataBlock = typename SPEC::ChainCons::NewFrame;
using BlockBuilder = typename SPEC::BlockBuilder;
using Functors = SPEC::Functors;
using DataBlock = SPEC::ChainCons::NewFrame;
using BlockBuilder = SPEC::BlockBuilder;
using PostProcessor = function<void(TurnoutSystem&)>;
BlockBuilder blockBuilder_;

View file

@ -91,7 +91,7 @@ namespace engine {
constexpr bool
_verify_usable_as_WeavingPattern()
{
using Feed = typename PAT::Feed;
using Feed = PAT::Feed;
ASSERT_MEMBER_FUNCTOR (&PAT::mount, Feed(TurnoutSystem&));
ASSERT_MEMBER_FUNCTOR (&PAT::pull, void(Feed&, TurnoutSystem&));
ASSERT_MEMBER_FUNCTOR (&PAT::shed, void(Feed&, TurnoutSystem&, OptionalBuff));
@ -117,7 +117,7 @@ namespace engine {
{
static_assert (_verify_usable_as_WeavingPattern<PAT>());
using Feed = typename PAT::Feed;
using Feed = PAT::Feed;
public:
template<typename...INIT>

View file

@ -292,7 +292,7 @@ namespace engine {
/** type builder for FeedPrototype adapted to another parameter-fun */
template<class PFX>
using AdaptedPrototype = typename PROT::template Adapted<PFX>;
using AdaptedPrototype = PROT::template Adapted<PFX>;
template<class PFX>
using Adapted = WeavingBuilder<POL, AdaptedPrototype<PFX>>;
@ -317,7 +317,7 @@ namespace engine {
/** type builder for FeedPrototype with remoulded parameter input */
template<class DEC>
using DecoratedPrototype = typename PROT::template Decorated<DEC>;
using DecoratedPrototype = PROT::template Decorated<DEC>;
template<class DEC>
using Decorated = WeavingBuilder<POL, DecoratedPrototype<DEC>>;
@ -447,8 +447,8 @@ namespace engine {
}
};
using OutTypesDescriptors = typename PROT::template OutTypesApply<BufferDescriptor>;
using OutDescriptorTup = lib::meta::Tuple<OutTypesDescriptors>;
using OutTypesDescriptors = PROT::template OutTypesApply<BufferDescriptor>;
using OutDescriptorTup = lib::meta::Tuple<OutTypesDescriptors>;
/** A tuple of BufferDescriptor instances for all output buffer types */
static constexpr OutDescriptorTup outDescriptors{};

View file

@ -68,7 +68,7 @@ namespace fixture {
Segmentation::splitSplice (OptTime start, OptTime after, engine::ExitNodes&& modelLink)
{
ASSERT (!start or !after or start != after);
using Iter = typename list<Segment>::iterator;
using Iter = list<Segment>::iterator;
auto getStart = [](Iter elm) -> Time { return elm->start(); };
auto getAfter = [](Iter elm) -> Time { return elm->after(); };

View file

@ -81,7 +81,7 @@ namespace mobject {
using Rebinder = Rebind<OutputMappingMemberFunc>;
public:
using Target = typename Rebinder::Res;
using Target = Rebinder::Res;
};
}//(End) type rebinding helper
@ -130,7 +130,7 @@ namespace mobject {
std::map<HashVal,HashVal> table_;
public:
using Target = typename Setup::Target;
using Target = Setup::Target;
// using default ctor and copy operations
@ -317,7 +317,7 @@ namespace mobject {
* stored. Thus the yielded Resolver should be checked, if in doubt.
*/
template<class DEF>
inline typename OutputMapping<DEF>::Resolver
inline OutputMapping<DEF>::Resolver
OutputMapping<DEF>::operator[] (PId sourcePipeID)
{
if (not contains (sourcePipeID))
@ -333,7 +333,7 @@ namespace mobject {
/** similar to the standard map-style access, but accepts
* a source pipe object instead of just a pipe-ID */
template<class DEF>
inline typename OutputMapping<DEF>::Resolver
inline OutputMapping<DEF>::Resolver
OutputMapping<DEF>::operator[] (PPipe const& pipe)
{
REQUIRE (pipe);
@ -372,7 +372,7 @@ namespace mobject {
* if in doubt.
*/
template<class DEF>
inline typename OutputMapping<DEF>::Resolver
inline OutputMapping<DEF>::Resolver
OutputMapping<DEF>::operator[] (Query<asset::Pipe> query4pipe)
{
HashVal hash4query = _mapping::slot (query4pipe);

View file

@ -116,11 +116,11 @@ namespace mobject {
, public HashIndexed<Placement<MObject>, lib::hash::LuidH >
{
protected:
typedef HashIndexed<Placement<MObject>, lib::hash::LuidH> HashInd;
typedef shared_ptr<MObject> _SmartPtr;
using HashInd = HashIndexed<Placement<MObject>, lib::hash::LuidH>;
using _SmartPtr = shared_ptr<MObject>;
typedef void (*Deleter)(MObject*);
typedef lib::time::Time Time;
typedef asset::shared_ptr<asset::Pipe> Pipe; ////TICKET #109 : get rid of this
using Time = lib::time::Time;
using Pipe = asset::shared_ptr<asset::Pipe>; ////TICKET #109 : get rid of this
@ -232,10 +232,10 @@ namespace mobject {
: public Placement<B>
{
protected:
typedef Placement<B> _Parent;
typedef typename _Parent::template Id<MO> const& _Id;
typedef typename _Parent::Deleter Deleter;
typedef typename _Parent::_SmartPtr _SmartPtr;
using _Parent = Placement<B>;
using _Id = _Parent::template Id<MO> const&;
using Deleter = _Parent::Deleter;
using _SmartPtr = _Parent::_SmartPtr;
Placement (MO & mo, Deleter killer)
@ -262,8 +262,8 @@ namespace mobject {
/** @todo cleanup uses of ref-to-placement. See Ticket #115 */
typedef Placement<MObject> PlacementMO;
typedef Placement<MObject> PMO;
using PlacementMO = Placement<MObject>;
using PMO = Placement<MObject>;

View file

@ -50,25 +50,25 @@ namespace session {
template<class MO>
struct _PickRes<function<bool(Placement<MO> const&)> >
{
typedef MO Type;
typedef MORef<MO> Result;
typedef typename ScopeQuery<MO>::iterator Iterator;
using Type = MO;
using Result = MORef<MO>;
using Iterator = ScopeQuery<MO>::iterator;
};
template<class MO>
struct _PickRes<bool(&)(Placement<MO> const&)>
{
typedef MO Type;
typedef MORef<MO> Result;
typedef typename ScopeQuery<MO>::iterator Iterator;
using Type = MO;
using Result = MORef<MO>;
using Iterator = ScopeQuery<MO>::iterator;
};
template<class MO>
struct _PickRes<bool(*)(Placement<MO> const&)>
{
typedef MO Type;
typedef MORef<MO> Result;
typedef typename ScopeQuery<MO>::iterator Iterator;
using Type = MO;
using Result = MORef<MO>;
using Iterator = ScopeQuery<MO>::iterator;
};
}
@ -106,11 +106,11 @@ namespace session {
* compiler error "no suitable function pick(.....)"
*/
template<typename PRED>
typename _PickRes<PRED>::Result
_PickRes<PRED>::Result
pick (PRED const& searchPredicate)
{
typedef typename _PickRes<PRED>::Result ResultRef;
typedef typename _PickRes<PRED>::Iterator Iterator;
using ResultRef = _PickRes<PRED>::Result;
using Iterator = _PickRes<PRED>::Iterator;
Iterator iter (pickAllSuitable ( SessionServiceExploreScope::getScopeRoot()
, searchPredicate

View file

@ -226,7 +226,7 @@ namespace session {
bool remove (ID);
template<class PLA>
typename BuildID<PLA>::Type insert (PLA const&, ID);
BuildID<PLA>::Type insert (PLA const&, ID);
@ -318,10 +318,10 @@ namespace session {
* @todo is this API used in application code? or just used in tests?
*/
template<class PLA>
typename BuildID<PLA>::Type
BuildID<PLA>::Type
PlacementIndex::insert (PLA const& newObj, ID targetScope)
{
typedef typename BuildID<PLA>::Target TargetMO;
using TargetMO = BuildID<PLA>::Target;
PlacementMO const& genericPlacement(newObj);
return find (insert (genericPlacement, targetScope))

View file

@ -119,11 +119,11 @@ namespace session {
template<class MO>
typename ScopeQuery<MO>::iterator
ScopeQuery<MO>::iterator
query() const;
template<class MO>
typename ScopeQuery<MO>::iterator
ScopeQuery<MO>::iterator
explore() const;
lib::IterSource<const Scope>::iterator
@ -175,7 +175,7 @@ namespace session {
* within \em current focus. Resolution is
* delegated to the \em current session */
template<class MO>
inline typename ScopeQuery<MO>::iterator
inline ScopeQuery<MO>::iterator
QueryFocus::query() const
{
return ScopeLocator::instance().query<MO> (*this);
@ -186,7 +186,7 @@ namespace session {
* as immediate Child within \em current focus.
* Resolution through \em current session */
template<class MO>
inline typename ScopeQuery<MO>::iterator
inline ScopeQuery<MO>::iterator
QueryFocus::explore() const
{
return ScopeLocator::instance().explore<MO> (*this);

View file

@ -78,7 +78,7 @@ namespace session {
template<class STRU>
AnyPair entry_Struct(Literal caps)
{
using Ptr = typename WrapReturn<STRU>::Wrapper;
using Ptr = WrapReturn<STRU>::Wrapper;
string capabilities (caps);
Query<STRU> query (capabilities);

View file

@ -174,7 +174,7 @@ namespace session {
template<class TY, class BASE>
class LookupPreconfigured : public BASE
{
typedef typename WrapReturn<TY>::Wrapper Ret;
using Ret = WrapReturn<TY>::Wrapper;
/** (dummy) implementation of the QueryHandler interface */
virtual bool

Some files were not shown because too many files have changed in this diff Show more