Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:47:48

0001 /*==============================================================================
0002     Copyright (c) 2001-2010 Joel de Guzman
0003     Copyright (c) 2010      Eric Niebler
0004     Copyright (c) 2014-2015 John Fletcher
0005     Copyright (c) 2016      Kohei Takahashi
0006 
0007     Distributed under the Boost Software License, Version 1.0. (See accompanying
0008     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 ==============================================================================*/
0010 #ifndef BOOST_PHOENIX_CONFIG_HPP
0011 #define BOOST_PHOENIX_CONFIG_HPP
0012 
0013 #include <boost/config.hpp>
0014 #include <boost/detail/workaround.hpp>
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 // This section is to sort out whether hash types or unordered types
0018 // are available. This depends on whether stdlib or libc++ is being used
0019 // and also whether C++11 or C++03 is being used.
0020 //////////////////////////////////////////////////////////////////////////
0021 // The idea is to set up the configuration without including the actual
0022 // headers unless that is unavoidable.
0023 //
0024 // The client code should contain the following to include headers
0025 //
0026 // #ifdef BOOST_PHOENIX_HAS_HASH
0027 // #include BOOST_PHOENIX_HASH_SET_HEADER
0028 // #include BOOST_PHOENIX_HASH_MAP_HEADER
0029 // #endif
0030 //
0031 // #ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
0032 // #include BOOST_PHOENIX_UNORDERED_SET_HEADER
0033 // #include BOOST_PHOENIX_UNORDERED_MAP_HEADER
0034 // #endif
0035 //
0036 // The client code can then chose the implementation provided.
0037 // See the example in test/stl/querying_find2.cpp
0038 
0039 // There is no specific thing in Boost Config for libc++
0040 #ifdef _LIBCPP_VERSION
0041 #define BOOST_PHOENIX_USING_LIBCPP
0042 #endif
0043 
0044 // This may not be true for some very old version of libc++
0045 // Current libc++ supports unordered_set and unordered_map without C++11.
0046 #if defined(BOOST_PHOENIX_USING_LIBCPP) \
0047  && !(defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined(BOOST_NO_CXX11_HDR_UNORDERED_SET))
0048 // This is either libc++ or C++11 or later
0049 #define BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
0050 #define BOOST_PHOENIX_UNORDERED_SET_HEADER <unordered_set>
0051 #define BOOST_PHOENIX_UNORDERED_MAP_HEADER <unordered_map>
0052 #define BOOST_PHOENIX_UNORDERED_NAMESPACE std
0053 #endif
0054 
0055 #if defined(BOOST_HAS_HASH)
0056 // This is to sort out case of Clang when using stdlib from gcc
0057 // as Clang thinks it is gcc 4.2.1
0058 // This prevents the failure to include a header with a warning.
0059 #define _GLIBCXX_PERMIT_BACKWARD_HASH
0060 #define BOOST_PHOENIX_HASH_SET_HEADER BOOST_HASH_SET_HEADER
0061 #define BOOST_PHOENIX_HASH_MAP_HEADER BOOST_HASH_MAP_HEADER
0062 #define BOOST_PHOENIX_HAS_HASH
0063 #define BOOST_PHOENIX_HASH_NAMESPACE BOOST_STD_EXTENSION_NAMESPACE
0064 #define BOOST_PHOENIX_HASH_template_rest_param class Hash, class Cmp, class Alloc
0065 #define BOOST_PHOENIX_HASH_type_rest_param           Hash,       Cmp,       Alloc
0066 #elif defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB < 610)
0067 #define BOOST_PHOENIX_HASH_SET_HEADER <hash_set>
0068 #define BOOST_PHOENIX_HASH_MAP_HEADER <hash_map>
0069 #define BOOST_PHOENIX_HAS_HASH
0070 #define BOOST_PHOENIX_HASH_NAMESPACE stdext
0071 #define BOOST_PHOENIX_HASH_template_rest_param class Tr, class Alloc
0072 #define BOOST_PHOENIX_HASH_type_rest_param           Tr,       Alloc
0073 #endif
0074 
0075 #if BOOST_WORKAROUND(BOOST_GCC, < 40100)
0076 #define BOOST_PHOENIX_SFINAE_AND_OVERLOADS , void* = 0
0077 #else
0078 #define BOOST_PHOENIX_SFINAE_AND_OVERLOADS
0079 #endif
0080 
0081 #endif