Skip to content

Commit

Permalink
Deploying to gh-pages from @ d8aae79 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Nov 6, 2023
1 parent 837ad71 commit ce855d2
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 28 deletions.
17 changes: 17 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ <h1>LEAF<div style="z-index: 3; bottom:-16px; right:4px; position:fixed"><input
<li><a href="#result::has_error"><code>has_error</code></a></li>
<li><a href="#result::operator_bool"><code>operator bool</code></a></li>
<li><a href="#result::value"><code>value</code></a></li>
<li><a href="#result::value_type"><code>value_type</code></a></li>
<li><a href="#result::operator_ptr"><code>operator-></code></a></li>
<li><a href="#result::operator_deref"><code>operator*</code></a></li>
</ul>
Expand Down Expand Up @@ -3285,6 +3286,8 @@ <h4 id="result.hpp"><code>result.hpp</code></h4>
<span class="p">{</span>
<span class="nl">public:</span>

<span class="k">using</span> <span class="n">value_type</span> <span class="o">=</span> <span class="n">T</span><span class="p">;</span>

<span class="n">result</span><span class="p">()</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="n">result</span><span class="p">(</span> <span class="n">T</span> <span class="o">&amp;&amp;</span> <span class="n">v</span> <span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="n">result</span><span class="p">(</span> <span class="n">T</span> <span class="k">const</span> <span class="o">&amp;</span> <span class="n">v</span> <span class="p">);</span>
Expand Down Expand Up @@ -3337,6 +3340,8 @@ <h4 id="result.hpp"><code>result.hpp</code></h4>
<span class="p">{</span>
<span class="nl">public:</span>

<span class="k">using</span> <span class="n">value_type</span> <span class="o">=</span> <span class="kt">void</span><span class="p">;</span>

<span class="n">result</span><span class="p">()</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="n">result</span><span class="p">(</span> <span class="n">error_id</span> <span class="n">err</span> <span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
Expand Down Expand Up @@ -6181,6 +6186,8 @@ <h3 id="result"><code>result</code></h3>
<span class="p">{</span>
<span class="nl">public:</span>

<span class="k">using</span> <span class="n">value_type</span> <span class="o">=</span> <span class="n">T</span><span class="p">;</span>

<span class="n">result</span><span class="p">()</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="n">result</span><span class="p">(</span> <span class="n">T</span> <span class="o">&amp;&amp;</span> <span class="n">v</span> <span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="n">result</span><span class="p">(</span> <span class="n">T</span> <span class="k">const</span> <span class="o">&amp;</span> <span class="n">v</span> <span class="p">);</span>
Expand Down Expand Up @@ -6230,6 +6237,8 @@ <h3 id="result"><code>result</code></h3>
<span class="p">{</span>
<span class="nl">public:</span>

<span class="k">using</span> <span class="n">value_type</span> <span class="o">=</span> <span class="kt">void</span><span class="p">;</span>

<span class="n">result</span><span class="p">()</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="n">result</span><span class="p">(</span> <span class="n">error_id</span> <span class="n">err</span> <span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
Expand Down Expand Up @@ -6669,6 +6678,14 @@ <h4 id="result::value"><code>value</code></h4>
<span class="p">}</span> <span class="p">}</span></code></pre>
</div>
</div>
<hr>
</div>
<div class="sect3">
<h4 id="result::value_type"><code>value_type</code></h4>
<div class="paragraph">
<p>A member type of <code>result&lt;T&gt;</code>, defined as a synonim for <code>T</code>.</p>
</div>
<hr>
<div id="result::bad_result" class="dlist">
<dl>
<dt class="hdlist1">Effects: </dt>
Expand Down
64 changes: 36 additions & 28 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 09/22/2023 from https://github.com/boostorg/leaf/tree/f2ec744.
// Generated on 11/06/2023 from https://github.com/boostorg/leaf/tree/d8aae79.
// 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 @@ -2331,6 +2331,17 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id
return *this;
}

template <class Item>
BOOST_LEAF_CONSTEXPR error_id load(Item && item) const noexcept
{
if (int err_id = value())
{
int const unused[] = { 42, leaf_detail::load_item<Item>::load_(err_id, std::forward<Item>(item)) };
(void)unused;
}
return *this;
}

template <class... Item>
BOOST_LEAF_CONSTEXPR error_id load( Item && ... item ) const noexcept
{
Expand All @@ -2344,13 +2355,8 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id

BOOST_LEAF_CONSTEXPR int value() const noexcept
{
if( int v = value_ )
{
BOOST_LEAF_ASSERT((v&3)==1);
return (v&~3)|1;
}
else
return 0;
BOOST_LEAF_ASSERT(value_==0 || ((value_&3)==1));
return value_;
}

BOOST_LEAF_CONSTEXPR explicit operator bool() const noexcept
Expand Down Expand Up @@ -3842,7 +3848,7 @@ inline context_ptr make_shared_context( H && ... ) noexcept
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

// Expanded at line 16: #include <boost/leaf/config.hpp>
// Expanded at line 3354: #include <boost/leaf/context.hpp>
// Expanded at line 3360: #include <boost/leaf/context.hpp>
// Expanded at line 693: #include <boost/leaf/capture.hpp>

namespace boost { namespace leaf {
Expand Down Expand Up @@ -4792,7 +4798,7 @@ namespace leaf_detail
} }

#endif
// Expanded at line 2789: #include <boost/leaf/on_error.hpp>
// Expanded at line 2795: #include <boost/leaf/on_error.hpp>
// >>> #include <boost/leaf/pred.hpp>
#line 1 "boost/leaf/pred.hpp"
#ifndef BOOST_LEAF_PRED_HPP_INCLUDED
Expand All @@ -4804,7 +4810,7 @@ namespace leaf_detail
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

// Expanded at line 16: #include <boost/leaf/config.hpp>
// Expanded at line 3836: #include <boost/leaf/handle_errors.hpp>
// Expanded at line 3842: #include <boost/leaf/handle_errors.hpp>

#if __cplusplus >= 201703L
# define BOOST_LEAF_MATCH_ARGS(et,v1,v) auto v1, auto... v
Expand Down Expand Up @@ -5171,19 +5177,19 @@ namespace leaf_detail
struct stored
{
using type = T;
using value_type = T;
using value_type_const = T const;
using value_no_ref = T;
using value_no_ref_const = T const;
using value_cref = T const &;
using value_ref = T &;
using value_rv_cref = T const &&;
using value_rv_ref = T &&;

static value_type_const * cptr( type const & v ) noexcept
static value_no_ref_const * cptr( type const & v ) noexcept
{
return &v;
}

static value_type * ptr( type & v ) noexcept
static value_no_ref * ptr( type & v ) noexcept
{
return &v;
}
Expand All @@ -5193,19 +5199,19 @@ namespace leaf_detail
struct stored<T &>
{
using type = std::reference_wrapper<T>;
using value_type_const = T;
using value_type = T;
using value_no_ref = T;
using value_no_ref_const = T;
using value_ref = T &;
using value_cref = T &;
using value_rv_ref = T &;
using value_rv_cref = T &;

static value_type_const * cptr( type const & v ) noexcept
static value_no_ref_const * cptr( type const & v ) noexcept
{
return &v.get();
}

static value_type * ptr( type const & v ) noexcept
static value_no_ref * ptr( type const & v ) noexcept
{
return &v.get();
}
Expand Down Expand Up @@ -5322,8 +5328,8 @@ class BOOST_LEAF_NODISCARD result
};

using stored_type = typename leaf_detail::stored<T>::type;
using value_type = typename leaf_detail::stored<T>::value_type;
using value_type_const = typename leaf_detail::stored<T>::value_type_const;
using value_no_ref = typename leaf_detail::stored<T>::value_no_ref;
using value_no_ref_const = typename leaf_detail::stored<T>::value_no_ref_const;
using value_ref = typename leaf_detail::stored<T>::value_ref;
using value_cref = typename leaf_detail::stored<T>::value_cref;
using value_rv_ref = typename leaf_detail::stored<T>::value_rv_ref;
Expand Down Expand Up @@ -5426,6 +5432,8 @@ class BOOST_LEAF_NODISCARD result

public:

using value_type = T;

result( result && x ) noexcept:
what_(move_from(std::move(x)))
{
Expand All @@ -5443,13 +5451,13 @@ class BOOST_LEAF_NODISCARD result
{
}

result( value_type && v ) noexcept:
stored_(std::forward<value_type>(v)),
result( value_no_ref && v ) noexcept:
stored_(std::forward<value_no_ref>(v)),
what_(result_discriminant::kind_val{})
{
}

result( value_type const & v ):
result( value_no_ref const & v ):
stored_(v),
what_(result_discriminant::kind_val{})
{
Expand Down Expand Up @@ -5597,12 +5605,12 @@ class BOOST_LEAF_NODISCARD result

#endif

value_type_const * operator->() const noexcept
value_no_ref_const * operator->() const noexcept
{
return has_value() ? leaf_detail::stored<T>::cptr(stored_) : nullptr;
}

value_type * operator->() noexcept
value_no_ref * operator->() noexcept
{
return has_value() ? leaf_detail::stored<T>::ptr(stored_) : nullptr;
}
Expand Down Expand Up @@ -5835,8 +5843,8 @@ struct is_result_type<result<T>>: std::true_type
#if __cplusplus >= 201703L

// Expanded at line 16: #include <boost/leaf/config.hpp>
// Expanded at line 3836: #include <boost/leaf/handle_errors.hpp>
// Expanded at line 5097: #include <boost/leaf/result.hpp>
// Expanded at line 3842: #include <boost/leaf/handle_errors.hpp>
// Expanded at line 5103: #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 ce855d2

Please sign in to comment.