54#ifndef LIB_META_FUNCTION_CLOSURE_H
55#define LIB_META_FUNCTION_CLOSURE_H
83 using std::_Placeholder;
91 template<
typename TYPES,
size_t i=1>
96 template<
typename X,
typename TAIL,
size_t i>
112 using std::tuple_element;
113 using std::tuple_size;
135 template<
typename SRC,
typename TAR,
size_t start>
147 static constexpr bool
150 return (start <= idx)
151 and (idx < start + std::tuple_size<SRC>());
156 template<
size_t idx,
bool doPick = PartiallyInitTuple::useArg(
idx)>
189 template<
typename...ARGS>
235 bindArgTuple (
FUN&& fun, TUP&& tuple)
240 return std::bind (move(
functor)
241 ,forward<
decltype(
args)> (
args) ...);
243 ,std::forward<TUP> (tuple));
255 template<
class TYPES,
class FUN>
290 template<
typename SIG,
typename VAL>
329 template<
class SRC,
class TAR,
size_t i>
332 template<
class SRC,
class TAR,
size_t i>
404 template<
typename SIG,
typename X, u
int pos>
430 template<
class SRC,
class TAR,
size_t i>
438 template<
class FUN,
class VAL>
444 std::forward_as_tuple (
461 template<
typename FUN1,
typename FUN2>
471 template<
typename F1,
typename F2
472 ,
typename RET,
typename... ARGS>
479 return [binding = move(binding)]
480 (ARGS ...args) ->
RET
503 template<
typename FUN,
typename TERM>
508 ,std::forward<TERM> (arg));
511 template<
typename FUN,
typename TERM>
517 ,std::forward<TERM> (arg));
528 template<
typename FUN1,
typename FUN2>
532 static_assert (
_Fun<FUN1>(),
"expect something function-like for function-1");
533 static_assert (
_Fun<FUN2>(),
"expect something function-like for function-2");
537 ,Chain::adaptedFunType());
Metaprogramming tools for detecting and transforming function types.
Implementation namespace for support and library code.
OBJ * unConst(const OBJ *)
shortcut to save some typing when having to define const and non-const variants of member functions
Metaprogramming with tuples-of-types and the std::tuple record.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...