"contained(Tp(0, NULL, ""))" looks dangerous, test them more, also add a constraint check on Tp for the above mentioned constructor