Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 是否可能在gdb中的模板类的隐式声明方法处中断?_C++_Templates_Gdb - Fatal编程技术网

C++ 是否可能在gdb中的模板类的隐式声明方法处中断?

C++ 是否可能在gdb中的模板类的隐式声明方法处中断?,c++,templates,gdb,C++,Templates,Gdb,这里有一个例子。我尝试用3-4个签名组合设置一个中断,但所有内容都被检测为未定义 #include <iostream> template <class T> class C { public: void f(){std::cout << "f()\n";} }; int main() { C<int> c1; C<int> c2(c1); c2.f(); } Both "b C::C(const C&

这里有一个例子。我尝试用3-4个签名组合设置一个中断,但所有内容都被检测为未定义

#include <iostream>

template <class T>
class C
{
public:
    void f(){std::cout << "f()\n";}
};

int main()
{
   C<int> c1;
   C<int> c2(c1);
   c2.f();
}

 Both "b C::C(const C&)" and 
      "b C<int>::C(const C<int>&)" fail to break at implicitly declared copy constructor.    
#包括
模板
C类
{
公众:

void f(){std::cout gdb只知道编译器定义的符号。如果编译器不发出符号,gdb就没有什么可中断的。