os/ossrv/ossrv_pub/boost_apis/boost/mpl/print.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
#ifndef BOOST_MPL_PRINT_HPP_INCLUDED
sl@0
     3
#define BOOST_MPL_PRINT_HPP_INCLUDED
sl@0
     4
sl@0
     5
// Copyright David Abrahams 2003
sl@0
     6
// Copyright Aleksey Gurtovoy 2004
sl@0
     7
//
sl@0
     8
// Distributed under the Boost Software License, Version 1.0. 
sl@0
     9
// (See accompanying file LICENSE_1_0.txt or copy at 
sl@0
    10
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    11
//
sl@0
    12
// See http://www.boost.org/libs/mpl for documentation.
sl@0
    13
sl@0
    14
// $Source: /cvsroot/boost/boost/boost/mpl/print.hpp,v $
sl@0
    15
// $Date: 2006/11/10 23:15:49 $
sl@0
    16
// $Revision: 1.2.14.1 $
sl@0
    17
sl@0
    18
#include <boost/mpl/aux_/config/msvc.hpp>
sl@0
    19
#include <boost/mpl/identity.hpp>
sl@0
    20
sl@0
    21
namespace boost { namespace mpl {
sl@0
    22
  
sl@0
    23
namespace aux {
sl@0
    24
#if defined(BOOST_MSVC)
sl@0
    25
# pragma warning(push, 3)
sl@0
    26
// we only want one warning from MSVC, so turn off the other one
sl@0
    27
# pragma warning(disable: 4307)
sl@0
    28
#elif defined(__MWERKS__)
sl@0
    29
# pragma warn_hidevirtual on
sl@0
    30
   struct print_base { virtual void f() {} };
sl@0
    31
#endif
sl@0
    32
sl@0
    33
#if defined(__EDG_VERSION__)
sl@0
    34
  template <class T>
sl@0
    35
  struct dependent_unsigned
sl@0
    36
  {
sl@0
    37
      static const unsigned value = 1;
sl@0
    38
  };
sl@0
    39
#endif
sl@0
    40
} // namespace aux 
sl@0
    41
sl@0
    42
sl@0
    43
template <class T>
sl@0
    44
struct print
sl@0
    45
    : mpl::identity<T>
sl@0
    46
#if defined(__MWERKS__)
sl@0
    47
    , aux::print_base
sl@0
    48
#endif 
sl@0
    49
{
sl@0
    50
#if defined(BOOST_MSVC)
sl@0
    51
    enum { n = sizeof(T) + -1 };
sl@0
    52
#elif defined(__MWERKS__)
sl@0
    53
    void f(int);
sl@0
    54
#else 
sl@0
    55
    enum {
sl@0
    56
        n =
sl@0
    57
# if defined(__EDG_VERSION__)
sl@0
    58
           aux::dependent_unsigned<T>::value > -1
sl@0
    59
# else 
sl@0
    60
           sizeof(T) > -1
sl@0
    61
# endif 
sl@0
    62
        };
sl@0
    63
#endif 
sl@0
    64
};
sl@0
    65
sl@0
    66
#if defined(BOOST_MSVC)
sl@0
    67
# pragma warning(pop)
sl@0
    68
#elif defined(__MWERKS__)
sl@0
    69
# pragma warn_hidevirtual reset
sl@0
    70
#endif
sl@0
    71
sl@0
    72
}}
sl@0
    73
sl@0
    74
#endif // BOOST_MPL_PRINT_HPP_INCLUDED