From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-30 17:12:17
"Reece Dunn" <msclrhd_at_[hidden]> wrote in message
> Hi All,
> In my post on the "vc8.0 toolset (bjam)" thread, I commented that VC8
> also warns when using the str[n]xxx APIs, because MS declares them
> deprecated. There are several issues here:
>  How does this impact Boost code that uses the <cstring> API?
> Especially since they deprecate the strn variations as well, which are
> safer, and considering that the "safe" versions are not yet a part of
> the standard.
Are you refering to the versions with the 'n' as the safe versions? If so, these
are from C89 and so are part of the current C++ standard. (My source is
Plaugher's book, since I don't have a copy of C89.) AFAIK, these functions have
not been deprecated by any relevant standards body. I think microsoft has
deprecated them in favor of its Strsafe.h functions (http://tinyurl.com/6z3na.).
Since they will still be part of the standard and are widely used, I can't
imagine microsoft ever actually removing these functions. So I think the correct
route is to ignore or disable the warnings.
It looks like microsoft offers the option of defining _CRT_SECURE_NO_DEPRECATE
to suppress the deprecation warnings, but I 'm not sure it would be appropriate
for boost to definte this automatically.
Maybe someone with ties to microsoft, such as Bronek Kozicki or Carl Daniel, can
correct me if I'm wrong.