Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:26

0001 //
0002 // Copyright (c) 2023 Klemens Morgenstern (klemens.morgenstern@gmx.net)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #include <boost/config.hpp>
0009 
0010 #ifndef BOOST_COBALT_CONFIG_HPP
0011 #define BOOST_COBALT_CONFIG_HPP
0012 
0013 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COBALT_DYN_LINK)
0014 #if defined(BOOST_COBALT_SOURCE)
0015 #define BOOST_COBALT_DECL BOOST_SYMBOL_EXPORT
0016 #else
0017 #define BOOST_COBALT_DECL BOOST_SYMBOL_IMPORT
0018 #endif
0019 #else
0020 #define BOOST_COBALT_DECL
0021 #endif
0022 
0023 #if defined(BOOST_COBALT_USE_IO_CONTEXT)
0024 # include <boost/asio/io_context.hpp>
0025 #elif !defined(BOOST_COBALT_CUSTOM_EXECUTOR)
0026 # include <boost/asio/any_io_executor.hpp>
0027 #endif
0028 
0029 #if defined(_MSC_VER)
0030 // msvc doesn't correctly suspend for self-deletion, hence we must workaround here
0031 #define BOOST_COBALT_NO_SELF_DELETE 1
0032 #endif
0033 
0034 #if !defined(BOOST_COBALT_USE_STD_PMR) && \
0035     !defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR) && \
0036     !defined(BOOST_COBALT_USE_CUSTOM_PMR) && \
0037     !defined(BOOST_COBALT_NO_PMR)
0038 #define BOOST_COBALT_USE_STD_PMR 1
0039 #endif
0040 
0041 #if defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR)
0042 #include <boost/container/pmr/memory_resource.hpp>
0043 #include <boost/container/pmr/unsynchronized_pool_resource.hpp>
0044 #include <boost/container/pmr/polymorphic_allocator.hpp>
0045 #include <boost/container/pmr/monotonic_buffer_resource.hpp>
0046 #include <boost/container/pmr/global_resource.hpp>
0047 #include <boost/container/pmr/vector.hpp>
0048 #endif
0049 
0050 #if defined(BOOST_COBALT_USE_STD_PMR)
0051 #include <memory_resource>
0052 #endif
0053 
0054 #if !defined(BOOST_COBALT_OP_SBO_SIZE)
0055 #define BOOST_COBALT_SBO_BUFFER_SIZE 4096
0056 #endif
0057 
0058 namespace boost::cobalt
0059 {
0060 
0061 #if defined(BOOST_COBALT_USE_IO_CONTEXT)
0062 using executor = boost::asio::io_context::executor_type;
0063 #elif !defined(BOOST_COBALT_CUSTOM_EXECUTOR)
0064 using executor = boost::asio::any_io_executor;
0065 #endif
0066 
0067 #if defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR)
0068 namespace pmr = boost::container::pmr;
0069 #endif
0070 
0071 #if defined(BOOST_COBALT_USE_STD_PMR)
0072 namespace pmr = std::pmr;
0073 #endif
0074 
0075 }
0076 
0077 #endif //BOOST_COBALT_CONFIG_HPP