Skip to content

Commit

Permalink
Deploying to gh-pages from @ bfabf9d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Jan 15, 2024
1 parent 2b1a7da commit b895a42
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 91 deletions.
144 changes: 53 additions & 91 deletions leaf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// LEAF single header distribution. Do not edit.

// Generated on 01/09/2024 from https://github.com/boostorg/leaf/tree/031dfa0.
// Generated on 01/15/2024 from https://github.com/boostorg/leaf/tree/bfabf9d.
// Latest version of this file: https://raw.githubusercontent.com/boostorg/leaf/gh-pages/leaf.hpp.

// Copyright 2018-2023 Emil Dotchevski and Reverge Studios, Inc.
Expand Down Expand Up @@ -1866,63 +1866,6 @@ namespace leaf_detail

namespace boost { namespace leaf {

class BOOST_LEAF_SYMBOL_VISIBLE error_id;

namespace leaf_detail
{
struct BOOST_LEAF_SYMBOL_VISIBLE tls_tag_id_factory_current_id;

template <class=void>
struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
{
static atomic_unsigned_int counter;

BOOST_LEAF_CONSTEXPR static unsigned generate_next_id() noexcept
{
auto id = (counter+=4);
BOOST_LEAF_ASSERT((id&3)==1);
return id;
}
};

template <class T>
atomic_unsigned_int id_factory<T>::counter(unsigned(-3));

inline int current_id() noexcept
{
unsigned id = tls::read_uint<tls_tag_id_factory_current_id>();
BOOST_LEAF_ASSERT(id==0 || (id&3)==1);
return int(id);
}

inline int new_id() noexcept
{
unsigned id = id_factory<>::generate_next_id();
tls::write_uint<tls_tag_id_factory_current_id>(id);
return int(id);
}

struct inject_loc
{
char const * const file;
int const line;
char const * const fn;

template <class T>
friend T operator+( inject_loc loc, T && x ) noexcept
{
x.load_source_location_(loc.file, loc.line, loc.fn);
return std::move(x);
}
};
}

} }

////////////////////////////////////////

namespace boost { namespace leaf {

struct BOOST_LEAF_SYMBOL_VISIBLE e_source_location
{
char const * file;
Expand All @@ -1936,11 +1879,9 @@ struct BOOST_LEAF_SYMBOL_VISIBLE e_source_location
}
};

} }

////////////////////////////////////////

namespace boost { namespace leaf {
class BOOST_LEAF_SYMBOL_VISIBLE error_id;

namespace leaf_detail
{
Expand Down Expand Up @@ -2005,14 +1946,10 @@ namespace leaf_detail
};
}

} }

////////////////////////////////////////

#if BOOST_LEAF_CFG_CAPTURE

namespace boost { namespace leaf {

namespace leaf_detail
{
class BOOST_LEAF_SYMBOL_VISIBLE dynamic_allocator:
Expand Down Expand Up @@ -2283,14 +2220,10 @@ namespace leaf_detail
}
}

} }

#endif

////////////////////////////////////////

namespace boost { namespace leaf {

namespace leaf_detail
{
template <class E>
Expand Down Expand Up @@ -2368,12 +2301,8 @@ namespace leaf_detail
}
}

} }

////////////////////////////////////////

namespace boost { namespace leaf {

namespace leaf_detail
{
template <class T, int Arity = function_traits<T>::arity>
Expand Down Expand Up @@ -2410,13 +2339,58 @@ namespace leaf_detail
};
}

} }

////////////////////////////////////////

#if BOOST_LEAF_CFG_STD_SYSTEM_ERROR
namespace leaf_detail
{
struct BOOST_LEAF_SYMBOL_VISIBLE tls_tag_id_factory_current_id;

namespace boost { namespace leaf {
template <class=void>
struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
{
static atomic_unsigned_int counter;

BOOST_LEAF_CONSTEXPR static unsigned generate_next_id() noexcept
{
auto id = (counter+=4);
BOOST_LEAF_ASSERT((id&3)==1);
return id;
}
};

template <class T>
atomic_unsigned_int id_factory<T>::counter(unsigned(-3));

inline int current_id() noexcept
{
unsigned id = tls::read_uint<tls_tag_id_factory_current_id>();
BOOST_LEAF_ASSERT(id==0 || (id&3)==1);
return int(id);
}

inline int new_id() noexcept
{
unsigned id = id_factory<>::generate_next_id();
tls::write_uint<tls_tag_id_factory_current_id>(id);
return int(id);
}

struct inject_loc
{
char const * const file;
int const line;
char const * const fn;

template <class T>
friend T operator+( inject_loc loc, T && x ) noexcept
{
x.load_source_location_(loc.file, loc.line, loc.fn);
return std::move(x);
}
};
}

#if BOOST_LEAF_CFG_STD_SYSTEM_ERROR

namespace leaf_detail
{
Expand Down Expand Up @@ -2468,14 +2442,10 @@ inline bool is_error_id( std::error_code const & ec ) noexcept
return res;
}

} }

#endif

////////////////////////////////////////

namespace boost { namespace leaf {

namespace leaf_detail
{
BOOST_LEAF_CONSTEXPR error_id make_error_id(int) noexcept;
Expand Down Expand Up @@ -2655,12 +2625,8 @@ class context_activator
}
};

} }

////////////////////////////////////////////

namespace boost { namespace leaf {

template <class R>
struct is_result_type: std::false_type
{
Expand Down Expand Up @@ -4491,12 +4457,8 @@ namespace leaf_detail
};
}

} }

////////////////////////////////////////

namespace boost { namespace leaf {

namespace leaf_detail
{
inline void enforce_std_exception( std::exception const & ) noexcept { }
Expand Down Expand Up @@ -5218,7 +5180,7 @@ struct is_predicate<catch_<Ex...>>: std::true_type
// Expanded at line 16: #include <boost/leaf/config.hpp>
// Expanded at line 1490: #include <boost/leaf/detail/print.hpp>
// Expanded at line 1362: #include <boost/leaf/detail/capture_list.hpp>
// Expanded at line 4390: #include <boost/leaf/exception.hpp>
// Expanded at line 4356: #include <boost/leaf/exception.hpp>

#include <climits>
#include <functional>
Expand Down Expand Up @@ -5938,7 +5900,7 @@ struct is_result_type<result<T>>: std::true_type

// Expanded at line 16: #include <boost/leaf/config.hpp>
// Expanded at line 731: #include <boost/leaf/handle_errors.hpp>
// Expanded at line 5210: #include <boost/leaf/result.hpp>
// Expanded at line 5172: #include <boost/leaf/result.hpp>
#include <variant>
#include <optional>
#include <tuple>
Expand Down
Binary file modified leaf.pdf
Binary file not shown.

0 comments on commit b895a42

Please sign in to comment.