46 #ifndef LIB_META_FUNCTION_ERASURE_H 47 #define LIB_META_FUNCTION_ERASURE_H 83 template<
typename FUN>
91 return not (fer1==fer2);
98 typedef function<void(void)> FunVoid;
117 template<
typename SIG>
119 : FunHolder(function<SIG>(fun))
122 template<
typename SIG>
127 template<
typename SIG>
131 return get<function<SIG>>();
146 template<
typename SIG>
151 template<
typename SIG>
156 template<
typename SIG>
160 SIG *fun = get<SIG*>();
177 template<
typename SIG>
180 funP_ =
reinterpret_cast<void*
> (&fun);
182 template<
typename SIG>
185 funP_ =
reinterpret_cast<void*
> (fun);
188 template<
typename SIG>
192 return *
reinterpret_cast<SIG*
> (funP_);
196 explicit operator bool()
const {
return funP_; }
197 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).