Ticket #2935: BOOST_MSVC_FULL.patch

File BOOST_MSVC_FULL.patch, 13.3 KB (added by Onverra <onverra@…>, 14 years ago)

Proposal for a fix

  • boost/config/compiler/visualc.hpp

     
    1414
    1515#define BOOST_MSVC _MSC_VER
    1616
     17#if _MSC_FULL_VER / 10000 == _MSC_VER
     18#   define BOOST_MSVC_FULL (_MSC_FULL_VER * 10)
     19#elif _MSC_FULL_VER / 100000 == _MSC_VER
     20#   define BOOST_MSVC_FULL _MSC_FULL_VER
     21#else
     22#  error "Cannot determine build number from _MSC_FULL_VER"
     23#endif
     24
     25
    1726// turn off the warnings before we #include anything
    1827#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
    1928
  • boost/detail/indirect_traits.hpp

     
    4545{
    4646};
    4747
    48 #   if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
     48#   if defined(BOOST_MSVC) && BOOST_MSVC_FULL <= 13102140 // vc7.01 alpha workaround
    4949template<class T>
    5050struct is_reference_to_const<T const volatile&> : mpl::true_
    5151{
     
    138138{
    139139};
    140140
    141 #   if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
     141#   if defined(BOOST_MSVC) && BOOST_MSVC_FULL <= 13102140 // vc7.01 alpha workaround
    142142template <class T>
    143143struct is_reference_to_volatile<T const volatile&> : mpl::true_
    144144{
  • boost/iterator/iterator_adaptor.hpp

     
    128128      typedef boost::detail::enable_type type;
    129129  };
    130130 
    131 #  elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
     131#  elif BOOST_WORKAROUND(BOOST_MSVC_FULL, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
    132132 
    133133  // For some reason vc7.1 needs us to "cut off" instantiation
    134134  // of is_convertible in a few cases.
  • boost/mpl/aux_/na_assert.hpp

     
    1818#include <boost/mpl/aux_/config/msvc.hpp>
    1919#include <boost/mpl/aux_/config/workaround.hpp>
    2020
    21 #if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601)    \
     21#if !BOOST_WORKAROUND(BOOST_MSVC_FULL, <= 140050601)    \
    2222    && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
    2323#   include <boost/mpl/assert.hpp>
    2424#   define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \
  • boost/python/converter/arg_from_python.hpp

     
    115115    arg_rvalue_from_python(PyObject*);
    116116    bool convertible() const;
    117117
    118 # if BOOST_MSVC < 1301 || _MSC_FULL_VER > 13102196
     118# if BOOST_MSVC < 1301 || BOOST_MSVC_FULL > 13102196
    119119    typename arg_rvalue_from_python<T>::
    120120# endif
    121121    result_type operator()();
  • boost/python/converter/arg_to_python_base.hpp

     
    1313namespace detail
    1414{
    1515  struct BOOST_PYTHON_DECL arg_to_python_base
    16 # if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || _MSC_FULL_VER > 13102179
     16# if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || BOOST_MSVC_FULL > 13102179
    1717      : handle<>
    1818# endif
    1919  {
    2020      arg_to_python_base(void const volatile* source, registration const&);
    21 # if defined(BOOST_MSVC) && BOOST_MSVC > 1300 && _MSC_FULL_VER <= 13102179
     21# if defined(BOOST_MSVC) && BOOST_MSVC > 1300 && BOOST_MSVC_FULL <= 13102179
    2222      PyObject* get() const { return m_ptr.get(); }
    2323      PyObject* release() { return m_ptr.release(); }
    2424   private:
  • boost/python/detail/force_instantiate.hpp

     
    1010// Allows us to force the argument to be instantiated without
    1111// incurring unused variable warnings
    1212
    13 # if !defined(BOOST_MSVC) || BOOST_MSVC < 1300 || _MSC_FULL_VER > 13102196
     13# if !defined(BOOST_MSVC) || BOOST_MSVC < 1300 || BOOST_MSVC_FULL > 13102196
    1414
    1515template <class T>
    1616inline void force_instantiate(T const&) {}
  • boost/python/detail/result.hpp

     
    4343template <class R, class T>
    4444boost::type<R>* result(R (T::*), int = 0) { return 0; }
    4545
    46 #  if (defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140)  \
     46#  if (defined(BOOST_MSVC) && BOOST_MSVC_FULL <= 13102140)  \
    4747   || (defined(__GNUC__) && __GNUC__ < 3)                 \
    4848   || (defined(__MWERKS__) && __MWERKS__ < 0x3000)
    4949// This code actually works on all implementations, but why use it when we don't have to?
  • boost/python/override.hpp

     
    4646          return converter(m_obj.release());
    4747      }
    4848
    49 #  if BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(140050215))
     49#  if BOOST_WORKAROUND(BOOST_MSVC_FULL, BOOST_TESTED_AT(140050215))
    5050      template <class T>
    5151      operator T*()
    5252      {
  • boost/random/lagged_fibonacci.hpp

     
    3333namespace boost {
    3434namespace random {
    3535
    36 #if BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
     36#if BOOST_WORKAROUND(BOOST_MSVC_FULL, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
    3737#  define BOOST_RANDOM_EXTRACT_LF
    3838#endif
    3939
  • boost/random/subtract_with_carry.hpp

     
    3333namespace boost {
    3434namespace random {
    3535
    36 #if BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
     36#if BOOST_WORKAROUND(BOOST_MSVC_FULL, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
    3737#  define BOOST_RANDOM_EXTRACT_SWC_01
    3838#endif
    3939
  • boost/tr1/detail/config.hpp

     
    123123#endif
    124124
    125125#if defined(_MSC_VER) && (_MSC_VER >= 1500) \
    126    && defined(_MSC_FULL_VER) && \
     126   && defined(BOOST_MSVC_FULL) && \
    127127   !defined(__SGI_STL_PORT) && \
    128128   !defined(_STLPORT_VERSION) && \
    129129   !defined(_RWSTD_VER_STR) && \
  • boost/type_traits/has_new_operator.hpp

     
    8585            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl<T>::template check_sig<T>(0)));
    8686            BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl<T>::template check_sig2<T>(0)));
    8787        #else
    88             #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     88            #if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    8989                #pragma warning(push)
    9090                #pragma warning(disable:6334)
    9191            #endif
     
    9393            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig<T>(0)));
    9494            BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2<T>(0)));
    9595
    96             #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     96            #if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    9797                #pragma warning(pop)
    9898            #endif
    9999        #endif
  • boost/type_traits/intrinsics.hpp

     
    8282#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
    8383#endif
    8484
    85 #if defined(BOOST_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215)
     85#if defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL) && (BOOST_MSVC_FULL >=140050215)
    8686#   include <boost/type_traits/is_same.hpp>
    8787
    8888#   define BOOST_IS_UNION(T) __is_union(T)
  • boost/type_traits/is_abstract.hpp

     
    9494#ifdef __GNUC__
    9595   BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2<T>::template check_sig<T>(0)));
    9696#else
    97 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     97#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    9898#pragma warning(push)
    9999#pragma warning(disable:6334)
    100100#endif
    101101   BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig<T>(0)));
    102 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     102#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    103103#pragma warning(pop)
    104104#endif
    105105#endif
  • boost/type_traits/is_base_and_derived.hpp

     
    133133template<typename B, typename D>
    134134struct is_base_and_derived_impl2
    135135{
    136 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     136#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    137137#pragma warning(push)
    138138#pragma warning(disable:6334)
    139139#endif
     
    156156
    157157    BOOST_STATIC_CONSTANT(bool, value =
    158158        sizeof(bd_helper<B,D>::check_sig(Host(), 0)) == sizeof(type_traits::yes_type));
    159 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     159#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    160160#pragma warning(pop)
    161161#endif
    162162};
  • boost/type_traits/is_convertible.hpp

     
    256256#ifdef BOOST_MSVC
    257257#pragma warning(push)
    258258#pragma warning(disable:4244)
    259 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     259#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    260260#pragma warning(disable:6334)
    261261#endif
    262262#endif
  • boost/type_traits/is_function.hpp

     
    6565template <typename T>
    6666struct is_function_impl
    6767{
    68 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     68#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    6969#pragma warning(push)
    7070#pragma warning(disable:6334)
    7171#endif
     
    7474        bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
    7575        == sizeof(::boost::type_traits::yes_type)
    7676        );
    77 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     77#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    7878#pragma warning(pop)
    7979#endif
    8080};
  • boost/type_traits/is_member_function_pointer.hpp

     
    6464{
    6565    template <typename T> struct result_
    6666    {
    67 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     67#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    6868#pragma warning(push)
    6969#pragma warning(disable:6334)
    7070#endif
     
    7575            bool, value = (
    7676                1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
    7777            ));
    78 #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000)
     78#if BOOST_WORKAROUND(BOOST_MSVC_FULL, >= 140050000)
    7979#pragma warning(pop)
    8080#endif
    8181    };
  • libs/python/src/converter/arg_to_python_base.cpp

     
    1515{
    1616  arg_to_python_base::arg_to_python_base(
    1717      void const volatile* source, registration const& converters)
    18 # if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || _MSC_FULL_VER > 13102179
     18# if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || BOOST_MSVC_FULL > 13102179
    1919      : handle<>
    2020# else
    2121      : m_ptr
  • libs/python/src/object/inheritance.cpp

     
    55#include <boost/python/object/inheritance.hpp>
    66#include <boost/python/type_id.hpp>
    77#include <boost/graph/breadth_first_search.hpp>
    8 #if _MSC_FULL_VER >= 13102171 && _MSC_FULL_VER <= 13102179
     8#if BOOST_MSVC_FULL >= 13102171 && BOOST_MSVC_FULL <= 13102179
    99# include <boost/graph/reverse_graph.hpp>
    1010#endif
    1111#include <boost/graph/adjacency_list.hpp>