#include <iostream>
template<bool> struct CTAssert;
template<> struct CTAssert<true>{};
template<int rows, int cols>
class Matrix
{
public:
void template_method();
};
template<int rows, int cols>
void Matrix<rows,cols>::template_method()
{
CTAssert<rows==cols> check;
}
int main() {
Matrix<2,3> m1;
Matrix<3,3> m2;
m2.template_method();
//m1.template_method();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8Ym9vbD4gc3RydWN0IENUQXNzZXJ0Owp0ZW1wbGF0ZTw+IHN0cnVjdCBDVEFzc2VydDx0cnVlPnt9OwoKCnRlbXBsYXRlPGludCByb3dzLCBpbnQgY29scz4KY2xhc3MgTWF0cml4CnsKcHVibGljOgoJdm9pZCB0ZW1wbGF0ZV9tZXRob2QoKTsKfTsKCnRlbXBsYXRlPGludCByb3dzLCBpbnQgY29scz4Kdm9pZCBNYXRyaXg8cm93cyxjb2xzPjo6dGVtcGxhdGVfbWV0aG9kKCkKewoJQ1RBc3NlcnQ8cm93cz09Y29scz4gY2hlY2s7Cn0KCmludCBtYWluKCkgewoKCU1hdHJpeDwyLDM+IG0xOwoJTWF0cml4PDMsMz4gbTI7CgkKCW0yLnRlbXBsYXRlX21ldGhvZCgpOwoJLy9tMS50ZW1wbGF0ZV9tZXRob2QoKTsKCQoJcmV0dXJuIDA7Cn0=