#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; auto t = uc.NewTransformer(); // NOTE: We do NOT call t.Find(), so the matches collection is empty. auto m = t.Matches(); cout << "Match count: " << m.Count() << endl; // Even with no matches, the parent context should be accessible auto parent_uc = m.uCalc(); cout << "Parent uCalc is valid: " << tf(parent_uc.MemoryIndex() == uc.MemoryIndex()) << endl; }