3#include <sysio/vm/exceptions.hpp>
4#include <sysio/vm/utils.hpp>
8namespace sysio {
namespace vm {
76 int exceptions = std::uncaught_exceptions();
79 struct throwing_destructor { ~throwing_destructor()
noexcept(
false) {} };
80 throwing_destructor x;
81 return scope_guard{ [
this, old_bnds, exceptions, x](){
82 SYS_VM_ASSERT(exceptions != std::uncaught_exceptions() ||
raw_ptr ==
bnds, guarded_ptr_exception,
"guarded_ptr not advanced");
91 inline T at(
size_t index)
const {
#define T(meth, val, expected)
auto scoped_shrink_bounds(std::size_t n)
guarded_ptr & operator++()
friend guarded_ptr operator+(const guarded_ptr &arg, size_t i)
T operator[](size_t index) const
friend guarded_ptr operator+(std::size_t i, const guarded_ptr &arg)
guarded_ptr(T *rp, size_t bnds)
guarded_ptr & operator+=(size_t i)
auto scoped_consume_items(std::size_t n)
guarded_ptr operator++(int)
T & operator=(const guarded_ptr< T > &ptr)=delete
#define SYS_VM_ASSERT(expr, exc_type, msg)