C++ pattern match library