MCPcopy Create free account
hub / github.com/3rdparty/libprocess / AsVisitor

Class AsVisitor

include/process/event.hpp:85–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 {
84 const T* result = nullptr;
85 struct AsVisitor : EventVisitor
86 {
87 explicit AsVisitor(const T** _result) : result(_result) {}
88 void visit(const T& t) override { *result = &t; }
89 const T** result;
90 } visitor(&result);
91 visit(&visitor);
92 if (result == nullptr) {
93 ABORT("Attempting to \"cast\" event incorrectly!");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected