Update templmatch.cpp