Menu

#5 boost date (localtime) deprecation warning on Win

Beta (B.x)
closed-fixed
CMake (4)
5
2006-09-21
2006-09-17
A. Sundman
No

When compiling the flogger lib. using VCExpress, I get
the following warning:

C:\boost\include\boost-1_33_1\boost/date_time/c_time.hpp(68)
warning C4996: 'localtime' was declared deprecated
4> C:\Program Files\Microsoft Visual Studio
8\VC\include\time.inl(114) : see declaration of 'localtime'
4> Message: 'This function or variable may be
unsafe. Consider using localtime_s instead. To disable
deprecation, use _CRT_SECURE_NO_DEPRECATE. See online
help for details.'

The suggested fix (defining _CRT_SECURE_NO_DEPRECATE)
doesn't fix it. Investigate.

Discussion

  • A. Sundman

    A. Sundman - 2006-09-21
    • status: open --> open-fixed
     
  • A. Sundman

    A. Sundman - 2006-09-21

    Logged In: YES
    user_id=1582185

    Temp. fix by #pragma warning(disable : 4996) on all windows
    compilations. Seems to work fine though.

     
  • A. Sundman

    A. Sundman - 2006-09-21
    • status: open-fixed --> closed-fixed
     
  • A. Sundman

    A. Sundman - 2006-09-21

    Logged In: YES
    user_id=1582185

    If this fix is not sufficient, a new bug or feature req.
    should be created to manage it.

     

Log in to post a comment.

MongoDB Logo MongoDB