#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; auto t = uc.NewTransformer(); t.Text("some text"); t.Pattern("some"); t.Find(); auto m = t.Matches(); // Get the parent uCalc instance from the Matches collection auto parent_uc = m.uCalc(); // Verify they are the same instance using their MemoryIndex cout << tf(parent_uc.MemoryIndex() == uc.MemoryIndex()) << endl; }