]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/type_traits/integral_constant.hpp
update boost to version 1.48
[lyx.git] / boost / boost / type_traits / integral_constant.hpp
index 26f952a497dda15f48b057c776c1203962d010ed..4ed1bb058fc80f3acf83d2d3bbff1b730fb44a6d 100644 (file)
@@ -19,57 +19,28 @@ template <class T, T val>
 #endif
 struct integral_constant : public mpl::integral_c<T, val>
 {
-   //BOOST_STATIC_CONSTANT(T, value = val);
-   //typedef T value_type;
    typedef integral_constant<T,val> type;
-
-#if 0
-   //
-   // everything that follows now, is MPL-compatibility code:
-   //
-   typedef ::boost::mpl::integral_c_tag tag;
-
-   // have to #ifdef here: some compilers don't like the 'val + 1' form (MSVC),
-   // while some other don't like 'value + 1' (Borland), and some don't like
-   // either
-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
-private:
-   BOOST_STATIC_CONSTANT(T, next_value = BOOST_MPL_AUX_STATIC_CAST(T, (val + 1)));
-   BOOST_STATIC_CONSTANT(T, prior_value = BOOST_MPL_AUX_STATIC_CAST(T, (val - 1)));
-public:
-   typedef integral_constant<T,next_value> next;
-   typedef integral_constant<T,prior_value> prior;
-#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
-   || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
-   || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (val + 1)) )> next;
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (val - 1)) )> prior;
-#else
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (value + 1)) )> next;
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (value - 1)) )> prior;
-#endif
-
-   // enables uniform function call syntax for families of overloaded 
-   // functions that return objects of both arithmetic ('int', 'long',
-   // 'double', etc.) and wrapped integral types (for an example, see 
-   // "mpl/example/power.cpp")
-   operator T() const { return static_cast<T>(this->value); } 
-#endif
 };
 
 template<> struct integral_constant<bool,true> : public mpl::true_ 
 {
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+# pragma warning(push)
+# pragma warning(disable:4097)
    typedef mpl::true_ base_;
    using base_::value;
+# pragma warning(pop)
 #endif
    typedef integral_constant<bool,true> type;
 };
 template<> struct integral_constant<bool,false> : public mpl::false_ 
 {
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+# pragma warning(push)
+# pragma warning(disable:4097)
    typedef mpl::false_ base_;
    using base_::value;
+# pragma warning(pop)
 #endif
    typedef integral_constant<bool,false> type;
 };