When resizing a multi-dimensional array I receive the warning:
d:\microsoft visual studio\vc98\include\xutility(100) : warning C4101: '_Tmp' : unreferenced local variable d:\boost\include\boost-1_31\boost\multi_array.hpp(246) : see reference to function template instantiation 'void __cdecl std::swap(class std::allocator<double> &,class std::allocator<double> &)' being compiled
Hmm...this looks like the warning is pointing at the implementation of swap in your compiler's standard library.
If I initalising the array to shape and then resize it there is no problem, but I require it to be a class member variable.
what exactly do you mean by "initialiing the array to shape and then resize it"? Can you show a complete piece of code that gives the warning and a complete piece of code that does not but still uses resize?
Thanks,
ron
I appear to have made a small error, the warning occurs 'whenever' resize is called. So the problem now is: Every time the resize function of multi_array is called, a warning is generated in the use of MSVC++ 6.0's implementation of std::swap. The problem is solved by commenting out the line swap(this->allocator_,new_array.allocator_); in multi_array.hpp This hasn't incurred an execution problem under debug or release. Could someone explain this? What is the purpose of this line, and why wasn't it swapping the allocators? Thanks, Ewan