| 1 | ////////////////////////////////////////////////////////////////////////////// | 
| 2 | // | 
| 3 | // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost | 
| 4 | // Software License, Version 1.0. (See accompanying file | 
| 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | 
| 6 | // | 
| 7 | // See http://www.boost.org/libs/container for documentation. | 
| 8 | // | 
| 9 | ////////////////////////////////////////////////////////////////////////////// | 
| 10 |  | 
| 11 | #ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP | 
| 12 | #define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP | 
| 13 |  | 
| 14 | #ifndef BOOST_CONFIG_HPP | 
| 15 | #  include <boost/config.hpp> | 
| 16 | #endif | 
| 17 |  | 
| 18 | #if defined(BOOST_HAS_PRAGMA_ONCE) | 
| 19 | #  pragma once | 
| 20 | #endif | 
| 21 |  | 
| 22 | #if    !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\ | 
| 23 |     && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) | 
| 24 |    #define BOOST_CONTAINER_PERFECT_FORWARDING | 
| 25 | #endif | 
| 26 |  | 
| 27 | #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ | 
| 28 |     && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700) | 
| 29 |    #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST | 
| 30 | #endif | 
| 31 |  | 
| 32 | #if defined(BOOST_GCC_VERSION) | 
| 33 | #  if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) | 
| 34 | #     define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS | 
| 35 | #  endif | 
| 36 | #elif defined(BOOST_MSVC) | 
| 37 | #  if _MSC_FULL_VER < 180020827 | 
| 38 | #     define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS | 
| 39 | #  endif | 
| 40 | #elif defined(BOOST_CLANG) | 
| 41 | #  if !__has_feature(cxx_delegating_constructors) | 
| 42 | #     define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS | 
| 43 | #  endif | 
| 44 | #endif | 
| 45 |  | 
| 46 | #if !defined(BOOST_FALLTHOUGH) | 
| 47 |    #define BOOST_CONTAINER_FALLTHOUGH | 
| 48 | #else | 
| 49 |    #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH; | 
| 50 | #endif | 
| 51 |  | 
| 52 | #if defined(BOOST_MSVC) && (_MSC_VER < 1400) | 
| 53 |    #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN | 
| 54 | #endif | 
| 55 |  | 
| 56 | #if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600)) | 
| 57 | #define  | 
| 58 | #endif | 
| 59 |  | 
| 60 | //Macros for documentation purposes. For code, expands to the argument | 
| 61 | #define BOOST_CONTAINER_IMPDEF(TYPE) TYPE | 
| 62 | #define BOOST_CONTAINER_SEEDOC(TYPE) TYPE | 
| 63 |  | 
| 64 | //Macros for memset optimization. In most platforms | 
| 65 | //memsetting pointers and floatings is safe and faster. | 
| 66 | // | 
| 67 | //If your platform does not offer these guarantees | 
| 68 | //define these to value zero. | 
| 69 | #ifndef BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO | 
| 70 | #define BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO 1 | 
| 71 | #endif | 
| 72 |  | 
| 73 | #ifndef BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_NULL | 
| 74 | #define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL | 
| 75 | #endif | 
| 76 |  | 
| 77 | #define BOOST_CONTAINER_DOC1ST(TYPE1, TYPE2) TYPE2 | 
| 78 | #define BOOST_CONTAINER_I , | 
| 79 | #define BOOST_CONTAINER_DOCIGN(T) T | 
| 80 | #define BOOST_CONTAINER_DOCONLY(T) | 
| 81 |  | 
| 82 | /* | 
| 83 |    we need to import/export our code only if the user has specifically | 
| 84 |    asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost | 
| 85 |    libraries to be dynamically linked, or BOOST_CONTAINER_DYN_LINK | 
| 86 |    if they want just this one to be dynamically liked: | 
| 87 | */ | 
| 88 | #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK) | 
| 89 |  | 
| 90 |    /* export if this is our own source, otherwise import: */ | 
| 91 |    #ifdef BOOST_CONTAINER_SOURCE | 
| 92 |    #  define BOOST_CONTAINER_DECL BOOST_SYMBOL_EXPORT | 
| 93 |    #else | 
| 94 |    #  define BOOST_CONTAINER_DECL BOOST_SYMBOL_IMPORT | 
| 95 |     | 
| 96 |    #endif  /* BOOST_CONTAINER_SOURCE */ | 
| 97 | #else | 
| 98 |    #define BOOST_CONTAINER_DECL | 
| 99 | #endif  /* DYN_LINK */ | 
| 100 |  | 
| 101 | //#define BOOST_CONTAINER_DISABLE_FORCEINLINE | 
| 102 |  | 
| 103 | #if defined(BOOST_CONTAINER_DISABLE_FORCEINLINE) | 
| 104 |    #define BOOST_CONTAINER_FORCEINLINE inline | 
| 105 | #elif defined(BOOST_CONTAINER_FORCEINLINE_IS_BOOST_FORCELINE) | 
| 106 |    #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE | 
| 107 | #elif defined(BOOST_MSVC) && defined(_DEBUG) | 
| 108 |    //"__forceinline" and MSVC seems to have some bugs in debug mode | 
| 109 |    #define BOOST_CONTAINER_FORCEINLINE inline | 
| 110 | #elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5))) | 
| 111 |    //Older GCCs have problems with forceinline | 
| 112 |    #define BOOST_CONTAINER_FORCEINLINE inline | 
| 113 | #else | 
| 114 |    #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE | 
| 115 | #endif | 
| 116 |  | 
| 117 | #endif   //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP | 
| 118 |  |