os/ossrv/ossrv_pub/boost_apis/boost/config/compiler/visualc.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
//  (C) Copyright John Maddock 2001 - 2003. 
sl@0
     2
//  (C) Copyright Darin Adler 2001 - 2002. 
sl@0
     3
//  (C) Copyright Peter Dimov 2001. 
sl@0
     4
//  (C) Copyright Aleksey Gurtovoy 2002. 
sl@0
     5
//  (C) Copyright David Abrahams 2002 - 2003. 
sl@0
     6
//  (C) Copyright Beman Dawes 2002 - 2003. 
sl@0
     7
//  Use, modification and distribution are subject to the 
sl@0
     8
//  Boost Software License, Version 1.0. (See accompanying file 
sl@0
     9
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
    10
sl@0
    11
//  See http://www.boost.org for most recent version.
sl@0
    12
sl@0
    13
//  Microsoft Visual C++ compiler setup:
sl@0
    14
sl@0
    15
#define BOOST_MSVC _MSC_VER
sl@0
    16
sl@0
    17
// turn off the warnings before we #include anything
sl@0
    18
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
sl@0
    19
sl@0
    20
#if _MSC_VER < 1300  // 1200 == VC++ 6.0, 1200-1202 == eVC++4
sl@0
    21
#  pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
sl@0
    22
#  define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
sl@0
    23
#  define BOOST_NO_VOID_RETURNS
sl@0
    24
#  define BOOST_NO_EXCEPTION_STD_NAMESPACE
sl@0
    25
   // disable min/max macro defines on vc6:
sl@0
    26
   //
sl@0
    27
#endif
sl@0
    28
sl@0
    29
#if (_MSC_VER <= 1300)  // 1300 == VC++ 7.0
sl@0
    30
sl@0
    31
#  if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS)      // VC7 bug with /Za
sl@0
    32
#    define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
sl@0
    33
#  endif
sl@0
    34
sl@0
    35
#  define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
sl@0
    36
#  define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
sl@0
    37
#  define BOOST_NO_PRIVATE_IN_AGGREGATE
sl@0
    38
#  define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
sl@0
    39
#  define BOOST_NO_INTEGRAL_INT64_T
sl@0
    40
#  define BOOST_NO_DEDUCED_TYPENAME
sl@0
    41
#  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
sl@0
    42
sl@0
    43
//    VC++ 6/7 has member templates but they have numerous problems including
sl@0
    44
//    cases of silent failure, so for safety we define:
sl@0
    45
#  define BOOST_NO_MEMBER_TEMPLATES
sl@0
    46
//    For VC++ experts wishing to attempt workarounds, we define:
sl@0
    47
#  define BOOST_MSVC6_MEMBER_TEMPLATES
sl@0
    48
sl@0
    49
#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
sl@0
    50
#  define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
sl@0
    51
#  define BOOST_NO_CV_VOID_SPECIALIZATIONS
sl@0
    52
#  define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
sl@0
    53
#  define BOOST_NO_USING_TEMPLATE
sl@0
    54
#  define BOOST_NO_SWPRINTF
sl@0
    55
#  define BOOST_NO_TEMPLATE_TEMPLATES
sl@0
    56
#  define BOOST_NO_SFINAE
sl@0
    57
#  define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
sl@0
    58
#  define BOOST_NO_IS_ABSTRACT
sl@0
    59
// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
sl@0
    60
#  if (_MSC_VER > 1200)
sl@0
    61
#     define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
sl@0
    62
#  endif
sl@0
    63
sl@0
    64
#endif
sl@0
    65
sl@0
    66
#if _MSC_VER < 1400 
sl@0
    67
// although a conforming signature for swprint exists in VC7.1
sl@0
    68
// it appears not to actually work:
sl@0
    69
#  define BOOST_NO_SWPRINTF
sl@0
    70
#endif
sl@0
    71
sl@0
    72
#if _MSC_VER <= 1400  // 1400 == VC++ 8.0
sl@0
    73
#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
sl@0
    74
#endif
sl@0
    75
sl@0
    76
#ifndef _NATIVE_WCHAR_T_DEFINED
sl@0
    77
#  define BOOST_NO_INTRINSIC_WCHAR_T
sl@0
    78
#endif
sl@0
    79
sl@0
    80
#ifdef _WIN32_WCE
sl@0
    81
#  define BOOST_NO_THREADEX
sl@0
    82
#  define BOOST_NO_GETSYSTEMTIMEASFILETIME
sl@0
    83
#endif
sl@0
    84
sl@0
    85
//   
sl@0
    86
// check for exception handling support:   
sl@0
    87
