C++ Boost: what’s the cause of this warning?

It is nothing to worry about. In the last few releases of MSVC, they’ve gone into full security-paranoia mode. std::copy issues this warning when it is used with raw pointers, because when used incorrectly, it can result in buffer overflows.

Their iterator implementation performs bounds checking to ensure this doesn’t happen, at a significant performance cost.

So feel free to ignore the warning. It doesn’t mean there’s anything wrong with your code. It is just saying that if there is something wrong with your code, then bad things will happen.
Which is an odd thing to issue warnings about. 😉

Leave a Comment