Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58017 - in trunk: . boost/uuid
From: atompkins_at_[hidden]
Date: 2009-11-28 16:53:16


Author: atompkins
Date: 2009-11-28 16:53:16 EST (Sat, 28 Nov 2009)
New Revision: 58017
URL: http://svn.boost.org/trac/boost/changeset/58017

Log:
disabled deprecated warnings for MSVC
Properties modified:
   trunk/ (props changed)
Text files modified:
   trunk/boost/uuid/seed_rng.hpp | 10 ++++++++++
   trunk/boost/uuid/uuid.hpp | 10 ++++++++++
   trunk/boost/uuid/uuid_generators.hpp | 8 ++++----
   trunk/boost/uuid/uuid_io.hpp | 12 +++++++++++-
   4 files changed, 35 insertions(+), 5 deletions(-)

Modified: trunk/boost/uuid/seed_rng.hpp
==============================================================================
--- trunk/boost/uuid/seed_rng.hpp (original)
+++ trunk/boost/uuid/seed_rng.hpp 2009-11-28 16:53:16 EST (Sat, 28 Nov 2009)
@@ -8,6 +8,7 @@
 // Revision History
 // 09 Nov 2007 - Initial Revision
 // 25 Feb 2008 - moved to namespace boost::uuids::detail
+// 28 Nov 2009 - disabled deprecated warnings for MSVC
 
 // seed_rng models a UniformRandomNumberGenerator (see Boost.Random).
 // Random number generators are hard to seed well. This is intended to provide
@@ -34,6 +35,11 @@
 //#include <boost/generator_iterator.hpp>
 # include <boost/iterator/iterator_facade.hpp>
 
+#if defined(_MSC_VER)
+#pragma warning(push) // Save warning settings.
+#pragma warning(disable : 4996) // Disable deprecated std::fopen
+#endif
+
 #ifdef BOOST_NO_STDC_NAMESPACE
 namespace std {
     using ::memcpy;
@@ -232,4 +238,8 @@
 
 }}} //namespace boost::uuids::detail
 
+#if defined(_MSC_VER)
+#pragma warning(pop) // Restore warnings to previous state.
+#endif
+
 #endif

Modified: trunk/boost/uuid/uuid.hpp
==============================================================================
--- trunk/boost/uuid/uuid.hpp (original)
+++ trunk/boost/uuid/uuid.hpp 2009-11-28 16:53:16 EST (Sat, 28 Nov 2009)
@@ -25,6 +25,7 @@
 // 12 Nov 2007 - moved serialize code to uuid_serialize.hpp file
 // 25 Feb 2008 - moved to namespace boost::uuids
 // 19 Mar 2009 - changed to a POD, reorganized files
+// 28 Nov 2009 - disabled deprecated warnings for MSVC
 
 #ifndef BOOST_UUID_HPP
 #define BOOST_UUID_HPP
@@ -37,6 +38,11 @@
 #include <boost/mpl/bool.hpp>
 #include <boost/type_traits/is_pod.hpp>
 
+#if defined(_MSC_VER)
+#pragma warning(push) // Save warning settings.
+#pragma warning(disable : 4996) // Disable deprecated std::swap_ranges, std::equal
+#endif
+
 #ifdef BOOST_NO_STDC_NAMESPACE
 namespace std {
     using ::size_t
@@ -196,4 +202,8 @@
 
 } // namespace boost
 
+#if defined(_MSC_VER)
+#pragma warning(pop) // Restore warnings to previous state.
+#endif
+
 #endif // BOOST_UUID_HPP

Modified: trunk/boost/uuid/uuid_generators.hpp
==============================================================================
--- trunk/boost/uuid/uuid_generators.hpp (original)
+++ trunk/boost/uuid/uuid_generators.hpp 2009-11-28 16:53:16 EST (Sat, 28 Nov 2009)
@@ -41,7 +41,7 @@
     
     uuid operator()() const {
         // initialize to all zeros
- uuid u = {0};
+ uuid u = {{0}};
         return u;
     }
 };
@@ -79,12 +79,12 @@
     template <typename CharIterator>
     uuid operator()(CharIterator begin, CharIterator end) const
     {
- typedef std::iterator_traits<typename CharIterator>::value_type ch;
+ typedef typename std::iterator_traits<typename CharIterator>::value_type char_type;
 
         // check open brace
- ch c = get_next_char(begin, end);
+ char_type c = get_next_char(begin, end);
         bool has_open_brace = is_open_brace(c);
- ch open_brace_char = c;
+ char_type open_brace_char = c;
         if (has_open_brace) {
             c = get_next_char(begin, end);
         }

Modified: trunk/boost/uuid/uuid_io.hpp
==============================================================================
--- trunk/boost/uuid/uuid_io.hpp (original)
+++ trunk/boost/uuid/uuid_io.hpp 2009-11-28 16:53:16 EST (Sat, 28 Nov 2009)
@@ -7,6 +7,7 @@
 
 // Revision History
 // 20 Mar 2009 - Initial Revision
+// 28 Nov 2009 - disabled deprecated warnings for MSVC
 
 #ifndef BOOST_UUID_IO_HPP
 #define BOOST_UUID_IO_HPP
@@ -19,6 +20,11 @@
 #include <locale>
 #include <algorithm>
 
+#if defined(_MSC_VER)
+#pragma warning(push) // Save warning settings.
+#pragma warning(disable : 4996) // Disable deprecated std::ctype<char>::widen, std::copy
+#endif
+
 namespace boost {
 namespace uuids {
 
@@ -58,7 +64,7 @@
 
         ch xdigits[16];
         {
- char szdigits[17] = "0123456789ABCDEF";
+ char szdigits[] = "0123456789ABCDEF";
             ctype.widen(szdigits, szdigits+16, xdigits);
         }
         ch*const xdigits_end = xdigits+16;
@@ -106,4 +112,8 @@
 
 }} //namespace boost::uuids
 
+#if defined(_MSC_VER)
+#pragma warning(pop) // Restore warnings to previous state.
+#endif
+
 #endif // BOOST_UUID_IO_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk