55 #ifndef LIB_META_FUNCTION_ERASURE_H 56 #define LIB_META_FUNCTION_ERASURE_H 92 template<
typename FUN>
100 return not (fer1==fer2);
107 typedef function<void(void)> FunVoid;
126 template<
typename SIG>
128 : FunHolder(function<SIG>(fun))
131 template<
typename SIG>
136 template<
typename SIG>
140 return get<function<SIG>>();
155 template<
typename SIG>
160 template<
typename SIG>
165 template<
typename SIG>
169 SIG *fun = get<SIG*>();
186 template<
typename SIG>
189 funP_ =
reinterpret_cast<void*
> (&fun);
191 template<
typename SIG>
194 funP_ =
reinterpret_cast<void*
> (fun);
197 template<
typename SIG>
201 return *
reinterpret_cast<SIG*
> (funP_);
205 explicit operator bool()
const {
return funP_; }
206 bool isValid()
const {
return funP_; }
Implementation namespace for support and library code.
Inline buffer to hold and own an object while concealing the concrete type.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Helper allowing type erasure while holding the actual object inline.
Lumiera error handling (C++ interface).