我很难搞清楚代码中的哪一部分会导致标题中提到的错误。错误列表中的错误消息如下所示:
error C2280: 'Foo::Foo(const Foo &)' : attempting to reference a deleted function
file: vector, line: 1100
编译器输出如下所示:
d:\visual studio 2013\vc\include\vector(1100): error C2280: 'Foo::Foo(const Foo &)'
: attempting to reference a deleted function
e:\testproject\src\foo.h(22) : see declaration of 'Foo::Foo'
this diagnostic occurred in the compiler generated function
'luabridge::luabridge::TypeListValues<luabridge::TypeList<P1,luabridge::None>>
::TypeListValues(const luabridge::TypeListValues<luabridge::TypeList<P1,luabridge::None>> &)'
with
[
P1=Foo &
]
对我来说,此错误消息绝对没有说明错误发生的位置。我知道它是关于一个被删除的拷贝构造函数(foo.h中的第22行是删除的拷贝ctor),但就是这样。我想保留复制构造函数。
如何找出错误的确切发生?