如果我做:
(gdb) b nmspace::TestClass::compareFOO
然后将以下方法签名作为断点进行签名:
nmspace::TestClass::compareFOO(blah::Foo const&, blah::Foo const&, unsigned int)
nmspace::TestClass::compareFOO(blah::Foo const&, blah::FooField const&, unsigned int)
nmspace::TestClass::compareFOO(blah::FooField const&, blah::Foo const&, unsigned int)
nmspace::TestClass::compareFOO(blah::FooField const&, blah::FooField const&, unsigned int)
是否有类似以下的内容,或者我们必须每次都为模板方法编写四个?多态性不是也适用于 C++ 模板吗?
nmspace::TestClass::compareFOOES<blah::Foo, blah::Foo>
nmspace::TestClass::compareFOOES<blah::Foo, blah::FooField>
nmspace::TestClass::compareFOOES<blah::FooField, blah::Foo>
nmspace::TestClass::compareFOOES<blah::FooField, blah::FooField>
我试过nmspace::TestClass::compareFOOES
, nmspace::TestClass::compareFOOES*
,nmspace::TestClass::compareFOOES<>()
等