37 std::unique_ptr<T> hndl;
56 "please reset the storage component before", loc);
58 hndl = std::make_unique<T>(std::forward<T>(
arg));
Helper class for Storage Module of any solver.
void set(T &&arg, SourceLocation loc=SourceLocation())
Replace the held object by moving the given argument.
void reset()
Reset the storage component.
bool is_empty()
Check if the storage component is empty.
T & get(SourceLocation loc=SourceLocation())
Get the reference to the held object if it was allocated.
namespace for basic c++ utilities
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
This file contains the definition for the stacktrace related functionality.
provide information about the source location