I've wasted a day and a half on this, finally caving and asking for help. Bafflingly, no one else seems to have the problem, since google searches don't show much.
Here's the deal: I'm able to step into non-template functions, but I can't step into member functions of a template class. gdb steps over the functions rather than into them. The template class is pretty unexciting -- I've just templated on the floating point type. No crazy meta-template programming or nested types to confuse the compiler, very boring stuff.
So this function I can step into no problem:
I'm using gcc 4.2.1, gdb 7.2
Any thoughts?
Cheers,
Kevin
Here's the deal: I'm able to step into non-template functions, but I can't step into member functions of a template class. gdb steps over the functions rather than into them. The template class is pretty unexciting -- I've just templated on the floating point type. No crazy meta-template programming or nested types to confuse the compiler, very boring stuff.
So this function I can step into no problem:
Code:
void foo()
{
std::cout << "foo()" << std::endl;
}
But the baz method of an instance of this class doesn't work:
template <typename Float>
struct Bar
{
Bar(Float val) : val(val) {}
void baz()
{
std::cout << "baz()" << std::endl;
}
Float val;
};
Any thoughts?
Cheers,
Kevin
Last edited by a moderator: