|
Boost : |
Subject: Re: [boost] [string _algo library] warning/issues under visual c++ 8
From: Pavol Droba (droba_at_[hidden])
Date: 2008-09-03 04:13:20
Hi,
Sean Farrow wrote:
> Hi:
> When using the string algo library func tion is_any_of, I get the
> following warning under visual c++:
> c:\program
> files\boost\boost_trunk\boost/algorithm/string/detail/classification.hpp
> (102) : warning C4996: 'std::copy': Function call with parameters that
> may be unsafe - this call relies on the caller to check that the passed
> values are correct. To disable this warning, use
> -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
> 'Checked Iterators'
> Could secure warnings be turned off, or could we potentially look int o
> using checked iterators with visual c++?
> Also, I get the following isues:
> c:\program
> files\boost\boost_trunk\boost/algorithm/string/classification.hpp(206) :
> see reference to function template instantiation
> 'boost::algorithm::detail::is_any_ofF::is_any_ofF>(const RangeT &)'
> being compiled
> with
> [
> CharT=char,
> IteratorT=const char *,
> RangeT=boost::iterator_range
> ]
> Is this something I should worry about, what does this mean?
> Any help apreciated.
> Sean.
>
This is absolutely nothing you should worry about. Microsoft is issuing this warning
when code uses 100% standard library function instead of their proprietary "safe"
one.
Just put _SCL_SECURE_NO_WARNINGS in your project defines as suggested in the warning,
and it will be gone.
Best Regards,
Pavol.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk