2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-01-19 04:22:08 +00:00

Fixing bug on MSVC, unbalanced pragma push/pop. Improved leaf.hpp generation.

This commit is contained in:
Emil Dotchevski
2020-12-08 23:32:01 -08:00
parent b88ecf9040
commit 6cd4ccc605
19 changed files with 313 additions and 533 deletions

View File

@@ -29,9 +29,11 @@ included = []
def append(input_file_name, input_file, output_file, regex_includes, include_folder):
line_count = 1
last_line_was_empty = False
for line in input_file:
result = regex_includes.search(line)
line_count += 1
this_line_is_empty = (line=='\n')
result = regex_includes.search(line)
if result:
next_input_file_name = result.group("include")
if next_input_file_name not in included:
@@ -40,9 +42,15 @@ def append(input_file_name, input_file, output_file, regex_includes, include_fol
with open(os.path.join(include_folder, next_input_file_name), "r") as next_input_file:
output_file.write('// >>> %s#line 1 "%s"\n' % (line, next_input_file_name))
append(next_input_file_name, next_input_file, output_file, regex_includes, include_folder)
output_file.write('// <<< %s#line %d "%s"\n' % (line, line_count, input_file_name))
if not ('include/boost/leaf/detail/all.hpp' in input_file_name):
output_file.write('// <<< %s#line %d "%s"\n' % (line, line_count, input_file_name))
else:
if '///' in line:
continue
if this_line_is_empty and last_line_was_empty:
continue
output_file.write(line)
last_line_was_empty = this_line_is_empty
def _main():
parser = argparse.ArgumentParser(
@@ -60,7 +68,33 @@ def _main():
regex_includes = re.compile(r"""^\s*#[\t\s]*include[\t\s]*("|\<)(?P<include>%s.*)("|\>)""" % args.prefix)
print("Rebuilding %s:" % args.input)
with open(args.output, 'w') as output_file, open(args.input, 'r') as input_file:
output_file.write(
'#ifndef BOOST_LEAF_HPP_INCLUDED\n'
'#define BOOST_LEAF_HPP_INCLUDED\n'
'\n'
'// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.\n'
'\n'
'// Distributed under the Boost Software License, Version 1.0. (See accompanying\n'
'// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n'
'\n'
'#ifndef BOOST_LEAF_ENABLE_WARNINGS\n'
'# if defined(_MSC_VER)\n'
'# pragma warning(push,1)\n'
'# elif defined(__clang__)\n'
'# pragma clang system_header\n'
'# elif (__GNUC__*100+__GNUC_MINOR__>301)\n'
'# pragma GCC system_header\n'
'# endif\n'
'#endif\n'
'\n' )
append(args.input, input_file, output_file, regex_includes, args.path)
output_file.write(
'\n'
'#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS)\n'
'#pragma warning(pop)\n'
'#endif\n'
'\n'
'#endif\n' )
if __name__ == "__main__":
_main()

View File

@@ -6,86 +6,37 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(_MSC_VER)
# pragma warning(push,1)
# elif defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# endif
#endif
// >>> #include <boost/leaf/capture.hpp>
#line 1 "boost/leaf/capture.hpp"
#ifndef BOOST_LEAF_CAPTURE_HPP_INCLUDED
#define BOOST_LEAF_CAPTURE_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/exception.hpp>
#line 1 "boost/leaf/exception.hpp"
#ifndef BOOST_LEAF_EXCEPTION_HPP_INCLUDED
#define BOOST_LEAF_EXCEPTION_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/error.hpp>
#line 1 "boost/leaf/error.hpp"
#ifndef BOOST_LEAF_ERROR_HPP_INCLUDED
#define BOOST_LEAF_ERROR_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/detail/function_traits.hpp>
#line 1 "boost/leaf/detail/function_traits.hpp"
#ifndef BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/detail/mp11.hpp>
#line 1 "boost/leaf/detail/mp11.hpp"
#ifndef BOOST_LEAF_DETAIL_MP11_HPP_INCLUDED
@@ -481,69 +432,22 @@ namespace boost { namespace leaf {
#ifndef BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/detail/optional.hpp>
#line 1 "boost/leaf/detail/optional.hpp"
#ifndef BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/detail/config.hpp>
#line 1 "boost/leaf/detail/config.hpp"
#ifndef BOOST_LEAF_CONFIG_HPP_INCLUDED
#define BOOST_LEAF_CONFIG_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// The following is based on Boost Config.
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Martin Wille 2003.
// (C) Copyright Guillaume Melquiond 2003.
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
////////////////////////////////////////
// Configure BOOST_LEAF_NO_EXCEPTIONS, unless already #defined
#ifndef BOOST_LEAF_NO_EXCEPTIONS
@@ -644,8 +548,6 @@ namespace boost { namespace leaf {
# define BOOST_LEAF_NORETURN
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_DIAGNOSTICS
# define BOOST_LEAF_DIAGNOSTICS 1
#endif
@@ -654,16 +556,12 @@ namespace boost { namespace leaf {
# error BOOST_LEAF_DIAGNOSTICS must be 0 or 1.
#endif
////////////////////////////////////////
#ifdef _MSC_VER
# define BOOST_LEAF_ALWAYS_INLINE __forceinline
#else
# define BOOST_LEAF_ALWAYS_INLINE __attribute__((always_inline)) inline
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_NODISCARD
# if __cplusplus >= 201703L
# define BOOST_LEAF_NODISCARD [[nodiscard]]
@@ -672,8 +570,6 @@ namespace boost { namespace leaf {
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_CONSTEXPR
# if __cplusplus > 201402L
# define BOOST_LEAF_CONSTEXPR constexpr
@@ -682,8 +578,6 @@ namespace boost { namespace leaf {
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_ASSERT
# ifdef BOOST_ASSERT
# define BOOST_LEAF_ASSERT BOOST_ASSERT
@@ -693,8 +587,6 @@ namespace boost { namespace leaf {
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_NO_EXCEPTIONS
# include <exception>
# if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
@@ -923,8 +815,6 @@ namespace boost { namespace leaf {
{
};
////////////////////////////////////////
template <class T, class E = void>
struct has_printable_member_value: std::false_type
{
@@ -935,8 +825,6 @@ namespace boost { namespace leaf {
{
};
////////////////////////////////////////
template <class Wrapper, bool WrapperPrintable=is_printable<Wrapper>::value, bool ValuePrintable=has_printable_member_value<Wrapper>::value>
struct diagnostic;
@@ -1040,8 +928,6 @@ namespace boost { namespace leaf {
} }
////////////////////////////////////////
#ifdef BOOST_LEAF_NO_EXCEPTIONS
namespace boost
@@ -1073,8 +959,6 @@ namespace boost { namespace leaf {
#endif
////////////////////////////////////////
#ifdef BOOST_LEAF_NO_THREADS
# define BOOST_LEAF_THREAD_LOCAL
@@ -1099,8 +983,6 @@ namespace boost { namespace leaf {
#endif
////////////////////////////////////////
namespace boost { namespace leaf {
#if BOOST_LEAF_DIAGNOSTICS
@@ -1192,8 +1074,6 @@ namespace boost { namespace leaf {
} }
////////////////////////////////////////
namespace boost { namespace leaf {
struct e_source_location
@@ -1209,8 +1089,6 @@ namespace boost { namespace leaf {
}
};
////////////////////////////////////////
namespace leaf_detail
{
template <class E>
@@ -1381,8 +1259,6 @@ namespace boost { namespace leaf {
}
}
////////////////////////////////////////
namespace leaf_detail
{
template <class=void>
@@ -1419,8 +1295,6 @@ namespace boost { namespace leaf {
}
}
////////////////////////////////////////
namespace leaf_detail
{
template <class T, int Arity = function_traits<T>::arity>
@@ -1457,8 +1331,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////
namespace leaf_detail
{
class leaf_category final: public std::error_category
@@ -1509,8 +1381,6 @@ namespace boost { namespace leaf {
return res;
}
////////////////////////////////////////
class error_id;
namespace leaf_detail
@@ -1642,8 +1512,6 @@ namespace boost { namespace leaf {
return leaf_detail::make_error_id(leaf_detail::current_id());
}
////////////////////////////////////////////
class polymorphic_context
{
protected:
@@ -1664,8 +1532,6 @@ namespace boost { namespace leaf {
using context_ptr = std::shared_ptr<polymorphic_context>;
////////////////////////////////////////////
template <class Ctx>
class context_activator
{
@@ -1721,8 +1587,6 @@ namespace boost { namespace leaf {
return context_activator<Ctx>(ctx);
}
////////////////////////////////////////////
template <class R>
struct is_result_type: std::false_type
{
@@ -1745,8 +1609,6 @@ namespace boost { namespace leaf {
#define BOOST_LEAF_EXCEPTION ::boost::leaf::leaf_detail::inject_loc{__FILE__,__LINE__,__FUNCTION__}+::boost::leaf::exception
#define BOOST_LEAF_THROW_EXCEPTION ::boost::leaf::leaf_detail::throw_with_loc{__FILE__,__LINE__,__FUNCTION__}+::boost::leaf::exception
////////////////////////////////////////
namespace boost { namespace leaf {
namespace leaf_detail
@@ -1768,8 +1630,6 @@ namespace boost { namespace leaf {
} }
////////////////////////////////////////
namespace boost { namespace leaf {
namespace leaf_detail
@@ -1871,21 +1731,6 @@ namespace boost { namespace leaf {
#ifndef BOOST_LEAF_ON_ERROR_HPP_INCLUDED
#define BOOST_LEAF_ON_ERROR_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
namespace boost { namespace leaf {
@@ -1945,8 +1790,6 @@ namespace boost { namespace leaf {
}
};
////////////////////////////////////////////
namespace leaf_detail
{
template <int I, class Tuple>
@@ -2351,8 +2194,6 @@ namespace boost { namespace leaf {
return future_get_impl(is_result_tag<decltype(std::declval<Future>().get())>(), fut);
}
////////////////////////////////////////
#ifndef BOOST_LEAF_NO_EXCEPTIONS
template <class T>
@@ -2414,28 +2255,11 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/capture.hpp>
#line 10 "../../include/boost/leaf/detail/all.hpp"
// >>> #include <boost/leaf/common.hpp>
#line 1 "boost/leaf/common.hpp"
#ifndef BOOST_LEAF_COMMON_HPP_INCLUDED
#define BOOST_LEAF_COMMON_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#include <string>
#include <cerrno>
#ifdef _WIN32
@@ -2515,28 +2339,11 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/common.hpp>
#line 11 "../../include/boost/leaf/detail/all.hpp"
// >>> #include <boost/leaf/context.hpp>
#line 1 "boost/leaf/context.hpp"
#ifndef BOOST_LEAF_CONTEXT_HPP_INCLUDED
#define BOOST_LEAF_CONTEXT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
namespace boost { namespace leaf {
@@ -2667,8 +2474,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////
namespace leaf_detail
{
template <int I, class Tuple>
@@ -2724,8 +2529,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////////
#if BOOST_LEAF_DIAGNOSTICS
namespace leaf_detail
@@ -2755,8 +2558,6 @@ namespace boost { namespace leaf {
#endif
////////////////////////////////////////////
namespace leaf_detail
{
template <class T> struct does_not_participate_in_context_deduction: std::false_type { };
@@ -2790,8 +2591,6 @@ namespace boost { namespace leaf {
using deduce_e_tuple = typename deduce_e_tuple_impl<typename deduce_e_type_list<leaf_detail_mp11::mp_list<E...>>::type>::type;
}
////////////////////////////////////////////
template <class... E>
class context
{
@@ -2896,8 +2695,6 @@ namespace boost { namespace leaf {
BOOST_LEAF_CONSTEXPR R handle_error( error_id, H && ... );
};
////////////////////////////////////////
namespace leaf_detail
{
template <class TypeList>
@@ -2948,8 +2745,6 @@ namespace boost { namespace leaf {
template <class... H>
using context_type_from_handlers = typename leaf_detail::context_type_from_handlers_impl<H...>::type;
////////////////////////////////////////////
template <class... H>
BOOST_LEAF_CONSTEXPR inline context_type_from_handlers<H...> make_context() noexcept
{
@@ -2962,8 +2757,6 @@ namespace boost { namespace leaf {
return { };
}
////////////////////////////////////////////
template <class... H>
inline context_ptr make_shared_context() noexcept
{
@@ -2979,38 +2772,16 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/context.hpp>
#line 12 "../../include/boost/leaf/detail/all.hpp"
// >>> #include <boost/leaf/handle_errors.hpp>
#line 1 "boost/leaf/handle_errors.hpp"
#ifndef BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED
#define BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
// >>> #include <boost/leaf/detail/demangle.hpp>
#line 1 "boost/leaf/detail/demangle.hpp"
#ifndef BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// core::demangle
//
// Copyright 2014 Peter Dimov
@@ -3020,16 +2791,6 @@ namespace boost { namespace leaf {
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#if !defined(_MSC_VER)
# if defined(__has_include) && __has_include(<cxxabi.h>)
# define BOOST_LEAF_HAS_CXXABI_H
@@ -3221,8 +2982,6 @@ namespace boost { namespace leaf {
}
};
////////////////////////////////////////
#if BOOST_LEAF_DIAGNOSTICS
class diagnostic_info: public error_info
@@ -3330,8 +3089,6 @@ namespace boost { namespace leaf {
#endif
////////////////////////////////////////
#if BOOST_LEAF_DIAGNOSTICS
class verbose_diagnostic_info: public error_info
@@ -3426,7 +3183,6 @@ namespace boost { namespace leaf {
}
};
template <>
struct handler_argument_traits<verbose_diagnostic_info const &>: handler_argument_always_available<void>
{
@@ -3440,8 +3196,6 @@ namespace boost { namespace leaf {
#endif
////////////////////////////////////////
namespace leaf_detail
{
template <class T, class... List>
@@ -3572,8 +3326,6 @@ namespace boost { namespace leaf {
}
}
////////////////////////////////////////
namespace leaf_detail
{
template <class A>
@@ -3627,8 +3379,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////
namespace leaf_detail
{
template <class>
@@ -3648,8 +3398,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////
namespace leaf_detail
{
template <class Tup, class... A>
@@ -3753,8 +3501,6 @@ namespace boost { namespace leaf {
}
}
////////////////////////////////////////
template <class... E>
template <class R, class... H>
BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE
@@ -3777,8 +3523,6 @@ namespace boost { namespace leaf {
return leaf_detail::handle_error_<R>(tup(), error_info(id), std::forward<H>(h)...);
}
////////////////////////////////////////
#ifdef BOOST_LEAF_NO_EXCEPTIONS
template <class TryBlock, class... H>
@@ -4019,28 +3763,11 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/handle_errors.hpp>
#line 15 "../../include/boost/leaf/detail/all.hpp"
// >>> #include <boost/leaf/pred.hpp>
#line 1 "boost/leaf/pred.hpp"
#ifndef BOOST_LEAF_PRED_HPP_INCLUDED
#define BOOST_LEAF_PRED_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#if __cplusplus >= 201703L
# define BOOST_LEAF_MATCH_ARGS(et,v1,v) auto v1, auto... v
@@ -4082,8 +3809,6 @@ namespace boost { namespace leaf {
}
}
////////////////////////////////////////
template <class E, class Enum = E>
struct condition
{
@@ -4105,8 +3830,6 @@ namespace boost { namespace leaf {
}
#endif
////////////////////////////////////////
namespace leaf_detail
{
template <class T>
@@ -4158,8 +3881,6 @@ namespace boost { namespace leaf {
{
};
////////////////////////////////////////
namespace leaf_detail
{
template <class E>
@@ -4210,8 +3931,6 @@ namespace boost { namespace leaf {
{
};
////////////////////////////////////////
#if __cplusplus >= 201703L
template <auto, auto, auto...>
struct match_member;
@@ -4234,8 +3953,6 @@ namespace boost { namespace leaf {
};
#endif
////////////////////////////////////////
template <class P>
struct if_not
{
@@ -4254,9 +3971,6 @@ namespace boost { namespace leaf {
{
};
////////////////////////////////////////
#ifndef BOOST_LEAF_NO_EXCEPTIONS
namespace leaf_detail
@@ -4318,28 +4032,11 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/pred.hpp>
#line 17 "../../include/boost/leaf/detail/all.hpp"
// >>> #include <boost/leaf/result.hpp>
#line 1 "boost/leaf/result.hpp"
#ifndef BOOST_LEAF_RESULT_HPP_INCLUDED
#define BOOST_LEAF_RESULT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#include <climits>
namespace boost { namespace leaf {
@@ -4362,8 +4059,6 @@ namespace boost { namespace leaf {
}
};
////////////////////////////////////////
namespace leaf_detail
{
template <class T>
@@ -4435,8 +4130,6 @@ namespace boost { namespace leaf {
};
}
////////////////////////////////////////
template <class T>
class result
{
@@ -4717,8 +4410,6 @@ namespace boost { namespace leaf {
}
};
////////////////////////////////////////
namespace leaf_detail
{
struct void_ { };
@@ -4790,8 +4481,6 @@ namespace boost { namespace leaf {
using base::load;
};
////////////////////////////////////////
template <class R>
struct is_result_type;
@@ -4803,7 +4492,9 @@ namespace boost { namespace leaf {
} }
#endif
// <<< #include <boost/leaf/result.hpp>
#line 18 "../../include/boost/leaf/detail/all.hpp"
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS)
#pragma warning(pop)
#endif
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_CAPTURE_HPP_INCLUDED
#define BOOST_LEAF_CAPTURE_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/exception.hpp>
#include <boost/leaf/on_error.hpp>
@@ -297,4 +297,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_COMMON_HPP_INCLUDED
#define BOOST_LEAF_COMMON_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/detail/print.hpp>
#include <string>
@@ -95,4 +95,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_CONTEXT_HPP_INCLUDED
#define BOOST_LEAF_CONTEXT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/error.hpp>
@@ -458,4 +458,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,10 +1,7 @@
#ifndef BOOST_LEAF_HPP_INCLUDED
#define BOOST_LEAF_HPP_INCLUDED
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/leaf/capture.hpp>
#include <boost/leaf/common.hpp>
@@ -15,5 +12,3 @@
#include <boost/leaf/on_error.hpp>
#include <boost/leaf/pred.hpp>
#include <boost/leaf/result.hpp>
#endif

View File

@@ -1,10 +1,10 @@
#ifndef BOOST_LEAF_CONFIG_HPP_INCLUDED
#define BOOST_LEAF_CONFIG_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// The following is based on Boost Config.
@@ -12,15 +12,15 @@
// (C) Copyright Martin Wille 2003.
// (C) Copyright Guillaume Melquiond 2003.
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
////////////////////////////////////////
@@ -184,4 +184,8 @@
# endif
#endif
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,10 +1,10 @@
#ifndef BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// core::demangle
//
@@ -15,15 +15,15 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#if !defined(_MSC_VER)
# if defined(__has_include) && __has_include(<cxxabi.h>)
@@ -125,4 +125,8 @@ namespace boost { namespace leaf {
# undef BOOST_LEAF_HAS_CXXABI_H
#endif
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/detail/mp11.hpp>
#include <tuple>
@@ -97,4 +97,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/detail/config.hpp>
#include <utility>
@@ -177,4 +177,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED
#define BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/detail/optional.hpp>
#include <iosfwd>
@@ -131,4 +131,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_ERROR_HPP_INCLUDED
#define BOOST_LEAF_ERROR_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/detail/function_traits.hpp>
#include <boost/leaf/detail/print.hpp>
@@ -768,4 +768,8 @@ namespace boost { namespace leaf {
#undef BOOST_LEAF_THREAD_LOCAL
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_EXCEPTION_HPP_INCLUDED
#define BOOST_LEAF_EXCEPTION_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/error.hpp>
#include <exception>
@@ -140,4 +140,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED
#define BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/context.hpp>
#include <boost/leaf/detail/demangle.hpp>
@@ -904,4 +904,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_ON_ERROR_HPP_INCLUDED
#define BOOST_LEAF_ON_ERROR_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/error.hpp>
@@ -262,4 +262,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_PRED_HPP_INCLUDED
#define BOOST_LEAF_PRED_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/handle_errors.hpp>
@@ -293,4 +293,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -1,20 +1,20 @@
#ifndef BOOST_LEAF_RESULT_HPP_INCLUDED
#define BOOST_LEAF_RESULT_HPP_INCLUDED
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
/// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// Distributed under the Boost Software License, Version 1.0. (See accompanying
/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEAF_ENABLE_WARNINGS
# if defined(__clang__)
# pragma clang system_header
# elif (__GNUC__*100+__GNUC_MINOR__>301)
# pragma GCC system_header
# elif defined(_MSC_VER)
# pragma warning(push,1)
# endif
#endif
#ifndef BOOST_LEAF_ENABLE_WARNINGS ///
# if defined(_MSC_VER) ///
# pragma warning(push,1) ///
# elif defined(__clang__) ///
# pragma clang system_header ///
# elif (__GNUC__*100+__GNUC_MINOR__>301) ///
# pragma GCC system_header ///
# endif ///
#endif ///
#include <boost/leaf/error.hpp>
#include <climits>
@@ -479,4 +479,8 @@ namespace boost { namespace leaf {
} }
#if defined(_MSC_VER) && !defined(BOOST_LEAF_ENABLE_WARNINGS) ///
#pragma warning(pop) ///
#endif ///
#endif

View File

@@ -268,16 +268,20 @@ endif
if option_enable_benchmarks
if get_option('optimization')=='0'
error('The option leaf_enable_benchmarks requires optimizations to be enabled. Aborting.')
endif
if option_exceptions
error('The option leaf_enable_benchmarks requires the built-in option cpp_eh set to none. Aborting.')
else
dep_tl_expected = subproject('tl_expected').get_variable('headers')
executable('deep_stack_tl', 'benchmark/deep_stack_other.cpp', override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=0', dependencies: [dep_tl_expected] )
executable('deep_stack_leaf', 'benchmark/deep_stack_leaf.cpp', dependencies: [leaf], override_options: ['cpp_std=c++17'], cpp_args: '-DBOOST_LEAF_DIAGNOSTICS=0')
if option_boost
executable('deep_stack_result', 'benchmark/deep_stack_other.cpp', dependencies: [dep_boost], override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=1' )
executable('deep_stack_outcome', 'benchmark/deep_stack_other.cpp', dependencies: [dep_boost], override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=2' )
endif
endif
dep_tl_expected = subproject('tl_expected').get_variable('headers')
executable('deep_stack_tl', 'benchmark/deep_stack_other.cpp', override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=0', dependencies: [dep_tl_expected] )
executable('deep_stack_leaf', 'benchmark/deep_stack_leaf.cpp', dependencies: [leaf], override_options: ['cpp_std=c++17'], cpp_args: '-DBOOST_LEAF_DIAGNOSTICS=0')
if option_boost
executable('deep_stack_result', 'benchmark/deep_stack_other.cpp', dependencies: [dep_boost], override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=1' )
executable('deep_stack_outcome', 'benchmark/deep_stack_other.cpp', dependencies: [dep_boost], override_options: ['cpp_std=c++17'], cpp_args: '-DBENCHMARK_WHAT=2' )
endif
endif