61 using LERR_(BOTTOM_VALUE);
78 T& operator() ()
const {
return ref_;}
83 refFunction (T& target)
110 template<
typename TY>
114 using TY_unconst = std::remove_const_t<TY>;
118 std::byte content_[
sizeof(TY)];
122 template<
typename REF>
126 new(&content_) TY{std::forward<REF> (ref)};
133 if (created_) access().~TY();
140 return * std::launder (reinterpret_cast<TY*> (&content_));
146 return const_cast<TY_unconst&
> (access());
164 build (std::move(ro));
186 build (std::move (*rref));
197 this->operator= (*cref);
213 this->operator= (std::move(*rref));
230 operator= (X&& something)
232 if (!isSameObject (something, access() ))
235 build (std::forward<X>(something));
249 operator bool()
const 261 , LERR_(BOTTOM_VALUE));
290 template<
typename TY>
309 operator bool()
const {
return isValid(); }
314 operator= (TY& otherRef)
316 content_ = &otherRef;
334 , LERR_(BOTTOM_VALUE));
341 return bool(content_);
366 operator bool()
const {
return true; }
367 bool isValid ()
const {
return true; }
383 template<
typename TY>
388 || ( w1 && w2 && (*w1)==(*w2));
390 template<
typename TY>
394 return not (w1 == w2);
409 template<
typename SIG>
411 :
public function<SIG>
429 template<
typename FUN>
431 : function<SIG>{lib::meta::func::chained
432 ( std::forward<FUN> (targetFunction)
433 , [
this](Res res) -> Res
436 return std::forward<Res> (res);
441 Res& operator*()
const {
return *lastResult_; }
442 bool isValid ()
const {
return lastResult_.isValid(); }
445 operator bool()
const {
return isValid(); }
Reference wrapper implemented as constant function, returning the (fixed) reference on invocation...
TY_unconst & access_unconst() const
< used to assign new buffer contents
Any copy and copy construction prohibited.
FunctionResult(FUN &&targetFunction)
Create result-remembering functor by outfitting a copy of the given function with an adaptor to captu...
bool operator==(PtrDerefIter< I1 > const &il, PtrDerefIter< I2 > const &ir)
Supporting equality comparisons...
Partial function application and building a complete function closure.
Universal value/ref wrapper accessible similar to a pointer.
Implementation namespace for support and library code.
ItemWrapper & defaultInit()
implant a default-initialised instance of the payload type
Derived specific exceptions within Lumiera's exception hierarchy.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Metaprogramming tools for transforming functor types.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Extension of ItemWrapper: a function remembering the result of the last invocation.
Lumiera error handling (C++ interface).
bool isSameObject(A const &a, B const &b)
compare plain object identity, bypassing any custom comparison operators.