35 using lumiera::error::LUMIERA_ERROR_FATAL;
36 using lumiera::error::LUMIERA_ERROR_CAPACITY;
49 uint _create_count = 0;
58 virtual ~
Base() =
default;
59 virtual void confess() =0;
81 ~
DD() { _checksum -= ii; }
86 memset (&buff_,
'*', ii);
88 memcpy (&buff_, sym, min (ii, strlen (sym)));
96 cout <<
"DD<" << ii <<
">: " << buff_ << endl;
104 D42Sub (
string s1,
string s2)
105 :
DD<42> ((s1+
' '+s2).c_str())
111 cout <<
"I'm special, " << buff_ << endl;
156 CHECK (1 == _create_count);
157 CHECK (0 == _checksum);
160 buff.create<DD<5>>();
165 CHECK (0 == buff->id_);
166 CHECK (4 == _create_count);
171 using Handle = Buffer::Handle;
173 Handle plantingHandle{buff};
174 plantingHandle.emplace (std::move (DD<9>{
"I'm fine"}));
178 CHECK (9 == _checksum);
181 Handle copyHandle = plantingHandle;
183 CHECK (9 == buff->id_);
185 CHECK (0 == buff->id_);
192 copyHandle.create<D42Sub> (
"what the f**",
"is going on here?");
196 CHECK (8 == _create_count);
197 CHECK (42 == _checksum);
199 CHECK (0 == _checksum);
Generic opaque reference counting handle, for accessing a service and managing its lifecycle...
Types marked with this mix-in may be moved but not copied.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Implementation namespace for support and library code.
Derived specific exceptions within Lumiera's exception hierarchy.
Token or Atom with distinct identity.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
const size_t _ALIGNMENT_OVERHEAD_
maximum additional storage maybe wasted due to alignment of the contained object within OpaqueHolder'...
Simplistic test class runner.
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.
A collection of frequently used helper functions to support unit testing.
Buffer to place and maintain an object instance privately within another object.