Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86051 - trunk/boost/functional/hash
From: steveire_at_[hidden]
Date: 2013-09-30 07:22:29


Author: skelly
Date: 2013-09-30 07:22:29 EDT (Mon, 30 Sep 2013)
New Revision: 86051
URL: http://svn.boost.org/trac/boost/changeset/86051

Log:
Functional: Remove obsolete MSVC version checks.

Text files modified:
   trunk/boost/functional/hash/extensions.hpp | 62 ----------------------------------------
   trunk/boost/functional/hash/hash.hpp | 45 -----------------------------
   trunk/boost/functional/hash/hash_fwd.hpp | 4 --
   3 files changed, 0 insertions(+), 111 deletions(-)

Modified: trunk/boost/functional/hash/extensions.hpp
==============================================================================
--- trunk/boost/functional/hash/extensions.hpp Mon Sep 30 07:22:07 2013 (r86050)
+++ trunk/boost/functional/hash/extensions.hpp 2013-09-30 07:22:29 EDT (Mon, 30 Sep 2013) (r86051)
@@ -40,10 +40,6 @@
 #include <boost/type_traits/is_array.hpp>
 #endif
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-#include <boost/type_traits/is_const.hpp>
-#endif
-
 namespace boost
 {
     template <class A, class B>
@@ -232,11 +228,7 @@
             template <class Array>
             struct inner
             {
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
                 static std::size_t call(Array const& v)
-#else
- static std::size_t call(Array& v)
-#endif
                 {
                     const int size = sizeof(v) / sizeof(*v);
                     return boost::hash_range(v, v + size);
@@ -298,8 +290,6 @@
         template <bool IsPointer>
         struct hash_impl;
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
         template <>
         struct hash_impl<false>
         {
@@ -320,58 +310,6 @@
 #endif
             };
         };
-
-#else // Visual C++ 6.5
-
- // Visual C++ 6.5 has problems with nested member functions and
- // applying const to const types in templates. So we get this:
-
- template <bool IsConst>
- struct hash_impl_msvc
- {
- template <class T>
- struct inner
- : public std::unary_function<T, std::size_t>
- {
- std::size_t operator()(T const& val) const
- {
- return hash_detail::call_hash<T const>::call(val);
- }
-
- std::size_t operator()(T& val) const
- {
- return hash_detail::call_hash<T>::call(val);
- }
- };
- };
-
- template <>
- struct hash_impl_msvc<true>
- {
- template <class T>
- struct inner
- : public std::unary_function<T, std::size_t>
- {
- std::size_t operator()(T& val) const
- {
- return hash_detail::call_hash<T>::call(val);
- }
- };
- };
-
- template <class T>
- struct hash_impl_msvc2
- : public hash_impl_msvc<boost::is_const<T>::value>
- ::BOOST_NESTED_TEMPLATE inner<T> {};
-
- template <>
- struct hash_impl<false>
- {
- template <class T>
- struct inner : public hash_impl_msvc2<T> {};
- };
-
-#endif // Visual C++ 6.5
     }
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 }

Modified: trunk/boost/functional/hash/hash.hpp
==============================================================================
--- trunk/boost/functional/hash/hash.hpp Mon Sep 30 07:22:07 2013 (r86050)
+++ trunk/boost/functional/hash/hash.hpp 2013-09-30 07:22:29 EDT (Mon, 30 Sep 2013) (r86051)
@@ -244,13 +244,8 @@
 #endif
 #endif
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- template <class T>
- inline void hash_combine(std::size_t& seed, T& v)
-#else
     template <class T>
     inline void hash_combine(std::size_t& seed, T const& v)
-#endif
     {
         boost::hash<T> hasher;
         seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
@@ -358,7 +353,6 @@
     //
     // These are undefined later.
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
 #define BOOST_HASH_SPECIALIZE(type) \
     template <> struct hash<type> \
          : public std::unary_function<type, std::size_t> \
@@ -378,45 +372,6 @@
             return boost::hash_value(v); \
         } \
     };
-#else
-#define BOOST_HASH_SPECIALIZE(type) \
- template <> struct hash<type> \
- : public std::unary_function<type, std::size_t> \
- { \
- std::size_t operator()(type v) const \
- { \
- return boost::hash_value(v); \
- } \
- }; \
- \
- template <> struct hash<const type> \
- : public std::unary_function<const type, std::size_t> \
- { \
- std::size_t operator()(const type v) const \
- { \
- return boost::hash_value(v); \
- } \
- };
-
-#define BOOST_HASH_SPECIALIZE_REF(type) \
- template <> struct hash<type> \
- : public std::unary_function<type, std::size_t> \
- { \
- std::size_t operator()(type const& v) const \
- { \
- return boost::hash_value(v); \
- } \
- }; \
- \
- template <> struct hash<const type> \
- : public std::unary_function<const type, std::size_t> \
- { \
- std::size_t operator()(type const& v) const \
- { \
- return boost::hash_value(v); \
- } \
- };
-#endif
 
     BOOST_HASH_SPECIALIZE(bool)
     BOOST_HASH_SPECIALIZE(char)

Modified: trunk/boost/functional/hash/hash_fwd.hpp
==============================================================================
--- trunk/boost/functional/hash/hash_fwd.hpp Mon Sep 30 07:22:07 2013 (r86050)
+++ trunk/boost/functional/hash/hash_fwd.hpp 2013-09-30 07:22:29 EDT (Mon, 30 Sep 2013) (r86051)
@@ -22,11 +22,7 @@
 {
     template <class T> struct hash;
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- template <class T> void hash_combine(std::size_t& seed, T& v);
-#else
     template <class T> void hash_combine(std::size_t& seed, T const& v);
-#endif
 
     template <class It> std::size_t hash_range(It, It);
     template <class It> void hash_range(std::size_t&, It, It);


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