Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:56

0001 
0002 #ifndef BOOST_MPL_PRINT_HPP_INCLUDED
0003 #define BOOST_MPL_PRINT_HPP_INCLUDED
0004 
0005 // Copyright David Abrahams 2003
0006 // Copyright Aleksey Gurtovoy 2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/aux_/config/msvc.hpp>
0019 #include <boost/mpl/identity.hpp>
0020 
0021 namespace boost { namespace mpl {
0022   
0023 namespace aux {
0024 #if defined(BOOST_MSVC)
0025 # pragma warning(push, 3)
0026 // we only want one warning from MSVC, so turn off the other one
0027 # pragma warning(disable: 4307)
0028 #elif defined(__MWERKS__)
0029 # pragma warn_hidevirtual on
0030    struct print_base { virtual void f() {} };
0031 #endif
0032 
0033 #if defined(__EDG_VERSION__)
0034   template <class T>
0035   struct dependent_unsigned
0036   {
0037       static const unsigned value = 1;
0038   };
0039 #endif
0040 } // namespace aux
0041 
0042 template <class T>
0043 struct print
0044     : mpl::identity<T>
0045 #if defined(__MWERKS__)
0046     , aux::print_base
0047 #endif 
0048 {
0049 #if defined(__clang__)
0050 # pragma clang diagnostic push
0051 # pragma clang diagnostic ignored "-Wc++11-extensions"
0052     const int m_x = 1 / (sizeof(T) - sizeof(T));
0053 # pragma clang diagnostic pop
0054 #elif defined(BOOST_MSVC)
0055     enum { n = sizeof(T) + -1 };
0056 #elif defined(__MWERKS__)
0057     void f(int);
0058 #else 
0059     enum {
0060         n =
0061 # if defined(__EDG_VERSION__)
0062            aux::dependent_unsigned<T>::value > -1
0063 # else 
0064            sizeof(T) > -1
0065 # endif 
0066         };
0067 #endif 
0068 };
0069 
0070 #if defined(BOOST_MSVC)
0071 # pragma warning(pop)
0072 #elif defined(__MWERKS__)
0073 # pragma warn_hidevirtual reset
0074 #endif
0075 
0076 }}
0077 
0078 #endif // BOOST_MPL_PRINT_HPP_INCLUDED