Hegel 0.18.2
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::Speculation Class Reference

An open speculative region; see Printer::speculate(). More...

#include <printer.h>

Public Member Functions

 Speculation (Speculation &&other) noexcept
 Move-constructs, transferring the open region.
 Speculation (const Speculation &)=delete
Speculation & operator= (const Speculation &)=delete
Speculation & operator= (Speculation &&)=delete
void commit ()
 End the region and keep what was written in it.
void abort ()
 End the region and discard what was written in it.

Detailed Description

An open speculative region; see Printer::speculate().

Move-only. Destroying it without commit() or abort() aborts it, so an exception from a draw discards what the draw wrote.

Constructor & Destructor Documentation

◆ Speculation()

hegel::Speculation::Speculation ( Speculation && other)
noexcept

Move-constructs, transferring the open region.

Parameters
otherThe speculation to move from. It no longer closes the region.

The documentation for this class was generated from the following file: