tags:

views:

85

answers:

3

I need to change the sgetn to _Sgetn_s in boost header file here http://www.boost.org/doc/libs/1_40_0/boost/archive/basic_binary_iprimitive.hpp I don't know what the function does so i'm afraid to edit it myself.

A: 

You could compile with -Wno-deprecated which is not fixing it. (or MSVC equivalent)

I compared the header with the one in Boost 1.42.0. There are no changes, related to sgetn. _Sgetn_s is an Microsoft C++ specific optimization. sgetn is not deprecated.

Eddy Pronk
+1  A: 

I don't recommend you editing the header file directly, but instead you can put the flag /wd4996 in command-line options in MSVS to supress the related warnings.

Here you can read more about different levels of warnings on MSDN.

Dave18
+1  A: 

As Charles says, sgetn is not deprecated, and even the draft C++0x standard recommends specific uses for it. Recommend you look at your implementation's code for basic_streambuf, find the declaration or flag that makes it deprecated, and look for a preprocessor flag to disable it.

Potatoswatter