34class ErasedOperation {
 
   36    template <SomeOperation OpType>
 
   37        requires(not std::is_same_v<std::decay_t<OpType>, ErasedOperation>)
 
   38     ErasedOperation(OpType&& operation)
 
   39        : pimpl_{std::make_unique<Model<OpType>>(std::forward<OpType>(operation))}
 
   43    ~ErasedOperation() = 
default;
 
   45    ErasedOperation(ErasedOperation 
const&) = 
delete;
 
   46    ErasedOperation(ErasedOperation&&) = 
default;
 
   49    operator=(ErasedOperation 
const&) = 
delete;
 
   51    operator=(ErasedOperation&&) = 
default;
 
   59    std::expected<std::any, ExecutionError>
 
   82        virtual ~Concept() = 
default;
 
   95    struct Model : Concept {
 
   98        template <
typename OType>
 
   99            requires std::is_same_v<OType, OpType>
 
  100        Model(OType&& operation) : operation{std::forward<OType>(operation)}
 
  105        wait() noexcept
 override 
  107            if constexpr (not SomeAwaitable<OpType>) {
 
  108                ASSERT(
false, 
"Called wait() on an operation that does not support it");
 
  115        std::expected<std::any, ExecutionError>
 
  118            if constexpr (not SomeOperationWithData<OpType>) {
 
  119                ASSERT(
false, 
"Called get() on an operation that does not support it");
 
  123                return operation.get();
 
  130            if constexpr (not SomeCancellableOperation<OpType> and not SomeStoppableOperation<OpType> and
 
  131                          not SomeAbortable<OpType>) {
 
  132                ASSERT(
false, 
"Called abort() on an operation that can't be aborted, cancelled nor stopped");
 
  134                if constexpr (SomeAbortable<OpType>) {
 
  137                    if constexpr (SomeCancellableOperation<OpType>)
 
  139                    if constexpr (SomeStoppableOperation<OpType>)
 
  140                        operation.requestStop();
 
  148            if constexpr (not SomeForceInvocableOperation<OpType>) {
 
  149                ASSERT(
false, 
"Called invoke() on an operation that can't be force-invoked");
 
  157    std::unique_ptr<Concept> pimpl_;