c++: Fix template arguments comparison with class NTTP [PR91754]