Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/parser/detail/text/config.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2020 T. Zachary Laine
0002 //
0003 // Distributed under the Boost Software License, Version 1.0. (See
0004 // accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 #ifndef BOOST_PARSER_DETAIL_TEXT_CONFIG_HPP
0007 #define BOOST_PARSER_DETAIL_TEXT_CONFIG_HPP
0008 
0009 #include <boost/parser/config.hpp>
0010 
0011 // Included for definition of __cpp_lib_concepts.
0012 #include <iterator>
0013 
0014 
0015 #if !BOOST_PARSER_USE_CONCEPTS
0016 #    define BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS 0
0017 #else
0018 #    define BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS 1
0019 #endif
0020 
0021 #if BOOST_PARSER_USE_CONCEPTS
0022 namespace boost::parser::detail { namespace text { namespace detail {
0023     inline constexpr auto begin = std::ranges::begin;
0024     inline constexpr auto end = std::ranges::end;
0025 }}}
0026 #else
0027 #include <boost/parser/detail/text/detail/begin_end.hpp>
0028 #endif
0029 
0030 #if BOOST_PARSER_USE_CONCEPTS
0031 #    define BOOST_PARSER_DETAIL_TEXT_SUBRANGE std::ranges::subrange
0032 #else
0033 #    include <boost/parser/subrange.hpp>
0034 #    define BOOST_PARSER_DETAIL_TEXT_SUBRANGE boost::parser::subrange
0035 #endif
0036 
0037 namespace boost::parser::detail { namespace text {
0038 #if defined(__cpp_char8_t)
0039     using char8_type = char8_t;
0040 #else
0041     using char8_type = char;
0042 #endif
0043 }}
0044 
0045 // The inline namespaces v1 and v2 represent pre- and post-C++20.  v1 is
0046 // inline for standards before C++20, and v2 is inline for C++20 and later.
0047 // Note that this only applies to code for which a v2 namespace alternative
0048 // exists.  Some instances of the v1 namespace may still be inline, if there
0049 // is no v2 version of its contents.
0050 #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
0051 #    define BOOST_PARSER_DETAIL_TEXT_NAMESPACE_V1 namespace v1
0052 #    define BOOST_PARSER_DETAIL_TEXT_NAMESPACE_V2 inline namespace v2
0053 #else
0054 #    define BOOST_PARSER_DETAIL_TEXT_NAMESPACE_V1 inline namespace v1
0055 #    define BOOST_PARSER_DETAIL_TEXT_NAMESPACE_V2 namespace v2
0056 #endif
0057 
0058 #endif