#ifndef _CPPUNWIND 
sl@0
    88
#  define BOOST_NO_EXCEPTIONS   
sl@0
    89
#endif 
sl@0
    90
sl@0
    91
//
sl@0
    92
// __int64 support:
sl@0
    93
//
sl@0
    94
#if (_MSC_VER >= 1200)
sl@0
    95
#   define BOOST_HAS_MS_INT64
sl@0
    96
#endif
sl@0
    97
#if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
sl@0
    98
#   define BOOST_HAS_LONG_LONG
sl@0
    99
#endif
sl@0
   100
#if (_MSC_VER >= 1400) && !defined(_DEBUG)
sl@0
   101
#   define BOOST_HAS_NRVO
sl@0
   102
#endif
sl@0
   103
//
sl@0
   104
// disable Win32 API's if compiler extentions are
sl@0
   105
// turned off:
sl@0
   106
//
sl@0
   107
#ifndef _MSC_EXTENSIONS
sl@0
   108
#  define BOOST_DISABLE_WIN32
sl@0
   109
#endif
sl@0
   110
sl@0
   111
//
sl@0
   112
// all versions support __declspec:
sl@0
   113
//
sl@0
   114
#define BOOST_HAS_DECLSPEC
sl@0
   115
//
sl@0
   116
// prefix and suffix headers:
sl@0
   117
//
sl@0
   118
#ifndef BOOST_ABI_PREFIX
sl@0
   119
#  define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
sl@0
   120
#endif
sl@0
   121
#ifndef BOOST_ABI_SUFFIX
sl@0
   122
#  define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
sl@0
   123
#endif
sl@0
   124
sl@0
   125
// TODO:
sl@0
   126
// these things are mostly bogus. 1200 means version 12.0 of the compiler. The 
sl@0
   127
// artificial versions assigned to them only refer to the versions of some IDE
sl@0
   128
// these compilers have been shipped with, and even that is not all of it. Some
sl@0
   129
// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
sl@0
   130
// IOW, you can't use these 'versions' in any sensible way. Sorry.
sl@0
   131
# if defined(UNDER_CE)
sl@0
   132
#   if _MSC_VER < 1200
sl@0
   133
      // Note: these are so far off, they are not really supported
sl@0
   134
#   elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
sl@0
   135
#     define BOOST_COMPILER_VERSION evc4.0
sl@0
   136
#   elif _MSC_VER == 1400
sl@0
   137
#     define BOOST_COMPILER_VERSION evc8
sl@0
   138
#   else
sl@0
   139
#      if defined(BOOST_ASSERT_CONFIG)
sl@0
   140
#         error "Unknown EVC++ compiler version - please run the configure tests and report the results"
sl@0
   141
#      else
sl@0
   142
#         pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
sl@0
   143
#      endif
sl@0
   144
#   endif
sl@0
   145
# else
sl@0
   146
#   if _MSC_VER < 1200
sl@0
   147
      // Note: these are so far off, they are not really supported
sl@0
   148
#     define BOOST_COMPILER_VERSION 5.0
sl@0
   149
#   elif _MSC_VER < 1300
sl@0
   150
#       define BOOST_COMPILER_VERSION 6.0
sl@0
   151
#   elif _MSC_VER == 1300
sl@0
   152
#     define BOOST_COMPILER_VERSION 7.0
sl@0
   153
#   elif _MSC_VER == 1310
sl@0
   154
#     define BOOST_COMPILER_VERSION 7.1
sl@0
   155
#   elif _MSC_VER == 1400
sl@0
   156
#     define BOOST_COMPILER_VERSION 8.0
sl@0
   157
#   else
sl@0
   158
#     define BOOST_COMPILER_VERSION _MSC_VER
sl@0
   159
#   endif
sl@0
   160
# endif
sl@0
   161
sl@0
   162
#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
sl@0
   163
sl@0
   164
//
sl@0
   165
// versions check:
sl@0
   166
// we don't support Visual C++ prior to version 6:
sl@0
   167
#if _MSC_VER < 1200
sl@0
   168
#error "Compiler not supported or configured - please reconfigure"
sl@0
   169
#endif
sl@0
   170
//
sl@0
   171
// last known and checked version is 1400 (VC8):
sl@0
   172
#if (_MSC_VER > 1400)
sl@0
   173
#  if defined(BOOST_ASSERT_CONFIG)
sl@0
   174
#     error "Unknown compiler version - please run the configure tests and report the results"
sl@0
   175
#  else
sl@0
   176
#     pragma message("Unknown compiler version - please run the configure tests and report the results")
sl@0
   177
#  endif
sl@0
   178
#endif