c++ - How do I know where "C2280 - attempting to reference a deleted function" occurs? -
i'm having hard time figuring out piece in code causes error mentioned in title. error message in error list this:
error c2280: 'foo::foo(const foo &)' : attempting reference deleted function file: vector, line: 1100
and compiler output looks this:
d:\visual studio 2013\vc\include\vector(1100): error c2280: 'foo::foo(const foo &)' : attempting reference deleted function e:\testproject\src\foo.h(22) : see declaration of 'foo::foo' diagnostic occurred in compiler generated function 'luabridge::luabridge::typelistvalues<luabridge::typelist<p1,luabridge::none>> ::typelistvalues(const luabridge::typelistvalues<luabridge::typelist<p1,luabridge::none>> &)' [ p1=foo & ]
to me, error message says absolutely nothing error occurs. know it's deleted copy constructor (line 22 in foo.h deleted copy ctor), that's it. i'd keep copy constructor deleted well.
how can find out exact occurrence of error?
without seeing more of code hard precise, perhaps need use ref-counted pointers objects instead of objects themselves. see this post, example.
Comments
Post a Comment