From: Eric Gallager <egall@gwmail.gwu.edu>
To: iain <iain@sandoe.co.uk>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Iain Sandoe <iains.gcc@gmail.com>,
Nathan Sidwell <nathan@acm.org>
Subject: Re: [PATCH] c++, coroutines: Avoid expanding within templates [PR103868]
Date: Mon, 18 Apr 2022 15:49:47 -0400 [thread overview]
Message-ID: <CAMfHzOsTBanJq-qWGgmRGxhyytiwDK4gWXqjhzQFKF_cFd_2HA@mail.gmail.com> (raw)
In-Reply-To: <20220418135936.24757-1-iain@sandoe.co.uk>
On Mon, Apr 18, 2022 at 10:01 AM Iain Sandoe via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> From: Nathan Sidwell <nathan@acm.org>
>
> This is a forward-port of a patch by Nathan (against 10.x) which fixes an open
> PR.
>
> We are ICEing because we ended up tsubst_copying something that had already
> been tsubst, leading to an assert failure (mostly such repeated tsubsting is
> harmless).
>
> We had a non-dependent co_await in a non-dependent-type template fn, so we
> processed it at definition time, and then reprocessed at instantiation time.
> We fix this here by deferring substitution while processing templates.
>
> Additional observations (for a better future fix, in the GCC13 timescale):
>
> Exprs only have dependent type if at least one operand is dependent which was
> what the current code was intending to do. Coroutines have the additional
> wrinkle, that the current fn's type is an implicit operand.
>
> So, if the coroutine function's type is not dependent, and the operand is not
> dependent, we should determine the type of the co_await expression using the
> DEPENDENT_EXPR wrapper machinery. That allows us to determine the
> subexpression type, but leave its operand unchanged and then instantiate it
> later.
>
> Tested on x86_64-darwin (it does also fix the original testcase, but that is
> far too time-consuming for the testsuite).
>
> OK for master? / backports? (when?)
> thanks,
> Iain
>
> PR c++/103868
>
> gcc/cp/ChangeLog:
>
> * coroutines.cc (finish_co_await_expr): Do not process non-dependent
> coroutine expressions at template definition time.
> (finish_co_yield_expr): Likewise.
> (finish_co_return_stmt): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> * g++.dg/coroutines/pr103868.C: New test.
>
> Co-Authored-by: Iain Sandoe <iain@sandoe.co.uk>
> ---
> gcc/cp/coroutines.cc | 18 +-
> gcc/testsuite/g++.dg/coroutines/pr103868.C | 7390 ++++++++++++++++++++
> 2 files changed, 7396 insertions(+), 12 deletions(-)
> create mode 100644 gcc/testsuite/g++.dg/coroutines/pr103868.C
>
> diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
> index cdf6503c4d3..a9ce6e050dd 100644
> --- a/gcc/cp/coroutines.cc
> +++ b/gcc/cp/coroutines.cc
> @@ -1148,10 +1148,8 @@ finish_co_await_expr (location_t kw, tree expr)
> extraneous warnings during substitution. */
> suppress_warning (current_function_decl, OPT_Wreturn_type);
>
> - /* If we don't know the promise type, we can't proceed, build the
> - co_await with the expression unchanged. */
> - tree functype = TREE_TYPE (current_function_decl);
> - if (dependent_type_p (functype) || type_dependent_expression_p (expr))
> + /* Defer processing when we have dependent types. */
> + if (processing_template_decl)
> {
> tree aw_expr = build5_loc (kw, CO_AWAIT_EXPR, unknown_type_node, expr,
> NULL_TREE, NULL_TREE, NULL_TREE,
> @@ -1222,10 +1220,8 @@ finish_co_yield_expr (location_t kw, tree expr)
> extraneous warnings during substitution. */
> suppress_warning (current_function_decl, OPT_Wreturn_type);
>
> - /* If we don't know the promise type, we can't proceed, build the
> - co_await with the expression unchanged. */
> - tree functype = TREE_TYPE (current_function_decl);
> - if (dependent_type_p (functype) || type_dependent_expression_p (expr))
> + /* Defer processing when we have dependent types. */
> + if (processing_template_decl)
> return build2_loc (kw, CO_YIELD_EXPR, unknown_type_node, expr, NULL_TREE);
>
> if (!coro_promise_type_found_p (current_function_decl, kw))
> @@ -1307,10 +1303,8 @@ finish_co_return_stmt (location_t kw, tree expr)
> && check_for_bare_parameter_packs (expr))
> return error_mark_node;
>
> - /* If we don't know the promise type, we can't proceed, build the
> - co_return with the expression unchanged. */
> - tree functype = TREE_TYPE (current_function_decl);
> - if (dependent_type_p (functype) || type_dependent_expression_p (expr))
> + /* Defer processing when we have dependent types. */
> + if (processing_template_decl)
> {
> /* co_return expressions are always void type, regardless of the
> expression type. */
> diff --git a/gcc/testsuite/g++.dg/coroutines/pr103868.C b/gcc/testsuite/g++.dg/coroutines/pr103868.C
> new file mode 100644
> index 00000000000..f7b7e3bad54
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/coroutines/pr103868.C
> @@ -0,0 +1,7390 @@
> +// { dg-do compile }
> +// { dg-additional-options "-fpreprocessed -std=gnu++20 -w -fconcepts" }
> +// The ICE is fixed, but the reduced testcase has excess errors:
Hi, this comment says the testcase is "reduced" and yet it is still
very large; is this really as far as it can be reduced? Just wondering
for informational purposes...
> +// { dg-excess-errors {concept '__indirectly_readable_impl' has multiple template parameter lists} }
> +namespace std {
> +typedef decltype(nullptr) nullptr_t;
> +template <class charT> struct char_traits;
> +} // namespace std
> +namespace doctest {
> +class String {
> +public:
> + String(const char *in);
> +};
> +namespace assertType {
> +enum Enum {
> + is_warn = 1,
> + is_check = 2 * is_warn,
> + is_require = 2 * is_check,
> + is_normal = 2 * is_require,
> + is_throws = 2 * is_normal,
> + is_throws_as = 2 * is_throws,
> + is_throws_with = 2 * is_throws_as,
> + is_nothrow = 2 * is_throws_with,
> + is_false = 2 * is_nothrow,
> + is_unary = 2 * is_false,
> + is_eq = 2 * is_unary,
> + is_ne = 2 * is_eq,
> + is_lt = 2 * is_ne,
> + is_gt = 2 * is_lt,
> + is_ge = 2 * is_gt,
> + is_le = 2 * is_ge,
> + DT_WARN = is_normal | is_warn,
> + DT_CHECK = is_normal | is_check,
> + DT_REQUIRE = is_normal | is_require,
> + DT_WARN_FALSE = is_normal | is_false | is_warn,
> + DT_CHECK_FALSE = is_normal | is_false | is_check,
> + DT_REQUIRE_FALSE = is_normal | is_false | is_require,
> + DT_WARN_THROWS = is_throws | is_warn,
> + DT_CHECK_THROWS = is_throws | is_check,
> + DT_REQUIRE_THROWS = is_throws | is_require,
> + DT_WARN_THROWS_AS = is_throws_as | is_warn,
> + DT_CHECK_THROWS_AS = is_throws_as | is_check,
> + DT_REQUIRE_THROWS_AS = is_throws_as | is_require,
> + DT_WARN_THROWS_WITH = is_throws_with | is_warn,
> + DT_CHECK_THROWS_WITH = is_throws_with | is_check,
> + DT_REQUIRE_THROWS_WITH = is_throws_with | is_require,
> + DT_WARN_THROWS_WITH_AS = is_throws_with | is_throws_as | is_warn,
> + DT_CHECK_THROWS_WITH_AS = is_throws_with | is_throws_as | is_check,
> + DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require,
> + DT_WARN_NOTHROW = is_nothrow | is_warn,
> + DT_CHECK_NOTHROW = is_nothrow | is_check,
> + DT_REQUIRE_NOTHROW = is_nothrow | is_require,
> + DT_WARN_EQ = is_normal | is_eq | is_warn,
> + DT_CHECK_EQ = is_normal | is_eq | is_check,
> + DT_REQUIRE_EQ = is_normal | is_eq | is_require,
> + DT_WARN_NE = is_normal | is_ne | is_warn,
> + DT_CHECK_NE = is_normal | is_ne | is_check,
> + DT_REQUIRE_NE = is_normal | is_ne | is_require,
> + DT_WARN_GT = is_normal | is_gt | is_warn,
> + DT_CHECK_GT = is_normal | is_gt | is_check,
> + DT_REQUIRE_GT = is_normal | is_gt | is_require,
> + DT_WARN_LT = is_normal | is_lt | is_warn,
> + DT_CHECK_LT = is_normal | is_lt | is_check,
> + DT_REQUIRE_LT = is_normal | is_lt | is_require,
> + DT_WARN_GE = is_normal | is_ge | is_warn,
> + DT_CHECK_GE = is_normal | is_ge | is_check,
> + DT_REQUIRE_GE = is_normal | is_ge | is_require,
> + DT_WARN_LE = is_normal | is_le | is_warn,
> + DT_CHECK_LE = is_normal | is_le | is_check,
> + DT_REQUIRE_LE = is_normal | is_le | is_require,
> + DT_WARN_UNARY = is_normal | is_unary | is_warn,
> + DT_CHECK_UNARY = is_normal | is_unary | is_check,
> + DT_REQUIRE_UNARY = is_normal | is_unary | is_require,
> + DT_WARN_UNARY_FALSE = is_normal | is_false | is_unary | is_warn,
> + DT_CHECK_UNARY_FALSE = is_normal | is_false | is_unary | is_check,
> + DT_REQUIRE_UNARY_FALSE = is_normal | is_false | is_unary | is_require,
> +};
> +}
> +struct AssertData {};
> +namespace detail {
> +template <typename T> auto declval() noexcept -> decltype(declval<T>(0));
> +namespace has_insertion_operator_impl {}
> +struct Subcase {
> + Subcase(const String &name, const char *file, int line);
> + operator bool() const;
> +};
> +struct Result {
> + bool m_passed;
> +};
> +template <typename L> struct Expression_lhs {};
> +struct ExpressionDecomposer {};
> +struct ResultBuilder : public AssertData {
> + ResultBuilder(assertType::Enum at, const char *file, int line,
> + const char *expr, const char *exception_type = "",
> + const char *exception_string = "");
> + bool log();
> + void react() const;
> +};
> +} // namespace detail
> +} // namespace doctest
> +namespace std {
> +typedef long unsigned int size_t;
> +typedef long int ptrdiff_t;
> +inline namespace __cxx11 __attribute__((__abi_tag__("cxx11"))) {}
> +template <typename> class allocator;
> +namespace __cxx11 {
> +template <typename _CharT, typename _Traits = char_traits<_CharT>,
> + typename _Alloc = allocator<_CharT>>
> +class basic_string;
> +}
> +typedef basic_string<char> string;
> +} // namespace std
> +typedef long unsigned int size_t;
> +typedef struct __mbstate_t;
> +namespace std {
> +template <typename _CharT, typename _Traits = char_traits<_CharT>>
> +class basic_streambuf;
> +template <typename _CharT, typename _Traits = char_traits<_CharT>>
> +class basic_iostream;
> +} // namespace std
> +extern "C++" {
> +namespace std {
> +class exception {
> +public:
> +};
> +} // namespace std
> +}
> +extern "C++" {
> +namespace std {
> +class bad_cast : public exception {
> +public:
> +};
> +} // namespace std
> +[[__nodiscard__]] inline void *operator new(std::size_t, void *__p) noexcept {}
> +namespace std {
> +namespace __exception_ptr {
> +class exception_ptr;
> +}
> +using __exception_ptr::exception_ptr;
> +namespace __exception_ptr {
> +class exception_ptr {
> +public:
> + exception_ptr(nullptr_t);
> +};
> +} // namespace __exception_ptr
> +} // namespace std
> +}
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp, _Tp __v> struct integral_constant {
> + static constexpr _Tp value = __v;
> + typedef _Tp value_type;
> + typedef integral_constant<_Tp, __v> type;
> + constexpr operator value_type() const noexcept { return value; }
> + };
> + typedef integral_constant<bool, true> true_type;
> + typedef integral_constant<bool, false> false_type;
> + template <bool __v> using __bool_constant = integral_constant<bool, __v>;
> + template <bool __v> using bool_constant = integral_constant<bool, __v>;
> + template <bool, typename, typename> struct conditional;
> + template <typename _Type> struct __type_identity { using type = _Type; };
> + template <typename...> struct __or_;
> + template <typename _B1, typename _B2>
> + struct __or_<_B1, _B2> : public conditional<_B1::value, _B1, _B2>::type {};
> + template <typename _B1, typename _B2, typename _B3, typename... _Bn>
> + struct __or_<_B1, _B2, _B3, _Bn...>
> + : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type {};
> + template <typename...> struct __and_;
> + template <typename _B1, typename _B2>
> + struct __and_<_B1, _B2> : public conditional<_B1::value, _B2, _B1>::type {};
> + template <typename _B1, typename _B2, typename _B3, typename... _Bn>
> + struct __and_<_B1, _B2, _B3, _Bn...>
> + : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type {};
> + template <typename _Pp>
> + struct __not_ : public __bool_constant<!bool(_Pp::value)> {};
> + template <typename... _Bn>
> + inline constexpr bool __and_v = __and_<_Bn...>::value;
> + template <typename... _Bn> struct conjunction : __and_<_Bn...> {};
> + template <typename> struct is_reference;
> + template <typename> struct is_function;
> + template <typename> struct is_void;
> + template <typename> struct __is_array_unknown_bounds;
> + template <typename _Tp, size_t = sizeof(_Tp)>
> + constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) {
> + return {};
> + }
> + template <typename _TypeIdentity,
> + typename _NestedType = typename _TypeIdentity::type>
> + constexpr typename __or_<is_reference<_NestedType>, is_function<_NestedType>,
> + is_void<_NestedType>,
> + __is_array_unknown_bounds<_NestedType>>::type
> + __is_complete_or_unbounded(_TypeIdentity) {
> + return {};
> + }
> + template <typename _Tp> struct __success_type { typedef _Tp type; };
> + template <typename> struct remove_cv;
> + template <typename _Tp> using __remove_cv_t = typename remove_cv<_Tp>::type;
> + template <typename> struct is_const;
> + template <typename> struct __is_void_helper : public false_type {};
> + template <> struct __is_void_helper<void> : public true_type {};
> + template <typename _Tp>
> + struct is_void : public __is_void_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename> struct __is_integral_helper : public false_type {};
> + template <> struct __is_integral_helper<char> : public true_type {};
> + template <> struct __is_integral_helper<long> : public true_type {};
> + template <typename _Tp>
> + struct is_integral : public __is_integral_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename> struct __is_floating_point_helper : public false_type {};
> + template <typename _Tp>
> + struct is_floating_point
> + : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename> struct is_array : public false_type {};
> + template <typename _Tp, std::size_t _Size>
> + struct is_array<_Tp[_Size]> : public true_type {};
> + template <typename> struct __is_pointer_helper : public false_type {};
> + template <typename _Tp>
> + struct __is_pointer_helper<_Tp *> : public true_type {};
> + template <typename _Tp>
> + struct is_pointer : public __is_pointer_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename> struct is_lvalue_reference : public false_type {};
> + template <typename> struct is_rvalue_reference : public false_type {};
> + template <typename>
> + struct __is_member_object_pointer_helper : public false_type {};
> + template <typename _Tp>
> + struct is_member_object_pointer
> + : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename>
> + struct __is_member_function_pointer_helper : public false_type {};
> + template <typename _Tp, typename _Cp>
> + struct __is_member_function_pointer_helper<_Tp _Cp::*>
> + : public is_function<_Tp>::type {};
> + template <typename _Tp>
> + struct is_member_function_pointer
> + : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename _Tp>
> + struct is_enum : public integral_constant<bool, __is_enum(_Tp)> {};
> + template <typename _Tp>
> + struct is_union : public integral_constant<bool, __is_union(_Tp)> {};
> + template <typename _Tp>
> + struct is_class : public integral_constant<bool, __is_class(_Tp)> {};
> + template <typename _Tp>
> + struct is_function : public __bool_constant<!is_const<const _Tp>::value> {};
> + template <typename _Tp> struct is_function<_Tp &> : public false_type {};
> + template <typename> struct __is_null_pointer_helper : public false_type {};
> + template <typename _Tp>
> + struct is_null_pointer
> + : public __is_null_pointer_helper<__remove_cv_t<_Tp>>::type {
> + } __attribute__((__deprecated__("use '"
> + "std::is_null_pointer"
> + "' instead")));
> + template <typename _Tp>
> + struct is_reference
> + : public __or_<is_lvalue_reference<_Tp>, is_rvalue_reference<_Tp>>::type {
> + };
> + template <typename _Tp>
> + struct is_arithmetic
> + : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type {};
> + template <typename _Tp>
> + struct is_fundamental : public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
> + is_null_pointer<_Tp>>::type {};
> + template <typename _Tp>
> + struct is_object
> + : public __not_<
> + __or_<is_function<_Tp>, is_reference<_Tp>, is_void<_Tp>>>::type {};
> + template <typename> struct is_member_pointer;
> + template <typename _Tp>
> + struct is_scalar
> + : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
> + is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type {};
> + template <typename _Tp>
> + struct __is_member_pointer_helper : public false_type {};
> + template <typename _Tp>
> + struct is_member_pointer
> + : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type {};
> + template <typename...> using __void_t = void;
> + template <typename _Tp, typename = void>
> + struct __is_referenceable : public false_type {};
> + template <typename _Tp>
> + struct __is_referenceable<_Tp, __void_t<_Tp &>> : public true_type {};
> + template <typename> struct is_const : public false_type {};
> + template <typename _Tp> struct is_const<_Tp const> : public true_type {};
> + template <typename> struct is_volatile : public false_type {};
> + template <typename _Tp>
> + struct is_trivial : public integral_constant<bool, __is_trivial(_Tp)> {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + template <typename _Tp>
> + struct is_trivially_copyable
> + : public integral_constant<bool, __is_trivially_copyable(_Tp)> {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + template <typename _Tp>
> + struct is_standard_layout
> + : public integral_constant<bool, __is_standard_layout(_Tp)> {};
> + template <typename _Tp>
> + struct is_empty : public integral_constant<bool, __is_empty(_Tp)> {};
> + template <typename _Tp, bool = is_arithmetic<_Tp>::value>
> + struct __is_signed_helper : public false_type {};
> + template <typename _Tp>
> + struct is_signed : public __is_signed_helper<_Tp>::type {};
> + template <typename _Tp, typename _Up = _Tp &&> _Up __declval(int);
> + template <typename _Tp> auto declval() noexcept->decltype(__declval<_Tp>(0));
> + template <typename, unsigned = 0> struct extent;
> + template <typename> struct remove_all_extents;
> + template <typename _Tp>
> + struct __is_array_known_bounds
> + : public integral_constant<bool, (extent<_Tp>::value > 0)> {};
> + template <typename _Tp>
> + struct __is_array_unknown_bounds
> + : public __and_<is_array<_Tp>, __not_<extent<_Tp>>> {};
> + struct __do_is_destructible_impl {
> + template <typename _Tp, typename = decltype(declval<_Tp &>().~_Tp())>
> + static true_type __test(int);
> + };
> + template <typename _Tp>
> + struct __is_destructible_impl : public __do_is_destructible_impl {
> + typedef decltype(__test<_Tp>(0)) type;
> + };
> + template <typename _Tp,
> + bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>,
> + is_function<_Tp>>::value,
> + bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
> + struct __is_destructible_safe;
> + template <typename _Tp>
> + struct __is_destructible_safe<_Tp, false, false>
> + : public __is_destructible_impl<
> + typename remove_all_extents<_Tp>::type>::type {};
> + template <typename _Tp>
> + struct is_destructible : public __is_destructible_safe<_Tp>::type {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + struct __do_is_nt_destructible_impl {
> + template <typename _Tp>
> + static __bool_constant<noexcept(declval<_Tp &>().~_Tp())> __test(int);
> + };
> + template <typename _Tp>
> + struct __is_nt_destructible_impl : public __do_is_nt_destructible_impl {
> + typedef decltype(__test<_Tp>(0)) type;
> + };
> + template <typename _Tp,
> + bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>,
> + is_function<_Tp>>::value,
> + bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
> + struct __is_nt_destructible_safe;
> + template <typename _Tp>
> + struct __is_nt_destructible_safe<_Tp, false, false>
> + : public __is_nt_destructible_impl<
> + typename remove_all_extents<_Tp>::type>::type {};
> + template <typename _Tp>
> + struct is_nothrow_destructible : public __is_nt_destructible_safe<_Tp>::type {
> + };
> + template <typename _Tp, typename... _Args>
> + struct __is_constructible_impl
> + : public __bool_constant<__is_constructible(_Tp, _Args...)> {};
> + template <typename _Tp, typename... _Args>
> + struct is_constructible : public __is_constructible_impl<_Tp, _Args...> {};
> + template <typename _Tp>
> + struct is_default_constructible : public __is_constructible_impl<_Tp>::type {
> + };
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_copy_constructible_impl;
> + template <typename _Tp>
> + struct __is_copy_constructible_impl<_Tp, true>
> + : public __is_constructible_impl<_Tp, const _Tp &> {};
> + template <typename _Tp>
> + struct is_copy_constructible : public __is_copy_constructible_impl<_Tp> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_move_constructible_impl;
> + template <typename _Tp>
> + struct __is_move_constructible_impl<_Tp, true>
> + : public __is_constructible_impl<_Tp, _Tp &&> {};
> + template <typename _Tp>
> + struct is_move_constructible : public __is_move_constructible_impl<_Tp> {};
> + template <typename _Tp, typename... _Args>
> + using __is_nothrow_constructible_impl =
> + __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
> + template <typename _Tp, typename... _Args>
> + struct is_nothrow_constructible
> + : public __is_nothrow_constructible_impl<_Tp, _Args...>::type {};
> + template <typename _Tp>
> + struct is_nothrow_default_constructible
> + : public __bool_constant<__is_nothrow_constructible(_Tp)> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_nothrow_copy_constructible_impl;
> + template <typename _Tp>
> + struct __is_nothrow_copy_constructible_impl<_Tp, true>
> + : public __is_nothrow_constructible_impl<_Tp, const _Tp &> {};
> + template <typename _Tp>
> + struct is_nothrow_copy_constructible
> + : public __is_nothrow_copy_constructible_impl<_Tp>::type {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_nothrow_move_constructible_impl;
> + template <typename _Tp>
> + struct is_nothrow_move_constructible
> + : public __is_nothrow_move_constructible_impl<_Tp>::type {};
> + template <typename _Tp, typename _Up>
> + struct is_assignable : public __bool_constant<__is_assignable(_Tp, _Up)> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_copy_assignable_impl;
> + template <typename _Tp>
> + struct __is_copy_assignable_impl<_Tp, true>
> + : public __bool_constant<__is_assignable(_Tp &, const _Tp &)> {};
> + template <typename _Tp>
> + struct is_copy_assignable : public __is_copy_assignable_impl<_Tp>::type {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_move_assignable_impl;
> + template <typename _Tp>
> + struct __is_move_assignable_impl<_Tp, true>
> + : public __bool_constant<__is_assignable(_Tp &, _Tp &&)> {};
> + template <typename _Tp>
> + struct is_move_assignable : public __is_move_assignable_impl<_Tp>::type {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_trivially_copy_constructible_impl;
> + template <typename _Tp>
> + struct __is_trivially_copy_constructible_impl<_Tp, true>
> + : public __and_<__is_copy_constructible_impl<_Tp>,
> + integral_constant<bool, __is_trivially_constructible(
> + _Tp, const _Tp &)>> {};
> + template <typename _Tp>
> + struct is_trivially_copy_constructible
> + : public __is_trivially_copy_constructible_impl<_Tp> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_trivially_move_constructible_impl;
> + template <typename _Tp>
> + struct __is_trivially_move_constructible_impl<_Tp, true>
> + : public __and_<__is_move_constructible_impl<_Tp>,
> + integral_constant<bool, __is_trivially_constructible(
> + _Tp, _Tp &&)>> {};
> + template <typename _Tp>
> + struct is_trivially_move_constructible
> + : public __is_trivially_move_constructible_impl<_Tp> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_trivially_copy_assignable_impl;
> + template <typename _Tp>
> + struct __is_trivially_copy_assignable_impl<_Tp, true>
> + : public __bool_constant<__is_trivially_assignable(_Tp &, const _Tp &)> {
> + };
> + template <typename _Tp>
> + struct is_trivially_copy_assignable
> + : public __is_trivially_copy_assignable_impl<_Tp> {};
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __is_trivially_move_assignable_impl;
> + template <typename _Tp>
> + struct __is_trivially_move_assignable_impl<_Tp, true>
> + : public __bool_constant<__is_trivially_assignable(_Tp &, _Tp &&)> {};
> + template <typename _Tp>
> + struct is_trivially_move_assignable
> + : public __is_trivially_move_assignable_impl<_Tp> {};
> + template <typename _Tp>
> + struct is_trivially_destructible
> + : public __and_<__is_destructible_safe<_Tp>,
> + __bool_constant<__has_trivial_destructor(_Tp)>> {};
> + template <typename _Tp>
> + struct alignment_of : public integral_constant<std::size_t, alignof(_Tp)> {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + template <typename _Tp, typename _Up>
> + struct is_same : public integral_constant<bool, __is_same(_Tp, _Up)> {};
> + template <typename _Base, typename _Derived>
> + struct is_base_of
> + : public integral_constant<bool, __is_base_of(_Base, _Derived)> {};
> + template <typename _From, typename _To,
> + bool =
> + __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value>
> + struct __is_convertible_helper;
> + template <typename _From, typename _To>
> + class __is_convertible_helper<_From, _To, false> {
> + template <typename _To1> static void __test_aux(_To1) noexcept;
> + template <typename _From1, typename _To1,
> + typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
> + static true_type __test(int);
> +
> + public:
> + typedef decltype(__test<_From, _To>(0)) type;
> + };
> + template <typename _From, typename _To>
> + struct is_convertible : public __is_convertible_helper<_From, _To>::type {};
> + template <typename _From, typename _To,
> + bool =
> + __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value>
> + struct __is_nt_convertible_helper : is_void<_To> {};
> + template <typename _From, typename _To>
> + struct is_nothrow_convertible
> + : public __is_nt_convertible_helper<_From, _To>::type {};
> + template <typename _Tp> struct remove_const { typedef _Tp type; };
> + template <typename _Tp> struct remove_cv { using type = _Tp; };
> + template <typename _Tp> struct remove_cv<const _Tp> { using type = _Tp; };
> + template <typename _Tp> struct add_const;
> + template <typename _Tp>
> + using remove_const_t = typename remove_const<_Tp>::type;
> + template <typename _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
> + template <typename _Tp> struct remove_reference { typedef _Tp type; };
> + template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };
> + template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; };
> + template <typename _Tp, bool = __is_referenceable<_Tp>::value>
> + struct __add_rvalue_reference_helper {
> + typedef _Tp type;
> + };
> + template <typename _Tp>
> + struct add_rvalue_reference : public __add_rvalue_reference_helper<_Tp> {};
> + template <typename _Tp>
> + using remove_reference_t = typename remove_reference<_Tp>::type;
> + template <typename _Tp>
> + using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
> + template <typename _Unqualified, bool _IsConst, bool _IsVol>
> + struct __cv_selector;
> + template <typename _Unqualified>
> + struct __cv_selector<_Unqualified, false, false> {
> + typedef _Unqualified __type;
> + };
> + template <typename _Qualified, typename _Unqualified,
> + bool _IsConst = is_const<_Qualified>::value,
> + bool _IsVol = is_volatile<_Qualified>::value>
> + class __match_cv_qualifiers {
> + typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
> +
> + public:
> + typedef typename __match::__type __type;
> + };
> + template <typename _Tp> struct __make_unsigned { typedef _Tp __type; };
> + template <typename _Tp, bool _IsInt = is_integral<_Tp>::value,
> + bool _IsEnum = is_enum<_Tp>::value>
> + class __make_unsigned_selector;
> + template <typename _Tp> class __make_unsigned_selector<_Tp, true, false> {
> + using __unsigned_type =
> + typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
> +
> + public:
> + using __type = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
> + };
> + template <typename _Tp> struct make_unsigned {
> + typedef typename __make_unsigned_selector<_Tp>::__type type;
> + };
> + template <typename _Tp> struct remove_all_extents { typedef _Tp type; };
> + template <typename _Tp>
> + using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
> + template <typename _Up, bool _IsArray = is_array<_Up>::value,
> + bool _IsFunction = is_function<_Up>::value>
> + struct __decay_selector;
> + template <typename _Up> struct __decay_selector<_Up, false, false> {
> + typedef __remove_cv_t<_Up> __type;
> + };
> + template <typename _Tp> class decay {
> + typedef typename remove_reference<_Tp>::type __remove_type;
> +
> + public:
> + typedef typename __decay_selector<__remove_type>::__type type;
> + };
> + template <typename _Tp> using __decay_t = typename decay<_Tp>::type;
> + template <bool, typename _Tp = void> struct enable_if {};
> + template <typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; };
> + template <bool _Cond, typename _Tp = void>
> + using __enable_if_t = typename enable_if<_Cond, _Tp>::type;
> + template <typename... _Cond>
> + using _Require = __enable_if_t<__and_<_Cond...>::value>;
> + template <bool _Cond, typename _Iftrue, typename _Iffalse>
> + struct conditional {
> + typedef _Iftrue type;
> + };
> + template <typename _Iftrue, typename _Iffalse>
> + struct conditional<false, _Iftrue, _Iffalse> {
> + typedef _Iffalse type;
> + };
> + template <typename _Tp>
> + using __remove_cvref_t =
> + typename remove_cv<typename remove_reference<_Tp>::type>::type;
> + template <typename _Signature> struct result_of;
> + struct __invoke_memfun_deref;
> + struct __invoke_other {};
> + template <typename _Tp, typename _Tag>
> + struct __result_of_success : __success_type<_Tp> {
> + using __invoke_type = _Tag;
> + };
> + struct __result_of_memfun_ref_impl {};
> + template <typename _MemPtr, typename _Arg, typename... _Args>
> + struct __result_of_memfun_ref : private __result_of_memfun_ref_impl {};
> + struct __result_of_memfun_deref_impl {
> + template <typename _Fp, typename _Tp1, typename... _Args>
> + static __result_of_success<
> + decltype(((*std::declval<_Tp1>()).*
> + std::declval<_Fp>())(std::declval<_Args>()...)),
> + __invoke_memfun_deref>
> + _S_test(int);
> + };
> + template <typename _MemPtr, typename _Arg, typename... _Args>
> + struct __result_of_memfun_deref : private __result_of_memfun_deref_impl {
> + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
> + };
> + template <typename _MemPtr, typename _Arg, typename... _Args>
> + struct __result_of_memfun;
> + template <typename _Res, typename _Class, typename _Arg, typename... _Args>
> + struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> {
> + typedef typename remove_reference<_Arg>::type _Argval;
> + typedef _Res _Class::*_MemPtr;
> + typedef typename conditional<
> + is_base_of<_Class, _Argval>::value,
> + __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
> + __result_of_memfun_deref<_MemPtr, _Arg, _Args...>>::type::type type;
> + };
> + template <typename _Tp, typename _Up = __remove_cvref_t<_Tp>>
> + struct __inv_unwrap {
> + using type = _Tp;
> + };
> + template <bool, bool, typename _Functor, typename... _ArgTypes>
> + struct __result_of_impl;
> + template <typename _MemPtr, typename _Arg, typename... _Args>
> + struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
> + : public __result_of_memfun<__decay_t<_MemPtr>,
> + typename __inv_unwrap<_Arg>::type, _Args...> {
> + };
> + struct __result_of_other_impl {
> + template <typename _Fn, typename... _Args>
> + static __result_of_success<
> + decltype(std::declval<_Fn>()(std::declval<_Args>()...)), __invoke_other>
> + _S_test(int);
> + };
> + template <typename _Functor, typename... _ArgTypes>
> + struct __result_of_impl<false, false, _Functor, _ArgTypes...>
> + : private __result_of_other_impl {
> + typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
> + };
> + template <typename _Functor, typename... _ArgTypes>
> + struct __invoke_result
> + : public __result_of_impl<
> + is_member_object_pointer<
> + typename remove_reference<_Functor>::type>::value,
> + is_member_function_pointer<
> + typename remove_reference<_Functor>::type>::value,
> + _Functor, _ArgTypes...>::type {};
> + template <typename _Functor, typename... _ArgTypes>
> + struct result_of<_Functor(_ArgTypes...)>
> + : public __invoke_result<_Functor, _ArgTypes...> {};
> + template <bool _Cond, typename _Tp = void>
> + using enable_if_t = typename enable_if<_Cond, _Tp>::type;
> + template <bool _Cond, typename _Iftrue, typename _Iffalse>
> + using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type;
> + template <typename _Default, typename _AlwaysVoid,
> + template <typename...> class _Op, typename... _Args>
> + struct __detector {
> + using type = _Default;
> + };
> + template <typename _Default, template <typename...> class _Op,
> + typename... _Args>
> + using __detected_or = __detector<_Default, void, _Op, _Args...>;
> + template <typename _Default, template <typename...> class _Op,
> + typename... _Args>
> + using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type;
> + template <typename... _Elements> class tuple;
> + template <typename> struct __is_tuple_like_impl : false_type {};
> + template <typename _Tp>
> + struct __is_tuple_like
> + : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type {};
> + namespace __swappable_details {
> + struct __do_is_swappable_impl {};
> + struct __do_is_nothrow_swappable_impl {};
> + } // namespace __swappable_details
> + template <typename _Tp>
> + struct __is_swappable_impl
> + : public __swappable_details::__do_is_swappable_impl {};
> + template <typename _Tp>
> + struct is_swappable : public __is_swappable_impl<_Tp>::type {
> + static_assert(
> + std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
> + "template argument must be a complete class or an unbounded array");
> + };
> + template <typename _Result, typename _Ret, bool = is_void<_Ret>::value,
> + typename = void>
> + struct __is_invocable_impl : false_type {};
> + template <typename _Result, typename _Ret>
> + struct __is_invocable_impl<_Result, _Ret, true,
> + __void_t<typename _Result::type>> : true_type {};
> + template <typename _Result, typename _Ret>
> + struct __is_invocable_impl<_Result, _Ret, false,
> + __void_t<typename _Result::type>> {
> + private:
> + static typename _Result::type _S_get();
> + template <typename _Tp> static void _S_conv(_Tp);
> + template <typename _Tp, typename = decltype(_S_conv<_Tp>(_S_get()))>
> + static true_type _S_test(int);
> +
> + public:
> + using type = decltype(_S_test<_Ret>(1));
> + };
> + template <typename _Fn, typename... _ArgTypes>
> + struct __is_invocable
> + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type {};
> + template <typename _Fn, typename... _Args>
> + constexpr bool __call_is_nt(__invoke_other) {
> + return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
> + }
> + template <typename _Result, typename _Fn, typename... _Args>
> + struct __call_is_nothrow : __bool_constant<std::__call_is_nt<_Fn, _Args...>(
> + typename _Result::__invoke_type{})> {};
> + template <typename _Fn, typename... _Args>
> + using __call_is_nothrow_ =
> + __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
> + template <typename _Fn, typename... _Args>
> + struct __is_nothrow_invocable
> + : __and_<__is_invocable<_Fn, _Args...>,
> + __call_is_nothrow_<_Fn, _Args...>>::type {};
> + template <typename _Functor, typename... _ArgTypes>
> + struct invoke_result : public __invoke_result<_Functor, _ArgTypes...> {};
> + template <typename _Fn, typename... _Args>
> + using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
> + template <typename _Fn, typename... _ArgTypes>
> + struct is_invocable
> + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type {};
> + template <typename _Ret, typename _Fn, typename... _ArgTypes>
> + struct is_invocable_r
> + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type {
> + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
> + "_Ret must be a complete class or an unbounded array");
> + };
> + template <typename _Fn, typename... _ArgTypes>
> + struct is_nothrow_invocable
> + : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
> + __call_is_nothrow_<_Fn, _ArgTypes...>>::type {};
> + template <typename _Result, typename _Ret, typename = void>
> + struct __is_nt_invocable_impl : false_type {};
> + template <typename _Ret, typename _Fn, typename... _ArgTypes>
> + struct is_nothrow_invocable_r
> + : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
> + __call_is_nothrow_<_Fn, _ArgTypes...>>::type {
> + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
> + "_Fn must be a complete class or an unbounded array");
> + static_assert(
> + (std::__is_complete_or_unbounded(__type_identity<_ArgTypes>{}) && ...),
> + "each argument type must be a complete class or an unbounded array");
> + static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
> + "_Ret must be a complete class or an unbounded array");
> + };
> + template <typename _Fn, typename... _Args>
> + inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value;
> + template <typename _Fn, typename... _Args>
> + inline constexpr bool is_nothrow_invocable_v =
> + is_nothrow_invocable<_Fn, _Args...>::value;
> + template <typename _Ret, typename _Fn, typename... _Args>
> + inline constexpr bool is_invocable_r_v =
> + is_invocable_r<_Ret, _Fn, _Args...>::value;
> + template <typename _Ret, typename _Fn, typename... _Args>
> + inline constexpr bool is_nothrow_invocable_r_v =
> + is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
> + template <typename _Tp> inline constexpr bool is_void_v = is_void<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_integral_v = is_integral<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_reference_v = is_reference<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_object_v = is_object<_Tp>::value;
> + template <typename _Tp, typename... _Args>
> + inline constexpr bool is_constructible_v =
> + is_constructible<_Tp, _Args...>::value;
> + template <typename _Tp>
> + inline constexpr bool is_default_constructible_v =
> + is_default_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_copy_constructible_v =
> + is_copy_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_move_constructible_v =
> + is_move_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_trivially_copy_constructible_v =
> + is_trivially_copy_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_trivially_move_constructible_v =
> + is_trivially_move_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_trivially_copy_assignable_v =
> + is_trivially_copy_assignable<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_trivially_move_assignable_v =
> + is_trivially_move_assignable<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_trivially_destructible_v =
> + is_trivially_destructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_nothrow_default_constructible_v =
> + is_nothrow_default_constructible<_Tp>::value;
> + template <typename _Tp>
> + inline constexpr bool is_nothrow_destructible_v =
> + is_nothrow_destructible<_Tp>::value;
> + template <typename _Tp, typename _Up>
> + inline constexpr bool is_same_v = __is_same(_Tp, _Up);
> + template <typename _From, typename _To>
> + inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
> + template <typename _Tp>
> + struct has_unique_object_representations
> + : bool_constant<__has_unique_object_representations(
> + remove_cv_t<remove_all_extents_t<_Tp>>)> {};
> + template <typename _Tp> using remove_cvref_t = __remove_cvref_t<_Tp>;
> + constexpr inline bool is_constant_evaluated() noexcept {
> + return __builtin_is_constant_evaluated();
> + }
> + template <typename... _Tp> struct common_reference;
> + template <typename... _Tp>
> + using common_reference_t = typename common_reference<_Tp...>::type;
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp>
> + [[__nodiscard__]] constexpr _Tp &&forward(
> + typename std::remove_reference<_Tp>::type & __t) noexcept {
> + return static_cast<_Tp &&>(__t);
> + }
> + template <typename _Tp>
> + [[__nodiscard__]] constexpr typename std::remove_reference<_Tp>::type &&move(
> + _Tp && __t) noexcept {
> + return static_cast<typename std::remove_reference<_Tp>::type &&>(__t);
> + };
> + template <typename _Tp>
> + [[__nodiscard__]] inline constexpr _Tp *addressof(_Tp & __r) noexcept {}
> +} // namespace )
> +extern "C++" {
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp> struct __is_integer {
> + enum { __value = 0 };
> + };
> + template <typename> struct iterator_traits;
> + template <typename _Tp> struct __is_nonvolatile_trivially_copyable;
> +} // namespace )
> +}
> +namespace __gnu_cxx __attribute__((__visibility__("default"))) {
> + template <typename _Tp>
> + struct __is_integer_nonstrict : public std::__is_integer<_Tp> {
> + using std::__is_integer<_Tp>::__value;
> + enum { __width = __value ? sizeof(_Tp) * 8 : 0 };
> + };
> + template <typename _Value> struct __numeric_traits_integer {
> + static const bool __is_signed = (_Value)(-1) < 0;
> + static const int __digits =
> + __is_integer_nonstrict<_Value>::__width - __is_signed;
> + };
> + template <typename _Tp> using __int_traits = __numeric_traits_integer<_Tp>;
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace __detail {
> + template <typename _Tp, typename _Up>
> + concept __same_as = std::is_same_v<_Tp, _Up>;
> + }
> + template <typename _Tp, typename _Up>
> + concept same_as =
> + __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>;
> + template <typename _Derived, typename _Base>
> + concept derived_from =
> + __is_base_of(_Base, _Derived) &&
> + is_convertible_v<const volatile _Derived *, const volatile _Base *>;
> + template <typename _From, typename _To>
> + concept convertible_to = is_convertible_v<_From, _To> &&
> + requires(add_rvalue_reference_t<_From>(&__f)()) {
> + static_cast<_To>(__f());
> + };
> + template <typename _Tp, typename _Up>
> + concept common_reference_with =
> + same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Up, _Tp>> &&
> + convertible_to<_Tp, common_reference_t<_Tp, _Up>> &&
> + convertible_to<_Up, common_reference_t<_Tp, _Up>>;
> + namespace __detail {
> + template <typename _Tp> using __cref = const remove_reference_t<_Tp> &;
> + }
> + template <typename _Lhs, typename _Rhs>
> + concept assignable_from = is_lvalue_reference_v<_Lhs> &&
> + common_reference_with<__detail::__cref<_Lhs>, __detail::__cref<_Rhs>> &&
> + requires(_Lhs __lhs, _Rhs && __rhs) {
> + { __lhs = static_cast<_Rhs &&>(__rhs) } -> same_as<_Lhs>;
> + };
> + template <typename _Tp>
> + concept destructible = is_nothrow_destructible_v<_Tp>;
> + template <typename _Tp, typename... _Args>
> + concept constructible_from =
> + destructible<_Tp> && is_constructible_v<_Tp, _Args...>;
> + template <typename _Tp>
> + concept default_initializable = constructible_from<_Tp> && requires {
> + _Tp{};
> + };
> + template <typename _Tp>
> + concept move_constructible =
> + constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>;
> + template <typename _Tp>
> + concept copy_constructible =
> + move_constructible<_Tp> && constructible_from<_Tp, _Tp &> &&
> + convertible_to<_Tp &, _Tp> && constructible_from<_Tp, const _Tp &> &&
> + convertible_to<const _Tp &, _Tp> && constructible_from<_Tp, const _Tp> &&
> + convertible_to<const _Tp, _Tp>;
> + namespace ranges {
> + namespace __cust_swap {
> + struct _Swap {};
> + } // namespace __cust_swap
> + inline namespace __cust {
> + inline constexpr __cust_swap::_Swap swap;
> + }
> + } // namespace ranges
> + template <typename _Tp>
> + concept swappable = requires(_Tp & __a, _Tp & __b) {
> + ranges::swap(__a, __b);
> + };
> + template <typename _Tp>
> + concept movable = is_object_v<_Tp> && move_constructible<_Tp> &&
> + assignable_from<_Tp &, _Tp> && swappable<_Tp>;
> + template <typename _Tp>
> + concept copyable = copy_constructible<_Tp> && movable<_Tp> &&
> + assignable_from<_Tp &, _Tp &> && assignable_from<_Tp &, const _Tp &> &&
> + assignable_from<_Tp &, const _Tp>;
> + template <typename _Tp>
> + concept semiregular = copyable<_Tp> && default_initializable<_Tp>;
> + namespace __detail {
> + template <typename _Tp>
> + concept __boolean_testable_impl = convertible_to<_Tp, bool>;
> + template <typename _Tp>
> + concept __boolean_testable =
> + __boolean_testable_impl<_Tp> && requires(_Tp && __t) {
> + { !static_cast<_Tp &&>(__t) } -> __boolean_testable_impl;
> + };
> + } // namespace __detail
> + namespace __detail {
> + template <typename _Tp, typename _Up>
> + concept __weakly_eq_cmp_with = requires(__detail::__cref<_Tp> __t,
> + __detail::__cref<_Up> __u) {
> + { __t == __u } -> __boolean_testable;
> + };
> + } // namespace __detail
> + template <typename _Tp>
> + concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>;
> + namespace __detail {
> + template <typename _Tp, typename _Up>
> + concept __partially_ordered_with =
> + requires(const remove_reference_t<_Tp> &__t,
> + const remove_reference_t<_Up> &__u) {
> + { __t < __u } -> __boolean_testable;
> + };
> + } // namespace __detail
> + template <typename _Tp>
> + concept regular = semiregular<_Tp> && equality_comparable<_Tp>;
> + template <typename _Fn, typename... _Args>
> + concept invocable = is_invocable_v<_Fn, _Args...>;
> + namespace __cmp_cat {}
> + template <typename _U1, typename _U2> class __pair_base;
> + template <typename _T1, typename _T2>
> + struct pair : private __pair_base<_T1, _T2> {};
> + template <typename _Tp, typename _Up> struct __replace_first_arg;
> + template <template <typename, typename...> class _Template, typename _Up,
> + typename _Tp, typename... _Types>
> + struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> {
> + using type = _Template<_Up, _Types...>;
> + };
> + template <typename _Ptr> struct pointer_traits;
> + template <typename _Tp> struct pointer_traits<_Tp *> {
> + typedef ptrdiff_t difference_type;
> + template <typename _Up> using rebind = _Up *;
> + };
> + template <typename _Ptr, typename _Tp>
> + using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>;
> + struct output_iterator_tag;
> + namespace __detail {
> + template <typename _Tp> using __with_ref = _Tp &;
> + template <typename _Tp>
> + concept __can_reference = requires {
> + typename __with_ref<_Tp>;
> + };
> + template <typename _Tp>
> + concept __dereferenceable = requires(_Tp &__t) {
> + { *__t } -> __can_reference;
> + };
> + } // namespace __detail
> + template <__detail::__dereferenceable _Tp>
> + using iter_reference_t = decltype(*std::declval<_Tp &>());
> + namespace ranges {
> + namespace __cust_imove {
> + struct _IMove {
> + private:
> + template <typename _Tp> struct __result;
> +
> + public:
> + template <std::__detail::__dereferenceable _Tp>
> + using __type = typename __result<_Tp>::type;
> + };
> + } // namespace __cust_imove
> + } // namespace ranges
> + template <__detail::__dereferenceable _Tp>
> + requires __detail::__can_reference<
> + ranges::__cust_imove::_IMove::__type<_Tp &>>
> + using iter_rvalue_reference_t = ranges::__cust_imove::_IMove::__type<_Tp &>;
> + namespace __detail {
> + template <typename _Iter, typename _Tp> struct __iter_traits_impl;
> + template <typename _Iter, typename _Tp = _Iter>
> + using __iter_traits = typename __iter_traits_impl<_Iter, _Tp>::type;
> + } // namespace __detail
> + template <typename> struct indirectly_readable_traits;
> + namespace __detail {
> + template <typename _Tp>
> + using __iter_value_t =
> + typename __iter_traits<_Tp, indirectly_readable_traits<_Tp>>::value_type;
> + }
> + template <typename _Tp>
> + using iter_value_t = __detail::__iter_value_t<remove_cvref_t<_Tp>>;
> + namespace __detail {
> + template <typename _Iter>
> + concept __cpp17_iterator = requires(_Iter __it) {
> + { *__it } -> same_as<iter_reference_t<_Iter>>;
> + };
> + }; // namespace __detail
> + namespace __detail {
> + template <typename _Iter> struct __iter_concept_impl;
> + template <typename _Iter>
> + requires requires { typename __iter_traits<_Iter>::iterator_concept; }
> + template <typename _In>
> + concept __indirectly_readable_impl = requires {
> + requires same_as<iter_rvalue_reference_t<const _In>,
> + iter_rvalue_reference_t<_In>>;
> + }
> + &&common_reference_with<iter_reference_t<_In> &&, iter_value_t<_In> &>
> + &&common_reference_with<iter_reference_t<_In> &&,
> + iter_rvalue_reference_t<_In> &&>
> + &&common_reference_with<iter_rvalue_reference_t<_In> &&,
> + const iter_value_t<_In> &>;
> + } // namespace __detail
> + template <typename _Iter>
> + concept weakly_incrementable =
> + default_initializable<_Iter> && movable<_Iter> && requires(_Iter __i) {
> + __i++;
> + };
> + template <typename _Iter>
> + concept incrementable =
> + regular<_Iter> && weakly_incrementable<_Iter> && requires(_Iter __i) {
> + { __i++ } -> same_as<_Iter>;
> + };
> + template <typename _Iter>
> + concept input_or_output_iterator = requires(_Iter __i) {
> + { *__i } -> __detail::__can_reference;
> + }
> + &&weakly_incrementable<_Iter>;
> + namespace __detail {}
> + struct input_iterator_tag {};
> + struct forward_iterator_tag : public input_iterator_tag {};
> + struct bidirectional_iterator_tag : public forward_iterator_tag {};
> + struct random_access_iterator_tag : public bidirectional_iterator_tag {};
> + template <typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
> + typename _Pointer = _Tp *, typename _Reference = _Tp &>
> + struct iterator {};
> + template <typename _Container>
> + class back_insert_iterator
> + : public iterator<output_iterator_tag, void, void, void, void> {};
> +} // namespace )
> +namespace __gnu_cxx __attribute__((__visibility__("default"))) {
> + template <typename _Iterator, typename _Container> class __normal_iterator;
> +}
> +namespace std __attribute__((__visibility__("default"))) {
> + template <> struct char_traits<char> {
> + typedef char char_type;
> + static constexpr size_t length(const char_type *__s) {
> + return __builtin_strlen(__s);
> + }
> + };
> +} // namespace )
> +typedef unsigned char __uint8_t;
> +typedef unsigned short int __uint16_t;
> +typedef signed int __int32_t;
> +typedef unsigned int __uint32_t;
> +typedef signed long int __int64_t;
> +typedef unsigned long int __uint64_t;
> +typedef long int __intmax_t;
> +typedef unsigned long int __uintmax_t;
> +typedef __int64_t int64_t;
> +typedef __uint8_t uint8_t;
> +typedef __uint16_t uint16_t;
> +typedef __uint32_t uint32_t;
> +typedef __uint64_t uint64_t;
> +typedef unsigned long int uintptr_t;
> +typedef __intmax_t intmax_t;
> +typedef __uintmax_t uintmax_t;
> +namespace std {
> +using ::uint16_t;
> +using ::uint32_t;
> +using ::uint64_t;
> +using ::uint8_t;
> +enum {
> + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
> + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
> + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
> + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
> + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
> + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
> + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
> + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
> + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
> + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
> + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
> + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
> +};
> +} // namespace std
> +typedef struct __pthread_internal_list {
> + struct __pthread_internal_list *__prev;
> + struct __pthread_internal_list *__next;
> +} __pthread_list_t;
> +typedef struct __pthread_internal_slist __pthread_slist_t;
> +struct __pthread_mutex_s {
> + int __lock;
> + unsigned int __count;
> + int __owner;
> + unsigned int __nusers;
> + int __kind;
> + short __spins;
> + short __elision;
> + __pthread_list_t __list;
> +};
> +typedef unsigned long int pthread_t;
> +typedef union {
> + struct __pthread_mutex_s __data;
> +} pthread_mutex_t;
> +typedef union pthread_cond_t;
> +enum {
> + PTHREAD_MUTEX_TIMED_NP,
> + PTHREAD_MUTEX_RECURSIVE_NP,
> + PTHREAD_MUTEX_ERRORCHECK_NP,
> + PTHREAD_MUTEX_ADAPTIVE_NP,
> + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
> + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
> + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
> + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL,
> + PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
> +};
> +typedef pthread_t __gthread_t;
> +typedef pthread_mutex_t __gthread_mutex_t;
> +namespace __gnu_cxx __attribute__((__visibility__("default"))) {
> + template <typename _Tp> class new_allocator {};
> +} // namespace )
> +namespace std {
> +template <typename _Tp> using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
> +template <typename _Tp> class allocator : public __allocator_base<_Tp> {
> +public:
> + typedef _Tp value_type;
> + [[nodiscard, __gnu__::__always_inline__]] constexpr _Tp *
> + allocate(size_t __n) {}
> +};
> +template <typename _Arg1, typename _Arg2, typename _Result>
> +struct binary_function;
> +template <typename _Tp>
> +struct equal_to : public binary_function<_Tp, _Tp, bool> {};
> +template <typename _Tp> struct less : public binary_function<_Tp, _Tp, bool> {};
> +struct __allocator_traits_base {
> + template <typename _Tp, typename _Up, typename = void>
> + struct __rebind : __replace_first_arg<_Tp, _Up> {};
> +
> +protected:
> + template <typename _Tp> using __pointer = typename _Tp::pointer;
> + template <typename _Tp> using __c_pointer = typename _Tp::const_pointer;
> +};
> +template <typename _Alloc, typename _Up>
> +using __alloc_rebind =
> + typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type;
> +template <typename _Alloc> struct allocator_traits : __allocator_traits_base {
> + typedef typename _Alloc::value_type value_type;
> + using pointer = __detected_or_t<value_type *, __pointer, _Alloc>;
> +
> +private:
> + template <template <typename> class _Func, typename _Tp, typename = void>
> + struct _Ptr {
> + using type = typename pointer_traits<pointer>::template rebind<_Tp>;
> + };
> + template <typename _A2, typename _PtrT, typename = void> struct _Diff {
> + using type = typename pointer_traits<_PtrT>::difference_type;
> + };
> + template <typename _A2, typename _DiffT, typename = void>
> + struct _Size : make_unsigned<_DiffT> {};
> +
> +public:
> + using const_pointer = typename _Ptr<__c_pointer, const value_type>::type;
> + using difference_type = typename _Diff<_Alloc, pointer>::type;
> + using size_type = typename _Size<_Alloc, difference_type>::type;
> + template <typename _Tp> using rebind_alloc = __alloc_rebind<_Alloc, _Tp>;
> +
> +public:
> + [[__nodiscard__]] static constexpr pointer allocate(_Alloc &__a,
> + size_type __n) {}
> +};
> +template <typename _Alloc, typename = void>
> +struct __is_allocator : false_type {};
> +template <typename _Alloc>
> +struct __is_allocator<
> + _Alloc, __void_t<typename _Alloc::value_type,
> + decltype(std::declval<_Alloc &>().allocate(size_t{}))>>
> + : true_type {};
> +template <typename _Alloc>
> +using _RequireAllocator =
> + typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type;
> +} // namespace std
> +namespace __gnu_cxx __attribute__((__visibility__("default"))) {
> + template <typename _Alloc, typename = typename _Alloc::value_type>
> + struct __alloc_traits : std::allocator_traits<_Alloc> {
> + typedef std::allocator_traits<_Alloc> _Base_type;
> + template <typename _Tp> struct rebind {
> + typedef typename _Base_type::template rebind_alloc<_Tp> other;
> + };
> + };
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp> struct hash;
> + template <typename _Hash> struct __is_fast_hash : public std::true_type {};
> + template <typename _CharT, typename _Traits = std::char_traits<_CharT>>
> + class basic_string_view {};
> + using string_view = basic_string_view<char>;
> + inline namespace literals {
> + inline namespace string_view_literals {}
> + } // namespace literals
> + namespace __cxx11 {
> + template <typename _CharT, typename _Traits, typename _Alloc>
> + class basic_string {
> + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<
> + _CharT>::other _Char_alloc_type;
> + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits;
> +
> + public:
> + typedef _Traits traits_type;
> + typedef typename _Alloc_traits::const_pointer const_pointer;
> + typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
> + const_iterator;
> + template <typename = _RequireAllocator<_Alloc>>
> + basic_string(const _CharT *__s, const _Alloc &__a = _Alloc());
> + };
> + } // namespace __cxx11
> + namespace __cxx11 {
> + string to_string(int __val);
> + }
> + class locale;
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + struct __cow_string {
> + union {};
> + };
> + class logic_error : public exception {};
> + class out_of_range : public logic_error {
> + public:
> + };
> + class runtime_error : public exception {
> + public:
> + };
> + template <typename _Tp> struct is_error_code_enum : public false_type {};
> + template <typename _Tp> struct is_error_condition_enum : public false_type {};
> + class error_code;
> + class system_error : public std::runtime_error {
> + public:
> + };
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + class ios_base {};
> + template <typename _CharT, typename _Traits>
> + class basic_ios : public ios_base {
> + public:
> + protected:
> + };
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _CharT, typename _Traits>
> + class basic_ostream : virtual public basic_ios<_CharT, _Traits> {};
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _CharT, typename _Traits>
> + class basic_istream : virtual public basic_ios<_CharT, _Traits> {};
> + template <typename _CharT, typename _Traits>
> + class basic_iostream : public basic_istream<_CharT, _Traits>,
> + public basic_ostream<_CharT, _Traits> {
> + protected:
> + };
> + template <typename _Tp, typename _Up = _Tp>
> + constexpr _Tp exchange(_Tp & __obj, _Up && __new_val);
> + template <typename _Tp, _Tp... _Idx> struct integer_sequence {};
> + template <typename _Tp, _Tp _Num>
> + using make_integer_sequence = integer_sequence<_Tp, __integer_pack(_Num)...>;
> + template <size_t... _Idx>
> + using index_sequence = integer_sequence<size_t, _Idx...>;
> + template <size_t _Num>
> + using make_index_sequence = make_integer_sequence<size_t, _Num>;
> + template <typename _Tp> struct in_place_type_t;
> + template <typename _Res, typename _Fn, typename... _Args>
> + constexpr _Res __invoke_impl(__invoke_other, _Fn && __f, _Args && ...__args) {
> + return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...);
> + }
> + template <typename _Callable, typename... _Args>
> + constexpr typename __invoke_result<_Callable, _Args...>::type
> + __invoke(_Callable && __fn, _Args && ...__args) noexcept(
> + __is_nothrow_invocable<_Callable, _Args...>::value) {
> + using __result = __invoke_result<_Callable, _Args...>;
> + using __type = typename __result::type;
> + using __tag = typename __result::__invoke_type;
> + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
> + std::forward<_Args>(__args)...);
> + }
> + template <typename _Res, typename _Callable, typename... _Args>
> + constexpr enable_if_t<is_invocable_r_v<_Res, _Callable, _Args...>, _Res>
> + __invoke_r(_Callable && __fn, _Args && ...__args) noexcept(
> + is_nothrow_invocable_r_v<_Res, _Callable, _Args...>) {
> + using __result = __invoke_result<_Callable, _Args...>;
> + using __type = typename __result::type;
> + using __tag = typename __result::__invoke_type;
> + if constexpr (is_void_v<_Res>)
> + std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
> + std::forward<_Args>(__args)...);
> + else
> + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
> + std::forward<_Args>(__args)...);
> + }
> + template <typename _Tp> struct __is_empty_non_tuple : is_empty<_Tp> {};
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Res, typename... _ArgTypes>
> + struct _Maybe_unary_or_binary_function {};
> + template <typename _Tp>
> + struct __is_location_invariant : is_trivially_copyable<_Tp>::type {};
> + union _Nocopy_types {};
> + union [[gnu::may_alias]] _Any_data {
> + void *_M_access() {}
> + const void *_M_access() const {}
> + template <typename _Tp> const _Tp &_M_access() const {}
> + };
> + enum _Manager_operation {
> + __get_type_info,
> + __get_functor_ptr,
> + __clone_functor,
> + __destroy_functor
> + };
> + template <typename _Signature> class function;
> + class _Function_base {
> + public:
> + static const size_t _M_max_size = sizeof(_Nocopy_types);
> + static const size_t _M_max_align = __alignof__(_Nocopy_types);
> + template <typename _Functor> class _Base_manager {
> + protected:
> + static const bool __stored_locally =
> + (__is_location_invariant<_Functor>::value &&
> + sizeof(_Functor) <= _M_max_size &&
> + __alignof__(_Functor) <= _M_max_align &&
> + (_M_max_align % __alignof__(_Functor) == 0));
> + static _Functor *_M_get_pointer(const _Any_data &__source) {
> + if constexpr (__stored_locally) {
> + }
> + }
> +
> + public:
> + template <typename _Tp> static bool _M_not_empty_function(const _Tp &) {}
> + };
> + };
> + template <typename _Signature, typename _Functor> class _Function_handler;
> + template <typename _Res, typename _Functor, typename... _ArgTypes>
> + class _Function_handler<_Res(_ArgTypes...), _Functor>
> + : public _Function_base::_Base_manager<_Functor> {
> + typedef _Function_base::_Base_manager<_Functor> _Base;
> +
> + public:
> + static _Res _M_invoke(const _Any_data &__functor, _ArgTypes &&...__args) {
> + return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor),
> + std::forward<_ArgTypes>(__args)...);
> + }
> + };
> + template <typename _Res, typename... _ArgTypes>
> + class function<_Res(_ArgTypes...)>
> + : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
> + private _Function_base {
> + template <typename _Func,
> + typename _Res2 = __invoke_result<_Func &, _ArgTypes...>>
> + struct _Callable : __is_invocable_impl<_Res2, _Res>::type {};
> + template <typename _Tp> struct _Callable<function, _Tp> : false_type {};
> + template <typename _Cond, typename _Tp>
> + using _Requires = typename enable_if<_Cond::value, _Tp>::type;
> +
> + public:
> + typedef _Res result_type;
> + template <typename _Functor,
> + typename = _Requires<__not_<is_same<_Functor, function>>, void>,
> + typename = _Requires<_Callable<_Functor>, void>>
> + function(_Functor __f) : _Function_base() {
> + typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler;
> + if (_My_handler::_M_not_empty_function(__f)) {
> + _M_invoker = &_My_handler::_M_invoke;
> + }
> + }
> +
> + private:
> + using _Invoker_type = _Res (*)(const _Any_data &, _ArgTypes &&...);
> + _Invoker_type _M_invoker;
> + };
> +} // namespace )
> +namespace __gnu_cxx {
> +template <typename _Tp> struct __aligned_membuf {};
> +} // namespace __gnu_cxx
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace __detail {
> + template <bool _Cache_hash_code, bool _Constant_iterators, bool _Unique_keys>
> + struct _Hashtable_traits {};
> + struct _Hash_node_base {};
> + template <typename _Value> struct _Hash_node_value_base {};
> + template <bool _Cache_hash_code> struct _Hash_node_code_cache {};
> + template <typename _Value, bool _Cache_hash_code>
> + struct _Hash_node_value : _Hash_node_value_base<_Value>,
> + _Hash_node_code_cache<_Cache_hash_code> {};
> + template <typename _Value, bool _Cache_hash_code>
> + struct _Hash_node : _Hash_node_base,
> + _Hash_node_value<_Value, _Cache_hash_code> {};
> + struct _Prime_rehash_policy {};
> + template <typename _Key, typename _Value, typename _Alloc,
> + typename _ExtractKey, typename _Equal, typename _Hash,
> + typename _RangeHash, typename _Unused, typename _RehashPolicy,
> + typename _Traits, bool _Unique_keys = _Traits::__unique_keys::value>
> + struct _Map_base {};
> + template <typename _Key, typename _Value, typename _Alloc,
> + typename _ExtractKey, typename _Equal, typename _Hash,
> + typename _RangeHash, typename _Unused, typename _RehashPolicy,
> + typename _Traits>
> + struct _Insert_base {};
> + template <int _Nm, typename _Tp,
> + bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
> + struct _Hashtable_ebo_helper;
> + template <int _Nm, typename _Tp>
> + struct _Hashtable_ebo_helper<_Nm, _Tp, true> : private _Tp {};
> + } // namespace __detail
> + template <typename _Val, typename _NodeAlloc> class _Node_handle_common {};
> + template <typename _Key, typename _Tp, typename _Hash = hash<_Key>,
> + typename _Pred = equal_to<_Key>,
> + typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
> + class unordered_map {};
> + template <typename _Tp, typename _Alloc> struct _Vector_base {
> + typedef
> + typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other
> + _Tp_alloc_type;
> +
> + protected:
> + };
> + template <typename _Tp, typename _Alloc = std::allocator<_Tp>>
> + class vector : protected _Vector_base<_Tp, _Alloc> {
> + typedef _Vector_base<_Tp, _Alloc> _Base;
> + };
> + template <typename _Callable, typename... _Args>
> + constexpr invoke_result_t<_Callable, _Args...> invoke(
> + _Callable && __fn,
> + _Args && ...__args) noexcept(is_nothrow_invocable_v<_Callable, _Args...>);
> + template <typename _Tp, typename _Pred> struct __is_byte_like : false_type {};
> +} // namespace )
> +namespace boost {
> +namespace asio {}
> +namespace beast {
> +namespace net = boost::asio;
> +}
> +namespace beast {
> +using string_view = std::string_view;
> +}
> +namespace beast {
> +struct iless {};
> +} // namespace beast
> +namespace beast {
> +namespace http {
> +enum class field : unsigned short {
> + unknown = 0,
> + a_im,
> + accept,
> + accept_additions,
> + accept_charset,
> + accept_datetime,
> + accept_encoding,
> + accept_features,
> + accept_language,
> + accept_patch,
> + accept_post,
> + accept_ranges,
> + access_control,
> + access_control_allow_credentials,
> + access_control_allow_headers,
> + access_control_allow_methods,
> + access_control_allow_origin,
> + access_control_expose_headers,
> + access_control_max_age,
> + access_control_request_headers,
> + access_control_request_method,
> + age,
> + allow,
> + alpn,
> + also_control,
> + alt_svc,
> + alt_used,
> + alternate_recipient,
> + alternates,
> + apparently_to,
> + apply_to_redirect_ref,
> + approved,
> + archive,
> + archived_at,
> + article_names,
> + article_updates,
> + authentication_control,
> + authentication_info,
> + authentication_results,
> + authorization,
> + auto_submitted,
> + autoforwarded,
> + autosubmitted,
> + base,
> + bcc,
> + body,
> + c_ext,
> + c_man,
> + c_opt,
> + c_pep,
> + c_pep_info,
> + cache_control,
> + caldav_timezones,
> + cancel_key,
> + cancel_lock,
> + cc,
> + close,
> + comments,
> + compliance,
> + connection,
> + content_alternative,
> + content_base,
> + content_description,
> + content_disposition,
> + content_duration,
> + content_encoding,
> + content_features,
> + content_id,
> + content_identifier,
> + content_language,
> + content_length,
> + content_location,
> + content_md5,
> + content_range,
> + content_return,
> + content_script_type,
> + content_style_type,
> + content_transfer_encoding,
> + content_type,
> + content_version,
> + control,
> + conversion,
> + conversion_with_loss,
> + cookie,
> + cookie2,
> + cost,
> + dasl,
> + date,
> + date_received,
> + dav,
> + default_style,
> + deferred_delivery,
> + delivery_date,
> + delta_base,
> + depth,
> + derived_from,
> + destination,
> + differential_id,
> + digest,
> + discarded_x400_ipms_extensions,
> + discarded_x400_mts_extensions,
> + disclose_recipients,
> + disposition_notification_options,
> + disposition_notification_to,
> + distribution,
> + dkim_signature,
> + dl_expansion_history,
> + downgraded_bcc,
> + downgraded_cc,
> + downgraded_disposition_notification_to,
> + downgraded_final_recipient,
> + downgraded_from,
> + downgraded_in_reply_to,
> + downgraded_mail_from,
> + downgraded_message_id,
> + downgraded_original_recipient,
> + downgraded_rcpt_to,
> + downgraded_references,
> + downgraded_reply_to,
> + downgraded_resent_bcc,
> + downgraded_resent_cc,
> + downgraded_resent_from,
> + downgraded_resent_reply_to,
> + downgraded_resent_sender,
> + downgraded_resent_to,
> + downgraded_return_path,
> + downgraded_sender,
> + downgraded_to,
> + ediint_features,
> + eesst_version,
> + encoding,
> + encrypted,
> + errors_to,
> + etag,
> + expect,
> + expires,
> + expiry_date,
> + ext,
> + followup_to,
> + forwarded,
> + from,
> + generate_delivery_report,
> + getprofile,
> + hobareg,
> + host,
> + http2_settings,
> + if_,
> + if_match,
> + if_modified_since,
> + if_none_match,
> + if_range,
> + if_schedule_tag_match,
> + if_unmodified_since,
> + im,
> + importance,
> + in_reply_to,
> + incomplete_copy,
> + injection_date,
> + injection_info,
> + jabber_id,
> + keep_alive,
> + keywords,
> + label,
> + language,
> + last_modified,
> + latest_delivery_time,
> + lines,
> + link,
> + list_archive,
> + list_help,
> + list_id,
> + list_owner,
> + list_post,
> + list_subscribe,
> + list_unsubscribe,
> + list_unsubscribe_post,
> + location,
> + lock_token,
> + man,
> + max_forwards,
> + memento_datetime,
> + message_context,
> + message_id,
> + message_type,
> + meter,
> + method_check,
> + method_check_expires,
> + mime_version,
> + mmhs_acp127_message_identifier,
> + mmhs_authorizing_users,
> + mmhs_codress_message_indicator,
> + mmhs_copy_precedence,
> + mmhs_exempted_address,
> + mmhs_extended_authorisation_info,
> + mmhs_handling_instructions,
> + mmhs_message_instructions,
> + mmhs_message_type,
> + mmhs_originator_plad,
> + mmhs_originator_reference,
> + mmhs_other_recipients_indicator_cc,
> + mmhs_other_recipients_indicator_to,
> + mmhs_primary_precedence,
> + mmhs_subject_indicator_codes,
> + mt_priority,
> + negotiate,
> + newsgroups,
> + nntp_posting_date,
> + nntp_posting_host,
> + non_compliance,
> + obsoletes,
> + opt,
> + optional,
> + optional_www_authenticate,
> + ordering_type,
> + organization,
> + origin,
> + original_encoded_information_types,
> + original_from,
> + original_message_id,
> + original_recipient,
> + original_sender,
> + original_subject,
> + originator_return_address,
> + overwrite,
> + p3p,
> + path,
> + pep,
> + pep_info,
> + pics_label,
> + position,
> + posting_version,
> + pragma,
> + prefer,
> + preference_applied,
> + prevent_nondelivery_report,
> + priority,
> + privicon,
> + profileobject,
> + protocol,
> + protocol_info,
> + protocol_query,
> + protocol_request,
> + proxy_authenticate,
> + proxy_authentication_info,
> + proxy_authorization,
> + proxy_connection,
> + proxy_features,
> + proxy_instruction,
> + public_,
> + public_key_pins,
> + public_key_pins_report_only,
> + range,
> + received,
> + received_spf,
> + redirect_ref,
> + references,
> + referer,
> + referer_root,
> + relay_version,
> + reply_by,
> + reply_to,
> + require_recipient_valid_since,
> + resent_bcc,
> + resent_cc,
> + resent_date,
> + resent_from,
> + resent_message_id,
> + resent_reply_to,
> + resent_sender,
> + resent_to,
> + resolution_hint,
> + resolver_location,
> + retry_after,
> + return_path,
> + safe,
> + schedule_reply,
> + schedule_tag,
> + sec_fetch_dest,
> + sec_fetch_mode,
> + sec_fetch_site,
> + sec_fetch_user,
> + sec_websocket_accept,
> + sec_websocket_extensions,
> + sec_websocket_key,
> + sec_websocket_protocol,
> + sec_websocket_version,
> + security_scheme,
> + see_also,
> + sender,
> + sensitivity,
> + server,
> + set_cookie,
> + set_cookie2,
> + setprofile,
> + sio_label,
> + sio_label_history,
> + slug,
> + soapaction,
> + solicitation,
> + status_uri,
> + strict_transport_security,
> + subject,
> + subok,
> + subst,
> + summary,
> + supersedes,
> + surrogate_capability,
> + surrogate_control,
> + tcn,
> + te,
> + timeout,
> + title,
> + to,
> + topic,
> + trailer,
> + transfer_encoding,
> + ttl,
> + ua_color,
> + ua_media,
> + ua_pixels,
> + ua_resolution,
> + ua_windowpixels,
> + upgrade,
> + urgency,
> + uri,
> + user_agent,
> + variant_vary,
> + vary,
> + vbr_info,
> + version,
> + via,
> + want_digest,
> + warning,
> + www_authenticate,
> + x_archived_at,
> + x_device_accept,
> + x_device_accept_charset,
> + x_device_accept_encoding,
> + x_device_accept_language,
> + x_device_user_agent,
> + x_frame_options,
> + x_mittente,
> + x_pgp_sig,
> + x_ricevuta,
> + x_riferimento_message_id,
> + x_tiporicevuta,
> + x_trasporto,
> + x_verificasicurezza,
> + x400_content_identifier,
> + x400_content_return,
> + x400_content_type,
> + x400_mts_identifier,
> + x400_originator,
> + x400_received,
> + x400_recipients,
> + x400_trace,
> + xref
> +};
> +}
> +} // namespace beast
> +} // namespace boost
> +extern "C" {
> +extern size_t strlen(const char *__s) noexcept(true) __attribute__((__pure__))
> +__attribute__((__nonnull__(1)));
> +namespace std __attribute__((__visibility__("default"))) {
> + using ::strlen;
> +}
> +}
> +namespace boost {
> +namespace beast {
> +namespace http {
> +enum class status : unsigned {
> + unknown = 0,
> + continue_ = 100,
> + switching_protocols = 101,
> + processing = 102,
> + ok = 200,
> + created = 201,
> + accepted = 202,
> + non_authoritative_information = 203,
> + no_content = 204,
> + reset_content = 205,
> + partial_content = 206,
> + multi_status = 207,
> + already_reported = 208,
> + im_used = 226,
> + multiple_choices = 300,
> + moved_permanently = 301,
> + found = 302,
> + see_other = 303,
> + not_modified = 304,
> + use_proxy = 305,
> + temporary_redirect = 307,
> + permanent_redirect = 308,
> + bad_request = 400,
> + unauthorized = 401,
> + payment_required = 402,
> + forbidden = 403,
> + not_found = 404,
> + method_not_allowed = 405,
> + not_acceptable = 406,
> + proxy_authentication_required = 407,
> + request_timeout = 408,
> + conflict = 409,
> + gone = 410,
> + length_required = 411,
> + precondition_failed = 412,
> + payload_too_large = 413,
> + uri_too_long = 414,
> + unsupported_media_type = 415,
> + range_not_satisfiable = 416,
> + expectation_failed = 417,
> + misdirected_request = 421,
> + unprocessable_entity = 422,
> + locked = 423,
> + failed_dependency = 424,
> + upgrade_required = 426,
> + precondition_required = 428,
> + too_many_requests = 429,
> + request_header_fields_too_large = 431,
> + connection_closed_without_response = 444,
> + unavailable_for_legal_reasons = 451,
> + client_closed_request = 499,
> + internal_server_error = 500,
> + not_implemented = 501,
> + bad_gateway = 502,
> + service_unavailable = 503,
> + gateway_timeout = 504,
> + http_version_not_supported = 505,
> + variant_also_negotiates = 506,
> + insufficient_storage = 507,
> + loop_detected = 508,
> + not_extended = 510,
> + network_authentication_required = 511,
> + network_connect_timeout_error = 599
> +};
> +enum class status_class : unsigned {
> + unknown = 0,
> + informational = 1,
> + successful = 2,
> + redirection = 3,
> + client_error = 4,
> + server_error = 5,
> +};
> +} // namespace http
> +} // namespace beast
> +using ::int64_t;
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace http {
> +enum class verb {
> + unknown = 0,
> + delete_,
> + get,
> + head,
> + post,
> + put,
> + connect,
> + options,
> + trace,
> + copy,
> + lock,
> + mkcol,
> + move,
> + propfind,
> + proppatch,
> + search,
> + unlock,
> + bind,
> + rebind,
> + unbind,
> + acl,
> + report,
> + mkactivity,
> + checkout,
> + merge,
> + msearch,
> + notify,
> + subscribe,
> + unsubscribe,
> + patch,
> + purge,
> + mkcalendar,
> + link,
> + unlink
> +};
> +}
> +} // namespace beast
> +} // namespace boost
> +namespace malloy::http {}
> +namespace std __attribute__((__visibility__("default"))) {
> + template <intmax_t _Pn>
> + struct __static_sign : integral_constant<intmax_t, (_Pn < 0) ? -1 : 1> {};
> + template <intmax_t _Pn>
> + struct __static_abs
> + : integral_constant<intmax_t, _Pn * __static_sign<_Pn>::value> {};
> + template <intmax_t _Pn, intmax_t _Qn>
> + struct __static_gcd : __static_gcd<_Qn, (_Pn % _Qn)> {};
> + template <intmax_t _Pn>
> + struct __static_gcd<_Pn, 0>
> + : integral_constant<intmax_t, __static_abs<_Pn>::value> {};
> + template <intmax_t _Pn, intmax_t _Qn> struct __safe_multiply {};
> + template <uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2>
> + struct __big_less
> + : integral_constant<bool, (__hi1 < __hi2 ||
> + (__hi1 == __hi2 && __lo1 < __lo2))> {};
> + template <uintmax_t __x, uintmax_t __y> struct __big_mul {};
> + template <intmax_t _Num, intmax_t _Den = 1> struct ratio {
> + static constexpr intmax_t num =
> + _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value;
> + static constexpr intmax_t den =
> + __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value;
> + };
> + template <typename _R1, typename _R2>
> + struct ratio_equal
> + : integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> {
> + };
> + template <typename _R1, typename _R2,
> + typename _Left = __big_mul<_R1::num, _R2::den>,
> + typename _Right = __big_mul<_R2::num, _R1::den>>
> + struct __ratio_less_impl_1
> + : integral_constant<bool, __big_less<_Left::__hi, _Left::__lo,
> + _Right::__hi, _Right::__lo>::value> {
> + };
> + template <typename _R1, typename _R2,
> + bool = (_R1::num == 0 || _R2::num == 0 ||
> + (__static_sign<_R1::num>::value !=
> + __static_sign<_R2::num>::value)),
> + bool = (__static_sign<_R1::num>::value == -1 &&
> + __static_sign<_R2::num>::value == -1)>
> + struct __ratio_less_impl : __ratio_less_impl_1<_R1, _R2>::type {};
> + template <typename _R1, typename _R2>
> + struct ratio_less : __ratio_less_impl<_R1, _R2>::type {};
> + typedef ratio<1, 1000000000> nano;
> + enum float_round_style {
> + round_indeterminate = -1,
> + round_toward_zero = 0,
> + round_to_nearest = 1,
> + round_toward_infinity = 2,
> + round_toward_neg_infinity = 3
> + };
> + enum float_denorm_style {
> + denorm_indeterminate = -1,
> + denorm_absent = 0,
> + denorm_present = 1
> + };
> + struct __numeric_limits_base {};
> + template <typename _Tp>
> + struct numeric_limits : public __numeric_limits_base {};
> + template <> struct numeric_limits<unsigned long> {
> + static constexpr unsigned long max() noexcept {
> + return 0x7fffffffffffffffL * 2UL + 1;
> + }
> + };
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace __parse_int {}
> + namespace __select_int {
> + template <unsigned long long _Val, typename... _Ints> struct _Select_int_base;
> + template <unsigned long long _Val, typename _IntType, typename... _Ints>
> + struct _Select_int_base<_Val, _IntType, _Ints...>
> + : conditional_t<(_Val <= __gnu_cxx::__int_traits<_IntType>::__max),
> + integral_constant<_IntType, (_IntType)_Val>,
> + _Select_int_base<_Val, _Ints...>> {};
> + }; // namespace __select_int
> + namespace chrono {
> + template <typename _Rep, typename _Period = ratio<1>> struct duration;
> + template <typename _Rep>
> + struct treat_as_floating_point : is_floating_point<_Rep> {};
> + template <typename _Rep, typename _Period> struct duration {
> + private:
> + template <typename _Rep2> using __is_float = treat_as_floating_point<_Rep2>;
> +
> + public:
> + using rep = _Rep;
> + template <
> + typename _Rep2,
> + typename = _Require<is_convertible<const _Rep2 &, rep>,
> + __or_<__is_float<rep>, __not_<__is_float<_Rep2>>>>>
> + constexpr explicit duration(const _Rep2 &__rep)
> + : __r(static_cast<rep>(__rep)) {}
> +
> + private:
> + rep __r;
> + };
> + using nanoseconds = duration<int64_t, nano>;
> + using seconds = duration<int64_t>;
> + template <typename _Clock, typename _Dur> struct time_point {};
> + inline namespace _V2 {
> + struct system_clock {};
> + struct steady_clock {
> + typedef chrono::nanoseconds duration;
> + typedef chrono::time_point<steady_clock, duration> time_point;
> + };
> + static constexpr chrono::seconds _S_epoch_diff{6437664000};
> + }; // namespace _V2
> + } // namespace chrono
> + namespace filesystem {
> + inline namespace __cxx11 __attribute__((__abi_tag__("cxx11"))) {}
> + namespace __cxx11 {}
> + } // namespace filesystem
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp> struct default_delete {};
> + template <typename _Tp, typename _Dp = default_delete<_Tp>>
> + class unique_ptr {};
> +} // namespace )
> +namespace __gnu_cxx __attribute__((__visibility__("default"))) {
> + enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
> + static const _Lock_policy __default_lock_policy = _S_atomic;
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + using __gnu_cxx::__default_lock_policy;
> + using __gnu_cxx::_Lock_policy;
> + template <_Lock_policy _Lp> class _Mutex_base {
> + protected:
> + enum { _S_need_barriers = 0 };
> + };
> + template <_Lock_policy _Lp = __default_lock_policy>
> + class _Sp_counted_base : public _Mutex_base<_Lp> {};
> + template <typename _Tp, _Lock_policy _Lp = __default_lock_policy>
> + class __shared_ptr;
> + template <typename _Tp, _Lock_policy _Lp = __default_lock_policy>
> + class __weak_ptr;
> + template <typename _Yp_ptr, typename _Tp_ptr>
> + struct __sp_compatible_with : false_type {};
> + template <typename _Tp, _Lock_policy _Lp, bool = is_array<_Tp>::value,
> + bool = is_void<_Tp>::value>
> + class __shared_ptr_access {
> + public:
> + using element_type = _Tp;
> + element_type &operator*() const noexcept;
> + element_type *operator->() const noexcept;
> +
> + private:
> + };
> + template <typename _Tp, _Lock_policy _Lp>
> + class __shared_ptr_access<_Tp, _Lp, false, true> {};
> + template <typename _Tp, _Lock_policy _Lp>
> + class __shared_ptr : public __shared_ptr_access<_Tp, _Lp> {};
> + template <typename _Tp, _Lock_policy _Lp> class __weak_ptr {};
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp> class shared_ptr : public __shared_ptr<_Tp> {};
> + template <typename _Tp> class weak_ptr : public __weak_ptr<_Tp> {};
> + template <typename _Tp> class enable_shared_from_this {
> + protected:
> + public:
> + shared_ptr<_Tp> shared_from_this();
> + };
> + template <typename _Tp, typename... _Args>
> + shared_ptr<_Tp> make_shared(_Args && ...__args);
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace filesystem {
> + namespace __cxx11 {
> + class path;
> + namespace __detail {};
> + } // namespace __cxx11
> + } // namespace filesystem
> +} // namespace )
> +namespace malloy::http {}
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _CharT, typename _Traits>
> + class basic_filebuf : public basic_streambuf<_CharT, _Traits> {};
> + class __mutex_base {
> + protected:
> + typedef __gthread_mutex_t __native_type;
> + __native_type _M_mutex = {
> + {0, 0, 0, 0, PTHREAD_MUTEX_TIMED_NP, 0, 0, {0, 0}}};
> + };
> + class mutex : private __mutex_base {};
> + enum class memory_order : int {
> + relaxed,
> + consume,
> + acquire,
> + release,
> + acq_rel,
> + seq_cst
> + };
> +} // namespace )
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +using std::shared_ptr;
> +}
> +using std::string_view;
> +} // namespace asio
> +namespace asio {
> +using std::add_const;
> +using std::conditional;
> +using std::decay;
> +using std::declval;
> +using std::enable_if;
> +using std::false_type;
> +using std::integral_constant;
> +using std::is_class;
> +using std::is_constructible;
> +using std::is_convertible;
> +using std::is_move_constructible;
> +using std::is_nothrow_copy_constructible;
> +using std::is_nothrow_destructible;
> +using std::is_same;
> +using std::remove_cv;
> +template <typename T>
> +struct remove_cvref : remove_cv<typename std::remove_reference<T>::type> {};
> +using std::result_of;
> +using std::true_type;
> +template <typename> struct void_type {};
> +template <bool Condition, typename Type = int>
> +struct constraint : enable_if<Condition, Type> {};
> +class mutable_buffer {};
> +class const_buffer {
> +public:
> + std::size_t size() const noexcept;
> +};
> +class const_buffers_1 : public const_buffer {};
> +template <typename ConstBuffer>
> +const const_buffer *buffer_sequence_begin(
> + const ConstBuffer &b,
> + typename constraint<is_convertible<
> + const ConstBuffer *, const const_buffer *>::value>::type = 0) noexcept;
> +template <typename ConstBuffer>
> +const const_buffer *buffer_sequence_end(
> + const ConstBuffer &b,
> + typename constraint<is_convertible<
> + const ConstBuffer *, const const_buffer *>::value>::type = 0) noexcept;
> +const_buffers_1 buffer(const void *data, std::size_t size_in_bytes) noexcept;
> +class const_registered_buffer;
> +namespace detail {
> +template <typename T>
> +char (&buffer_sequence_begin_helper(
> + T *t, typename enable_if<
> + !is_same<decltype(boost::asio::buffer_sequence_begin(*t)),
> + void>::value>::type *))[2];
> +template <typename T>
> +char (&buffer_sequence_end_helper(
> + T *t,
> + typename enable_if<!is_same<decltype(boost::asio::buffer_sequence_end(*t)),
> + void>::value>::type *))[2];
> +template <typename> char (&size_memfn_helper(...))[2];
> +template <typename> char (&max_size_memfn_helper(...))[2];
> +template <typename> char (&capacity_memfn_helper(...))[2];
> +template <typename> char (&data_memfn_helper(...))[2];
> +template <typename> char (&prepare_memfn_helper(...))[2];
> +template <typename> char (&commit_memfn_helper(...))[2];
> +template <typename> char (&consume_memfn_helper(...))[2];
> +template <typename T, typename Buffer>
> +char buffer_sequence_element_type_helper(
> + T *t,
> + typename enable_if<is_convertible<
> + decltype(*boost::asio::buffer_sequence_begin(*t)), Buffer>::value>::type
> + *);
> +template <typename T>
> +char const_buffers_type_typedef_helper(typename T::const_buffers_type *);
> +template <typename T>
> +char mutable_buffers_type_typedef_helper(typename T::mutable_buffers_type *);
> +template <typename T, typename Buffer>
> +struct is_buffer_sequence_class
> + : integral_constant<
> + bool, sizeof(buffer_sequence_begin_helper<T>(0, 0)) != 1 &&
> + sizeof(buffer_sequence_end_helper<T>(0, 0)) != 1 &&
> + sizeof(buffer_sequence_element_type_helper<T, Buffer>(
> + 0, 0)) == 1> {};
> +template <typename T, typename Buffer>
> +struct is_buffer_sequence
> + : conditional<is_class<T>::value, is_buffer_sequence_class<T, Buffer>,
> + false_type>::type {};
> +template <>
> +struct is_buffer_sequence<mutable_buffer, mutable_buffer> : true_type {};
> +template <>
> +struct is_buffer_sequence<const_registered_buffer, mutable_buffer>
> + : false_type {};
> +template <typename T>
> +struct is_dynamic_buffer_class_v1
> + : integral_constant<
> + bool, sizeof(size_memfn_helper<T>(0)) != 1 &&
> + sizeof(max_size_memfn_helper<T>(0)) != 1 &&
> + sizeof(capacity_memfn_helper<T>(0)) != 1 &&
> + sizeof(data_memfn_helper<T>(0)) != 1 &&
> + sizeof(consume_memfn_helper<T>(0)) != 1 &&
> + sizeof(prepare_memfn_helper<T>(0)) != 1 &&
> + sizeof(commit_memfn_helper<T>(0)) != 1 &&
> + sizeof(const_buffers_type_typedef_helper<T>(0)) == 1 &&
> + sizeof(mutable_buffers_type_typedef_helper<T>(0)) == 1> {};
> +template <typename T>
> +struct is_dynamic_buffer_v1
> + : conditional<is_class<T>::value, is_dynamic_buffer_class_v1<T>,
> + false_type>::type {};
> +template <typename T>
> +struct is_dynamic_buffer_class_v2
> + : integral_constant<
> + bool, sizeof(size_memfn_helper<T>(0)) != 1 &&
> + sizeof(max_size_memfn_helper<T>(0)) != 1 &&
> + sizeof(capacity_memfn_helper<T>(0)) != 1 &&
> + sizeof(data_memfn_helper<T>(0)) != 1 &&
> + sizeof(consume_memfn_helper<T>(0)) != 1 &&
> + sizeof(grow_memfn_helper<T>(0)) != 1 &&
> + sizeof(shrink_memfn_helper<T>(0)) != 1 &&
> + sizeof(const_buffers_type_typedef_helper<T>(0)) == 1 &&
> + sizeof(mutable_buffers_type_typedef_helper<T>(0)) == 1> {};
> +template <typename T>
> +struct is_dynamic_buffer_v2
> + : conditional<is_class<T>::value, is_dynamic_buffer_class_v2<T>,
> + false_type>::type {};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +template <typename T>
> +struct is_mutable_buffer_sequence
> + : boost::asio::detail::is_buffer_sequence<T, mutable_buffer> {};
> +template <typename T>
> +struct is_const_buffer_sequence
> + : boost::asio::detail::is_buffer_sequence<T, const_buffer> {};
> +template <typename T>
> +struct is_dynamic_buffer_v1 : boost::asio::detail::is_dynamic_buffer_v1<T> {};
> +template <typename T>
> +struct is_dynamic_buffer_v2 : boost::asio::detail::is_dynamic_buffer_v2<T> {};
> +template <typename T>
> +struct is_dynamic_buffer : boost::asio::is_dynamic_buffer_v1<T> {};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace system {
> +template <class T> struct is_error_code_enum {};
> +} // namespace system
> +} // namespace boost
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp> struct atomic {
> + private:
> + static constexpr int _S_min_alignment = (sizeof(_Tp) & (sizeof(_Tp) - 1)) ||
> + sizeof(_Tp) > 16
> + ? 0
> + : sizeof(_Tp);
> + static constexpr int _S_alignment = _S_min_alignment > alignof(_Tp)
> + ? _S_min_alignment
> + : alignof(_Tp);
> + alignas(_S_alignment) _Tp _M_i = _Tp();
> +
> + public:
> + constexpr atomic(_Tp __i) noexcept : _M_i(__i) {}
> + };
> +} // namespace )
> +namespace boost {
> +namespace system {
> +namespace detail {
> +template <bool C, class T = void> struct enable_if { typedef T type; };
> +template <class T> struct enable_if<false, T> {};
> +} // namespace detail
> +} // namespace system
> +} // namespace boost
> +namespace boost {
> +namespace system {
> +template <class T> struct is_error_condition_enum {};
> +class error_code {
> +private:
> +private:
> + struct data {};
> + union {};
> +
> +public:
> + constexpr error_code();
> + template <class ErrorCodeEnum>
> + constexpr error_code(
> + ErrorCodeEnum e,
> + typename detail::enable_if<
> + is_error_code_enum<ErrorCodeEnum>::value ||
> + std::is_error_code_enum<ErrorCodeEnum>::value>::type * = 0);
> + std::string message() const;
> + constexpr explicit operator bool() const noexcept;
> + friend bool operator==(error_code const &lhs,
> + std::error_code const &rhs) noexcept;
> + template <class E, class N = typename detail::enable_if<
> + std::is_error_condition_enum<E>::value>::type>
> + inline friend bool operator==(E lhs, error_code const &rhs) noexcept {}
> + operator std::error_code() const;
> +};
> +} // namespace system
> +namespace system {
> +class __attribute__((__visibility__("default"))) system_error
> + : public std::runtime_error {
> +private:
> +public:
> +};
> +} // namespace system
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +using error_code = boost::system::error_code;
> +enum class error { timeout = 1 };
> +enum class condition { timeout = 1 };
> +} // namespace beast
> +namespace system {
> +template <> struct is_error_code_enum<::boost::beast::error> {
> + static bool const value = true;
> +};
> +} // namespace system
> +namespace mp11 {
> +template <class T, T... I> struct integer_sequence {};
> +namespace detail {
> +template <bool C, class T, class E> struct iseq_if_c_impl;
> +template <bool C, class T, class E>
> +using iseq_if_c = typename iseq_if_c_impl<C, T, E>::type;
> +template <class T> struct iseq_identity {};
> +template <class T, T N> struct make_integer_sequence_impl;
> +template <class T, T N> struct make_integer_sequence_impl_ {};
> +} // namespace detail
> +template <class T, T N>
> +using make_integer_sequence =
> + typename detail::make_integer_sequence_impl<T, N>::type;
> +template <bool B> using mp_bool = std::integral_constant<bool, B>;
> +template <class T> using mp_not = mp_bool<!T::value>;
> +template <class... T> struct mp_list {};
> +namespace detail {
> +template <class L> struct mp_front_impl {};
> +} // namespace detail
> +namespace detail {
> +template <class A, template <class...> class B> struct mp_rename_impl {};
> +} // namespace detail
> +namespace detail {
> +template <bool C, class T, class... E> struct mp_if_c_impl {};
> +} // namespace detail
> +template <class C, class T, class... E>
> +using mp_if =
> + typename detail::mp_if_c_impl<static_cast<bool>(C::value), T, E...>::type;
> +namespace detail {
> +template <template <class...> class F, class... T> struct mp_valid_impl {};
> +} // namespace detail
> +template <template <class...> class F, class... T>
> +using mp_valid = typename detail::mp_valid_impl<F, T...>::type;
> +namespace detail {
> +template <bool C, class T, template <class...> class F, class... U>
> +struct mp_eval_if_c_impl;
> +template <class... L> struct mp_append_impl;
> +template <class L1 = mp_list<>, class L2 = mp_list<>, class L3 = mp_list<>,
> + class L4 = mp_list<>, class L5 = mp_list<>, class L6 = mp_list<>,
> + class L7 = mp_list<>, class L8 = mp_list<>, class L9 = mp_list<>,
> + class L10 = mp_list<>, class L11 = mp_list<>>
> +struct append_11_impl {};
> +template <class L> struct mp_size_impl {};
> +} // namespace detail
> +template <class L> using mp_size = typename detail::mp_size_impl<L>::type;
> +namespace detail {
> +template <class L1, class L2> struct mp_assign_impl;
> +template <template <class...> class L1, class... T,
> + template <class...> class L2, class... U>
> +struct mp_assign_impl<L1<T...>, L2<U...>> {};
> +} // namespace detail
> +namespace detail {
> +template <class L, template <class...> class F>
> +struct mp_transform_third_impl {};
> +} // namespace detail
> +namespace detail {
> +template <class... T> struct mp_same_impl;
> +}
> +template <class... T> using mp_same = typename detail::mp_same_impl<T...>::type;
> +namespace detail {
> +template <template <class...> class F, class... L> struct mp_transform_impl {};
> +struct list_size_mismatch {};
> +} // namespace detail
> +template <template <class...> class F, class... L>
> +using mp_transform =
> + typename mp_if<mp_same<mp_size<L>...>, detail::mp_transform_impl<F, L...>,
> + detail::list_size_mismatch>::type;
> +namespace detail {
> +template <class L, std::size_t I> struct mp_at_c_impl {};
> +} // namespace detail
> +} // namespace mp11
> +} // namespace boost
> +namespace boost {
> +template <class T> struct remove_cv {};
> +} // namespace boost
> +namespace boost {
> +namespace mpl {}
> +template <class T, T val> struct integral_constant {};
> +template <bool val> struct integral_constant<bool, val> {};
> +typedef integral_constant<bool, true> true_type;
> +typedef integral_constant<bool, false> false_type;
> +template <class T> struct is_const : public false_type {};
> +template <class T> struct is_volatile : public false_type {};
> +template <bool b, class T, class U> struct conditional {};
> +template <class T, class U> struct copy_cv {};
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace detail {
> +template <std::size_t I, class T> struct tuple_element_impl {};
> +} // namespace detail
> +} // namespace beast
> +namespace asio {
> +namespace traits {}
> +} // namespace asio
> +} // namespace boost
> +namespace boost_asio_execution_execute_fn {
> +enum overload_type { call_member, call_free, adapter, ill_formed };
> +template <typename Impl, typename T, typename F, typename = void,
> + typename = void, typename = void, typename = void, typename = void>
> +struct call_traits {};
> +struct impl {
> + template <typename T> struct proxy {};
> +};
> +template <typename T = impl> struct static_instance {};
> +} // namespace boost_asio_execution_execute_fn
> +namespace boost {
> +namespace asio {
> +namespace execution {
> +namespace {}
> +typedef boost_asio_execution_execute_fn::impl execute_t;
> +template <typename T, typename F>
> +struct can_execute
> + : integral_constant<bool, boost_asio_execution_execute_fn::call_traits<
> + execute_t, T, void(F)>::overload !=
> + boost_asio_execution_execute_fn::ill_formed> {
> +};
> +} // namespace execution
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace execution {
> +struct invocable_archetype {};
> +} // namespace execution
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename = void> struct equality_comparable_default;
> +template <typename T, typename = void> struct equality_comparable;
> +} // namespace traits
> +namespace detail {
> +struct no_equality_comparable {};
> +template <typename T, typename = void>
> +struct equality_comparable_trait : no_equality_comparable {};
> +template <typename T>
> +struct equality_comparable_trait<
> + T, typename void_type<
> + decltype(static_cast<void>(static_cast<bool>(declval<const T>() ==
> + declval<const T>())),
> + static_cast<void>(static_cast<bool>(
> + declval<const T>() != declval<const T>())))>::type> {};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace execution {
> +namespace detail {
> +template <typename T, typename F, typename = void, typename = void,
> + typename = void, typename = void, typename = void, typename = void,
> + typename = void, typename = void>
> +struct is_executor_of_impl : false_type {};
> +template <typename T, typename F>
> +struct is_executor_of_impl<
> + T, F,
> + typename enable_if<
> + can_execute<typename add_const<T>::type, F>::value>::type,
> + typename void_type<
> + typename result_of<typename decay<F>::type &()>::type>::type,
> + typename enable_if<
> + is_constructible<typename decay<F>::type, F>::value>::type,
> + typename enable_if<
> + is_move_constructible<typename decay<F>::type>::value>::type,
> + typename enable_if<is_nothrow_copy_constructible<T>::value>::type,
> + typename enable_if<is_nothrow_destructible<T>::value>::type,
> + typename enable_if<traits::equality_comparable<T>::is_valid>::type,
> + typename enable_if<traits::equality_comparable<T>::is_noexcept>::type>
> + : true_type {};
> +template <typename T, typename = void> struct executor_shape {};
> +template <typename T, typename Default, typename = void>
> +struct executor_index {};
> +} // namespace detail
> +template <typename T>
> +struct is_executor : detail::is_executor_of_impl<T, invocable_archetype> {};
> +template <typename T, typename F>
> +struct is_executor_of
> + : integral_constant<bool, is_executor<T>::value &&
> + detail::is_executor_of_impl<T, F>::value> {};
> +template <typename T> struct executor_shape : detail::executor_shape<T> {};
> +} // namespace execution
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +struct executor_memfns_base {
> + void context();
> + void on_work_started();
> + void on_work_finished();
> + void dispatch();
> + void post();
> + void defer();
> +};
> +template <typename T>
> +struct executor_memfns_derived : T, executor_memfns_base {};
> +template <typename T, T> struct executor_memfns_check {};
> +template <typename T>
> +char context_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::context> *);
> +template <typename T>
> +char on_work_started_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::on_work_started> *);
> +template <typename T>
> +char on_work_finished_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::on_work_finished> *);
> +template <typename T>
> +char dispatch_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::dispatch> *);
> +template <typename T>
> +char post_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::post> *);
> +template <typename T>
> +char defer_memfn_helper(
> + executor_memfns_check<void (executor_memfns_base::*)(),
> + &executor_memfns_derived<T>::defer> *);
> +template <typename T>
> +struct is_executor_class
> + : integral_constant<bool,
> + sizeof(context_memfn_helper<T>(0)) != 1 &&
> + sizeof(on_work_started_memfn_helper<T>(0)) != 1 &&
> + sizeof(on_work_finished_memfn_helper<T>(0)) != 1 &&
> + sizeof(dispatch_memfn_helper<T>(0)) != 1 &&
> + sizeof(post_memfn_helper<T>(0)) != 1 &&
> + sizeof(defer_memfn_helper<T>(0)) != 1> {};
> +template <typename T>
> +struct is_executor
> + : conditional<is_class<T>::value, is_executor_class<T>, false_type>::type {
> +};
> +} // namespace detail
> +template <typename T>
> +struct is_executor : boost::asio::detail::is_executor<T> {};
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename = void> struct schedule_free_default;
> +}
> +namespace detail {
> +struct no_schedule_free {};
> +template <typename T, typename = void>
> +struct schedule_free_trait : no_schedule_free {};
> +} // namespace detail
> +namespace traits {
> +template <typename T, typename>
> +struct schedule_free_default : detail::schedule_free_trait<T> {};
> +template <typename T, typename>
> +struct schedule_free : schedule_free_default<T> {};
> +} // namespace traits
> +} // namespace asio
> +} // namespace boost
> +namespace boost_asio_execution_schedule_fn {
> +enum overload_type { identity, call_member, call_free, ill_formed };
> +template <typename S, typename = void, typename = void, typename = void>
> +struct call_traits {};
> +struct impl {};
> +template <typename T = impl> struct static_instance {};
> +} // namespace boost_asio_execution_schedule_fn
> +namespace boost {
> +namespace asio {
> +namespace execution {
> +namespace detail {
> +namespace sender_base_ns {
> +struct sender_base {};
> +} // namespace sender_base_ns
> +template <typename S, typename = void> struct sender_traits_base {};
> +template <typename S, typename = void, typename = void, typename = void>
> +struct has_sender_types : false_type {};
> +} // namespace detail
> +template <typename S> struct sender_traits : detail::sender_traits_base<S> {};
> +namespace detail {
> +template <typename S, typename = void> struct has_sender_traits : true_type {};
> +template <typename S>
> +struct has_sender_traits<
> + S, typename enable_if<
> + is_same<typename boost::asio::execution::sender_traits<
> + S>::asio_execution_sender_traits_base_is_unspecialised,
> + void>::value>::type> : false_type {};
> +} // namespace detail
> +template <typename T>
> +struct is_sender
> + : conditional<
> + detail::has_sender_traits<typename remove_cvref<T>::type>::value,
> + is_move_constructible<typename remove_cvref<T>::type>,
> + false_type>::type {};
> +} // namespace execution
> +} // namespace asio
> +enum overload_type {};
> +struct impl {};
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +template <typename T, typename Property, typename = void>
> +struct is_applicable_property_trait : false_type {};
> +template <typename T, typename Property>
> +struct is_applicable_property_trait<
> + T, Property,
> + typename void_type<typename enable_if<
> + !!Property::template is_applicable_property_v<T>>::type>::type>
> + : true_type {};
> +} // namespace detail
> +template <typename T, typename Property, typename = void>
> +struct is_applicable_property
> + : detail::is_applicable_property_trait<T, Property> {};
> +namespace traits {
> +template <typename T, typename Property, typename = void>
> +struct query_static_constexpr_member;
> +}
> +namespace detail {
> +struct no_query_static_constexpr_member {};
> +} // namespace detail
> +namespace traits {
> +template <typename T, typename Property, typename = void> struct static_query;
> +}
> +namespace detail {}
> +} // namespace asio
> +namespace asio {
> +namespace execution {
> +template <typename ProtoAllocator> struct allocator_t {
> + template <typename T> struct static_proxy {};
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<typename static_proxy<T>::type,
> + allocator_t> {};
> + ;
> +};
> +} // namespace execution
> +namespace traits {}
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +class noncopyable {
> +private:
> +};
> +} // namespace detail
> +using boost::asio::detail::noncopyable;
> +} // namespace asio
> +namespace asio {
> +namespace detail {}
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename Property, typename = void> struct prefer_free;
> +}
> +namespace detail {
> +struct no_prefer_free {};
> +} // namespace detail
> +namespace traits {
> +template <typename T, typename Property, typename = void> struct prefer_member;
> +}
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename Property, typename = void> struct require_free;
> +}
> +namespace detail {
> +struct no_require_free {};
> +template <typename T, typename Property, typename = void>
> +struct require_free_trait : no_require_free {};
> +template <typename T, typename Property>
> +struct require_free_trait<T, Property,
> + typename void_type<decltype(require(
> + declval<T>(), declval<Property>()))>::type> {};
> +} // namespace detail
> +namespace traits {
> +template <typename T, typename Property, typename>
> +struct require_free_default : detail::require_free_trait<T, Property> {};
> +template <typename T, typename Property, typename = void> struct require_member;
> +} // namespace traits
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename Property, typename = void>
> +struct static_require_default;
> +template <typename T, typename Property, typename = void> struct static_require;
> +} // namespace traits
> +namespace detail {
> +struct no_static_require {};
> +template <typename T, typename Property, typename = void>
> +struct static_require_trait
> + : conditional<
> + is_same<T, typename decay<T>::type>::value &&
> + is_same<Property, typename decay<Property>::type>::value,
> + no_static_require,
> + traits::static_require<typename decay<T>::type,
> + typename decay<Property>::type>>::type {};
> +template <typename T, typename Property>
> +struct static_require_trait<
> + T, Property,
> + typename enable_if<decay<Property>::type::value() ==
> + traits::static_query<T, Property>::value()>::type> {};
> +} // namespace detail
> +namespace traits {
> +template <typename T, typename Property, typename>
> +struct static_require_default : detail::static_require_trait<T, Property> {};
> +template <typename T, typename Property, typename>
> +struct static_require : static_require_default<T, Property> {};
> +} // namespace traits
> +} // namespace asio
> +} // namespace boost
> +namespace boost_asio_prefer_fn {
> +using boost::asio::decay;
> +using boost::asio::enable_if;
> +using boost::asio::is_applicable_property;
> +using boost::asio::traits::prefer_free;
> +using boost::asio::traits::prefer_member;
> +using boost::asio::traits::require_free;
> +using boost::asio::traits::require_member;
> +using boost::asio::traits::static_require;
> +enum overload_type {
> + identity,
> + call_require_member,
> + call_require_free,
> + call_prefer_member,
> + call_prefer_free,
> + two_props,
> + n_props,
> + ill_formed
> +};
> +template <typename Impl, typename T, typename Properties, typename = void,
> + typename = void, typename = void, typename = void, typename = void,
> + typename = void, typename = void>
> +struct call_traits {};
> +template <typename Impl, typename T, typename Property>
> +struct call_traits<
> + Impl, T, void(Property),
> + typename enable_if<is_applicable_property<
> + typename decay<T>::type, typename decay<Property>::type>::value>::type,
> + typename enable_if<decay<Property>::type::is_preferable>::type,
> + typename enable_if<!static_require<T, Property>::is_valid>::type,
> + typename enable_if<!require_member<typename Impl::template proxy<T>::type,
> + Property>::is_valid>::type,
> + typename enable_if<!require_free<T, Property>::is_valid>::type,
> + typename enable_if<!prefer_member<typename Impl::template proxy<T>::type,
> + Property>::is_valid>::type,
> + typename enable_if<!prefer_free<T, Property>::is_valid>::type> {};
> +template <typename Impl, typename T, typename P0, typename P1, typename... PN>
> +struct call_traits<
> + Impl, T, void(P0, P1, PN...),
> + typename enable_if<call_traits<Impl, T, void(P0)>::overload !=
> + ill_formed>::type,
> + typename enable_if<
> + call_traits<Impl, typename call_traits<Impl, T, void(P0)>::result_type,
> + void(P1, PN...)>::overload != ill_formed>::type> {};
> +struct impl {};
> +template <typename T = impl> struct static_instance {};
> +} // namespace boost_asio_prefer_fn
> +namespace boost {
> +namespace asio {
> +typedef boost_asio_prefer_fn::impl prefer_t;
> +template <typename T, typename... Properties>
> +struct can_prefer
> + : integral_constant<bool, boost_asio_prefer_fn::call_traits<
> + prefer_t, T, void(Properties...)>::overload !=
> + boost_asio_prefer_fn::ill_formed> {};
> +template <typename T, typename... Properties> struct prefer_result {};
> +} // namespace asio
> +namespace asio {
> +namespace traits {
> +template <typename T, typename Property, typename = void>
> +struct query_member_default;
> +template <typename T, typename Property, typename = void> struct query_member;
> +} // namespace traits
> +namespace detail {
> +struct no_query_member {};
> +template <typename T, typename Property, typename = void>
> +struct query_member_trait : no_query_member {};
> +template <typename T, typename Property>
> +struct query_member_trait<T, Property,
> + typename void_type<decltype(declval<T>().query(
> + declval<Property>()))>::type> {};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace traits {
> +template <typename T, typename Property, typename = void> struct query_free;
> +}
> +namespace detail {
> +struct no_query_free {};
> +template <typename T, typename Property, typename = void>
> +struct query_free_trait : no_query_free {};
> +template <typename T, typename Property>
> +struct query_free_trait<T, Property,
> + typename void_type<decltype(query(
> + declval<T>(), declval<Property>()))>::type> {};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost_asio_query_fn {
> +using boost::asio::enable_if;
> +enum overload_type { static_value, call_member, call_free, ill_formed };
> +template <typename Impl, typename T, typename Properties, typename = void,
> + typename = void, typename = void, typename = void>
> +struct call_traits {};
> +struct impl {
> + template <typename T> struct proxy {};
> + template <typename T, typename Property>
> + [[nodiscard]] constexpr typename enable_if<
> + call_traits<impl, T, void(Property)>::overload == call_free,
> + typename call_traits<impl, T, void(Property)>::result_type>::type
> + operator()(T &&t, Property &&p) const
> + noexcept(((call_traits<impl, T, void(Property)>::is_noexcept))) {}
> +};
> +} // namespace boost_asio_query_fn
> +namespace boost {
> +namespace asio {
> +namespace {}
> +typedef boost_asio_query_fn::impl query_t;
> +template <typename T, typename Property>
> +struct can_query
> + : integral_constant<bool, boost_asio_query_fn::call_traits<
> + query_t, T, void(Property)>::overload !=
> + boost_asio_query_fn::ill_formed> {};
> +} // namespace asio
> +} // namespace boost
> +namespace boost_asio_require_fn {
> +enum overload_type {
> + identity,
> + call_member,
> + call_free,
> + two_props,
> + n_props,
> + ill_formed
> +};
> +template <typename Impl, typename T, typename Properties, typename = void,
> + typename = void, typename = void, typename = void, typename = void>
> +struct call_traits {};
> +struct impl {};
> +} // namespace boost_asio_require_fn
> +namespace boost {
> +namespace asio {
> +namespace {}
> +typedef boost_asio_require_fn::impl require_t;
> +template <typename T, typename... Properties>
> +struct can_require
> + : integral_constant<bool,
> + boost_asio_require_fn::call_traits<
> + require_t, T, void(Properties...)>::overload !=
> + boost_asio_require_fn::ill_formed> {};
> +} // namespace asio
> +namespace asio {
> +namespace execution {
> +namespace detail {
> +namespace blocking {
> +template <int I> struct possibly_t;
> +template <int I> struct always_t;
> +template <int I> struct never_t;
> +} // namespace blocking
> +namespace blocking_adaptation {}
> +template <int I = 0> struct blocking_t {
> + typedef detail::blocking::possibly_t<I> possibly_t;
> + typedef detail::blocking::never_t<I> never_t;
> + template <typename T> struct proxy {};
> + template <typename T> struct static_proxy {
> + struct type {};
> + };
> + template <typename T>
> + struct query_member
> + : traits::query_member<typename proxy<T>::type, blocking_t> {};
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<typename static_proxy<T>::type,
> + blocking_t> {};
> +};
> +namespace blocking {
> +template <int I = 0> struct possibly_t {
> + template <typename T>
> + struct query_member
> + : traits::query_member<typename blocking_t<I>::template proxy<T>::type,
> + possibly_t> {};
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<
> + typename blocking_t<I>::template static_proxy<T>::type,
> + possibly_t> {};
> + ;
> +};
> +template <int I = 0> struct always_t {
> + template <typename T>
> + struct query_member
> + : traits::query_member<typename blocking_t<I>::template proxy<T>::type,
> + always_t> {};
> +};
> +} // namespace blocking
> +} // namespace detail
> +typedef detail::blocking_t<> blocking_t;
> +} // namespace execution
> +} // namespace asio
> +namespace asio {
> +namespace execution {
> +template <typename... SupportableProperties> class any_executor;
> +template <typename U> struct context_as_t;
> +namespace detail {
> +template <typename T, typename = void> struct is_requirable : false_type {};
> +template <typename T>
> +struct is_requirable<T, typename enable_if<T::is_requirable>::type>
> + : true_type {};
> +template <typename T, typename = void> struct is_preferable : false_type {};
> +template <typename T>
> +struct is_preferable<T, typename enable_if<T::is_preferable>::type>
> + : true_type {};
> +template <typename T> struct is_context_as : false_type {};
> +template <typename U> struct is_context_as<context_as_t<U>> : true_type {};
> +template <std::size_t I, typename Props> struct supportable_properties;
> +template <std::size_t I, typename Prop>
> +struct supportable_properties<I, void(Prop)> {
> + template <typename T>
> + struct is_valid_target
> + : integral_constant<
> + bool,
> + (is_requirable<Prop>::value ? can_require<T, Prop>::value : true) &&
> + (is_preferable<Prop>::value ? can_prefer<T, Prop>::value
> + : true) &&
> + (!is_requirable<Prop>::value && !is_preferable<Prop>::value
> + ? can_query<T, Prop>::value
> + : true)> {};
> + struct found {};
> +};
> +template <std::size_t I, typename Head, typename... Tail>
> +struct supportable_properties<I, void(Head, Tail...)> {
> + template <typename T>
> + struct is_valid_target
> + : integral_constant<bool, (supportable_properties<I, void(Head)>::
> + template is_valid_target<T>::value &&
> + supportable_properties<I + 1, void(Tail...)>::
> + template is_valid_target<T>::value)> {};
> + struct find_context_as_property
> + : conditional<is_context_as<Head>::value,
> + typename supportable_properties<I, void(Head)>::found,
> + typename supportable_properties<
> + I + 1, void(Tail...)>::find_context_as_property>::type {
> + };
> +};
> +template <typename T, typename Props>
> +struct is_valid_target_executor
> + : conditional<is_executor<T>::value,
> + typename supportable_properties<
> + 0, Props>::template is_valid_target<T>,
> + false_type>::type {};
> +template <typename Props>
> +struct is_valid_target_executor<int, Props> : false_type {};
> +class any_executor_base {
> +public:
> + ;
> + struct unspecified_bool_type_t {};
> +};
> +template <typename Derived, typename Property, typename = void>
> +struct any_executor_context {};
> +template <typename Derived, typename Property>
> +struct any_executor_context<Derived, Property,
> + typename enable_if<Property::value>::type> {};
> +} // namespace detail
> +template <> class any_executor<> : public detail::any_executor_base {};
> +template <typename... SupportableProperties>
> +class any_executor
> + : public detail::any_executor_base,
> + public detail::any_executor_context<
> + any_executor<SupportableProperties...>,
> + typename detail::supportable_properties<
> + 0, void(SupportableProperties...)>::find_context_as_property> {};
> +} // namespace execution
> +namespace detail {
> +void do_throw_error(const boost::system::error_code &err, const char *location);
> +}
> +} // namespace asio
> +} // namespace boost
> +extern "C" {
> +typedef unsigned short int sa_family_t;
> +struct sockaddr {};
> +struct linger {};
> +enum { SHUT_RD = 0, SHUT_WR, SHUT_RDWR };
> +struct ipv6_mreq {};
> +struct addrinfo {};
> +}
> +namespace boost {
> +namespace asio {
> +namespace error {
> +enum basic_errors {
> + access_denied = 13,
> + address_family_not_supported = 97,
> + address_in_use = 98,
> + already_connected = 106,
> + already_started = 114,
> + broken_pipe = 32,
> + connection_aborted = 103,
> + connection_refused = 111,
> + connection_reset = 104,
> + bad_descriptor = 9,
> + fault = 14,
> + host_unreachable = 113,
> + in_progress = 115,
> + interrupted = 4,
> + invalid_argument = 22,
> + message_size = 90,
> + name_too_long = 36,
> + network_down = 100,
> + network_reset = 102,
> + network_unreachable = 101,
> + no_descriptors = 24,
> + no_buffer_space = 105,
> + no_memory = 12,
> + no_permission = 1,
> + no_protocol_option = 92,
> + no_such_device = 19,
> + not_connected = 107,
> + not_socket = 88,
> + operation_aborted = 125,
> + operation_not_supported = 95,
> + shut_down = 108,
> + timed_out = 110,
> + try_again = 11,
> + would_block = 11
> +};
> +enum netdb_errors {
> + host_not_found = 1,
> + host_not_found_try_again = 2,
> + no_data = 4,
> + no_recovery = 3
> +};
> +enum addrinfo_errors { service_not_found = -8, socket_type_not_supported = -7 };
> +} // namespace error
> +} // namespace asio
> +namespace system {
> +template <> struct is_error_code_enum<boost::asio::error::basic_errors> {
> + static const bool value = true;
> +};
> +} // namespace system
> +namespace asio {
> +namespace detail {
> +template <typename Mutex> class scoped_lock : private noncopyable {
> +public:
> + enum adopt_lock_t { adopt_lock };
> +};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +class posix_mutex : private noncopyable {};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +typedef posix_mutex mutex;
> +}
> +} // namespace asio
> +} // namespace boost
> +namespace std __attribute__((__visibility__("default"))) {
> + class bad_any_cast : public bad_cast {
> + public:
> + };
> + class any {
> + private:
> + enum _Op {
> + _Op_access,
> + _Op_get_type_info,
> + _Op_clone,
> + _Op_destroy,
> + _Op_xfer
> + };
> + union _Arg {};
> + };
> +} // namespace )
> +namespace boost {
> +namespace asio {
> +namespace execution {
> +namespace detail {
> +template <int I = 0> struct context_t {
> + template <typename T> struct static_proxy {};
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<typename static_proxy<T>::type,
> + context_t> {};
> + template <typename T>
> + static constexpr typename query_static_constexpr_member<T>::result_type
> + static_query() noexcept(((query_static_constexpr_member<T>::is_noexcept)));
> + template <typename E, typename T = decltype(context_t::static_query<E>())>
> + static constexpr const T static_query_v = context_t::static_query<E>();
> +};
> +} // namespace detail
> +} // namespace execution
> +namespace execution {
> +namespace detail {
> +namespace mapping {};
> +namespace outstanding_work {
> +template <int I> struct untracked_t;
> +template <int I> struct tracked_t;
> +} // namespace outstanding_work
> +template <int I = 0> struct outstanding_work_t {
> + typedef detail::outstanding_work::untracked_t<I> untracked_t;
> + typedef detail::outstanding_work::tracked_t<I> tracked_t;
> + constexpr outstanding_work_t() : value_(-1) {}
> + template <typename T> struct proxy {
> + struct type {};
> + };
> + template <typename T> struct static_proxy {
> + struct type {};
> + };
> +
> +private:
> + int value_;
> +};
> +namespace outstanding_work {
> +template <int I = 0> struct untracked_t {
> + template <typename T>
> + struct query_member
> + : traits::query_member<
> + typename outstanding_work_t<I>::template proxy<T>::type,
> + untracked_t> {};
> +};
> +} // namespace outstanding_work
> +} // namespace detail
> +typedef detail::outstanding_work_t<> outstanding_work_t;
> +constexpr outstanding_work_t outstanding_work;
> +} // namespace execution
> +namespace execution {
> +namespace detail {
> +template <typename InnerProperty, typename = void>
> +struct prefer_only_is_preferable {};
> +template <typename InnerProperty, typename = void>
> +struct prefer_only_polymorphic_query_result_type {};
> +template <typename InnerProperty, typename = void>
> +struct prefer_only_property {};
> +} // namespace detail
> +template <typename InnerProperty>
> +struct prefer_only
> + : detail::prefer_only_is_preferable<InnerProperty>,
> + detail::prefer_only_polymorphic_query_result_type<InnerProperty>,
> + detail::prefer_only_property<InnerProperty> {
> + template <typename T>
> + static constexpr typename traits::static_query<T, InnerProperty>::result_type
> + static_query() noexcept(
> + ((traits::static_query<T, InnerProperty>::is_noexcept)));
> + template <typename E, typename T = decltype(prefer_only::static_query<E>())>
> + static constexpr const T static_query_v = prefer_only::static_query<E>();
> +};
> +} // namespace execution
> +template <typename T, typename InnerProperty>
> +struct is_applicable_property<T, execution::prefer_only<InnerProperty>>
> + : is_applicable_property<T, InnerProperty> {};
> +namespace traits {}
> +} // namespace asio
> +namespace asio {
> +namespace execution {
> +namespace detail {
> +namespace relationship {
> +template <int I> struct fork_t;
> +template <int I> struct continuation_t;
> +} // namespace relationship
> +template <int I = 0> struct relationship_t {
> + typedef detail::relationship::fork_t<I> fork_t;
> + typedef detail::relationship::continuation_t<I> continuation_t;
> +};
> +namespace relationship {
> +template <int I = 0> struct fork_t {
> + template <typename T>
> + struct query_member
> + : traits::query_member<
> + typename relationship_t<I>::template proxy<T>::type, fork_t> {};
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<
> + typename relationship_t<I>::template static_proxy<T>::type,
> + fork_t> {};
> + template <typename T>
> + static constexpr fork_t static_query(
> + typename enable_if<!query_static_constexpr_member<T>::is_valid>::type * =
> + 0,
> + typename enable_if<!query_member<T>::is_valid>::type * = 0,
> + typename enable_if<!traits::query_free<T, fork_t>::is_valid>::type * = 0,
> + typename enable_if<!can_query<T, continuation_t<I>>::value>::type * =
> + 0) noexcept;
> + template <typename E, typename T = decltype(fork_t::static_query<E>())>
> + static constexpr const T static_query_v = fork_t::static_query<E>();
> +};
> +template <int I = 0> struct continuation_t {
> + template <typename T>
> + struct query_static_constexpr_member
> + : traits::query_static_constexpr_member<
> + typename relationship_t<I>::template static_proxy<T>::type,
> + continuation_t> {};
> + template <typename T>
> + static constexpr typename query_static_constexpr_member<T>::result_type
> + static_query() noexcept(((query_static_constexpr_member<T>::is_noexcept)));
> + template <typename E,
> + typename T = decltype(continuation_t::static_query<E>())>
> + static constexpr const T static_query_v = continuation_t::static_query<E>();
> +};
> +} // namespace relationship
> +} // namespace detail
> +typedef detail::relationship_t<> relationship_t;
> +} // namespace execution
> +namespace traits {}
> +template <typename Blocking, typename Relationship, typename Allocator>
> +class basic_system_executor {};
> +typedef basic_system_executor<execution::blocking_t::possibly_t,
> + execution::relationship_t::fork_t,
> + std::allocator<void>>
> + system_executor;
> +namespace traits {}
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +class scheduler_operation {};
> +class service_registry;
> +} // namespace detail
> +class execution_context : private noncopyable {
> +public:
> + class id;
> + class service;
> +};
> +class execution_context::id : private noncopyable {};
> +class execution_context::service : private noncopyable {};
> +namespace detail {
> +template <typename Type> class service_id : public execution_context::id {};
> +template <typename Type>
> +class execution_context_service_base : public execution_context::service {
> +public:
> + static service_id<Type> id;
> +};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +template <typename T> struct is_completion_signature : false_type {};
> +template <typename R, typename... Args>
> +struct is_completion_signature<R(Args...)> : true_type {};
> +template <typename R, typename... Args>
> +struct is_completion_signature<R(Args...) &noexcept> : true_type {};
> +template <typename R, typename... Args>
> +struct is_completion_signature<R(Args...) &&noexcept> : true_type {};
> +template <typename... T> struct are_completion_signatures : false_type {};
> +template <typename T0>
> +struct are_completion_signatures<T0> : is_completion_signature<T0> {};
> +template <typename T0, typename... TN>
> +struct are_completion_signatures<T0, TN...>
> + : integral_constant<bool, (is_completion_signature<T0>::value &&
> + are_completion_signatures<TN...>::value)> {};
> +template <typename T, typename... Args>
> +concept callable_with = requires(T &&t, Args &&...args) {
> + static_cast<T &&>(t)(static_cast<Args &&>(args)...);
> +};
> +template <typename T, typename... Signatures>
> +struct is_completion_handler_for : false_type {};
> +template <typename T, typename R, typename... Args>
> +struct is_completion_handler_for<T, R(Args...)>
> + : integral_constant<bool, (callable_with<T, Args...>)> {};
> +} // namespace detail
> +template <typename T>
> +concept completion_signature = detail::is_completion_signature<T>::value;
> +namespace detail {
> + template <typename T> struct is_simple_completion_signature : false_type {};
> + template <typename T> struct simple_completion_signature;
> + template <typename R, typename... Args>
> + struct is_simple_completion_signature<R(Args...)> : true_type {};
> + template <typename... Signatures>
> + struct are_simple_completion_signatures : false_type {};
> + template <typename Sig0>
> + struct are_simple_completion_signatures<Sig0>
> + : is_simple_completion_signature<Sig0> {};
> + template <typename Sig0, typename... SigN>
> + struct are_simple_completion_signatures<Sig0, SigN...>
> + : integral_constant<bool,
> + (is_simple_completion_signature<Sig0>::value &&
> + are_simple_completion_signatures<SigN...>::value)> {
> + };
> + template <typename R, typename... Args>
> + struct simple_completion_signature<R(Args...)> {};
> + template <typename CompletionToken,
> + ::boost::asio::completion_signature... Signatures>
> + class completion_handler_async_result {
> + private:
> + };
> +} // namespace detail
> +template <typename CompletionToken,
> + ::boost::asio::completion_signature... Signatures>
> +class async_result
> + : public conditional<
> + detail::are_simple_completion_signatures<Signatures...>::value,
> + detail::completion_handler_async_result<CompletionToken,
> + Signatures...>,
> + async_result<CompletionToken, typename boost::asio::detail::
> + simple_completion_signature<
> + Signatures>::type...>>::type {};
> +namespace detail {
> +template <typename CompletionToken,
> + ::boost::asio::completion_signature... Signatures>
> +struct async_result_helper
> + : async_result<typename decay<CompletionToken>::type, Signatures...> {};
> +struct async_result_memfns_base {
> + void initiate();
> +};
> +template <typename T>
> +struct async_result_memfns_derived : T, async_result_memfns_base {};
> +template <typename T, T> struct async_result_memfns_check {};
> +template <typename T>
> +char async_result_initiate_memfn_helper(
> + async_result_memfns_check<void (async_result_memfns_base::*)(),
> + &async_result_memfns_derived<T>::initiate> *);
> +template <typename CompletionToken,
> + ::boost::asio::completion_signature... Signatures>
> +struct async_result_has_initiate_memfn
> + : integral_constant<
> + bool, sizeof(async_result_initiate_memfn_helper<
> + async_result<typename decay<CompletionToken>::type,
> + Signatures...>>(0)) != 1> {};
> +}; // namespace detail
> +template <typename CompletionToken,
> + ::boost::asio::completion_signature... Signatures,
> + typename Initiation, typename... Args>
> +inline typename constraint<
> + !detail::async_result_has_initiate_memfn<CompletionToken,
> + Signatures...>::value,
> + typename ::boost::asio::async_result<
> + typename ::boost::asio::decay<CompletionToken>::type,
> + Signatures...>::return_type>::type
> +async_initiate(Initiation &&initiation, CompletionToken &token,
> + Args &&...args) {}
> +namespace detail {
> +template <typename... Signatures> struct initiation_archetype {};
> +} // namespace detail
> +template <typename T, typename... Signatures>
> +concept completion_token_for =
> + detail::are_completion_signatures<Signatures...>::value && requires(T &&t) {
> + async_initiate<T, Signatures...>(
> + detail::initiation_archetype<Signatures...>{}, t);
> +};
> +namespace detail {
> + template <typename T, typename = void> struct default_completion_token_impl {
> + typedef void type;
> + };
> +} // namespace detail
> +template <typename T>
> +struct default_completion_token : detail::default_completion_token_impl<T> {};
> +namespace detail {
> +class conditionally_enabled_mutex : private noncopyable {
> +public:
> + class scoped_lock : private noncopyable {
> + public:
> + enum adopt_lock_t { adopt_lock };
> + };
> +};
> +class scheduler_task {
> +public:
> +protected:
> +};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {}
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +typedef scheduler_operation operation;
> +typedef int socket_type;
> +typedef addrinfo addrinfo_type;
> +typedef ::linger linger_type;
> +typedef int ioctl_arg_type;
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +class timer_queue_base : private noncopyable {};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {}
> +namespace detail {}
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <typename T, typename Executor> struct associated_executor;
> +}
> +} // namespace boost
> +namespace boost {
> +template <class...> struct make_void { typedef void type; };
> +template <class... Ts> using void_t = typename make_void<Ts...>::type;
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace detail {}
> +} // namespace beast
> +namespace beast {
> +namespace detail {
> +template <typename T> struct static_const { static constexpr T value{}; };
> +} // namespace detail
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {}
> +} // namespace boost
> +namespace malloy {
> +using boost::asio::buffer;
> +[[nodiscard]] inline std::vector<std::string_view>
> +split(std::string_view str, std::string_view delimiter) {}
> +} // namespace malloy
> +namespace boost {
> +namespace beast {
> +namespace detail {
> +template <class Alloc> using allocator_traits = std::allocator_traits<Alloc>;
> +struct stable_base {
> +protected:
> +};
> +} // namespace detail
> +} // namespace beast
> +namespace detail {
> +template <typename T> struct alignment_of_hack {};
> +}; // namespace detail
> +} // namespace boost
> +namespace boost {
> +template <class T> struct is_lvalue_reference : public false_type {};
> +} // namespace boost
> +namespace boost {
> +namespace type_traits_detail {
> +template <typename T, bool b> struct add_rvalue_reference_helper {};
> +}; // namespace type_traits_detail
> +namespace detail {
> +template <class T> struct remove_rvalue_ref { typedef T type; };
> +} // namespace detail
> +template <class T> struct remove_reference {
> + typedef typename boost::detail::remove_rvalue_ref<T>::type type;
> +};
> +} // namespace boost
> +namespace boost {
> +template <class T> struct is_function : public false_type {};
> +} // namespace boost
> +namespace boost {
> +namespace type_traits {
> +typedef char yes_type;
> +struct no_type {};
> +}; // namespace type_traits
> +template <class T> struct is_integral : public false_type {};
> +template <class T> struct is_floating_point : public false_type {};
> +template <class T>
> +struct is_arithmetic
> + : public integral_constant<bool, is_integral<T>::value ||
> + is_floating_point<T>::value> {};
> +template <class T>
> +struct is_enum : public integral_constant<bool, __is_enum(T)> {};
> +template <class T> struct is_pointer : public false_type {};
> +template <class T> struct is_member_function_pointer : public false_type {};
> +template <class T>
> +struct is_member_pointer
> + : public integral_constant<bool,
> + ::boost::is_member_function_pointer<T>::value> {
> +};
> +template <typename T>
> +struct is_scalar
> + : public integral_constant<bool, ::boost::is_arithmetic<T>::value ||
> + ::boost::is_enum<T>::value ||
> + ::boost::is_pointer<T>::value ||
> + ::boost::is_member_pointer<T>::value> {
> +};
> +namespace detail {};
> +template <class T, class U> struct is_same : public false_type {};
> +namespace detail {
> +template <typename B, typename D> struct is_base_and_derived_impl {
> + typedef typename remove_cv<B>::type ncvB;
> + typedef typename remove_cv<D>::type ncvD;
> +};
> +template <typename T> struct is_class_impl {};
> +} // namespace detail
> +template <class T>
> +struct is_class
> + : public integral_constant<bool, ::boost::detail::is_class_impl<T>::value> {
> +};
> +namespace detail {
> +struct is_constructible_imp {
> + template <typename, typename...> static boost::type_traits::no_type test(...);
> +};
> +} // namespace detail
> +template <class T, class... Args>
> +struct is_constructible
> + : public integral_constant<
> + bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) ==
> + sizeof(boost::type_traits::yes_type)> {};
> +} // namespace boost
> +namespace boost {
> +namespace move_detail {
> +template <typename T> struct voider {};
> +template <bool C, typename T1, typename T2> struct if_c { typedef T2 type; };
> +template <typename T1, typename T2, typename T3>
> +struct if_ : if_c<0 != T1::value, T2, T3> {};
> +struct enable_if_nat {};
> +template <bool B, class T = enable_if_nat> struct enable_if_c {};
> +template <class T> struct enable_if_c<false, T> {};
> +template <class Cond, class T = enable_if_nat>
> +struct enable_if : enable_if_c<Cond::value, T> {};
> +template <bool B, class T = enable_if_nat>
> +struct disable_if_c : enable_if_c<!B, T> {};
> +template <class Cond, class T = enable_if_nat>
> +struct disable_if : enable_if_c<!Cond::value, T> {};
> +template <class T, T v> struct integral_constant {};
> +template <class T, class U> struct is_same { static const bool value = true; };
> +template <class T, class U, class R = enable_if_nat>
> +struct enable_if_same : enable_if<is_same<T, U>, R> {};
> +typedef char yes_type;
> +struct no_type {};
> +template <class T> struct add_const {};
> +template <class T> struct add_lvalue_reference {};
> +template <class T> struct add_const_lvalue_reference {
> + typedef typename remove_reference<T>::type t_unreferenced;
> + typedef typename add_const<t_unreferenced>::type t_unreferenced_const;
> +};
> +template <class T> struct identity {};
> +template <class T> struct is_nullptr_t_cv {};
> +template <class T> struct is_pod_noextents_cv {};
> +template <typename T> struct alignment_of_impl {
> + static const std::size_t value = __alignof__(T);
> +};
> +template <typename T> struct alignment_of : alignment_of_impl<T> {};
> +} // namespace move_detail
> +namespace optional_detail {
> +struct init_value_tag {};
> +struct optional_tag {};
> +template <class T> class optional_base : public optional_tag {};
> +template <class T> class tc_optional_base : public optional_tag {};
> +} // namespace optional_detail
> +namespace optional_config {
> +template <typename T>
> +struct optional_uses_direct_storage_for
> + : boost::conditional<(boost::is_scalar<T>::value &&
> + !boost::is_const<T>::value &&
> + !boost::is_volatile<T>::value),
> + boost::true_type, boost::false_type>::type {};
> +} // namespace optional_config
> +template <class T>
> +class optional
> + : public boost::conditional<
> + optional_config::optional_uses_direct_storage_for<T>::value,
> + optional_detail::tc_optional_base<T>,
> + optional_detail::optional_base<T>>::type {};
> +namespace beast {
> +namespace detail {
> +template <class Executor, class Enable = void> struct select_work_guard;
> +template <class Executor>
> +using select_work_guard_t = typename select_work_guard<Executor>::type;
> +template <typename Handler, typename Arg1, typename Arg2> class move_binder2 {};
> +template <typename Executor> class initiate_post_with_executor {};
> +} // namespace detail
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +template <class T> struct use_empty_value_base {
> + enum { value = __is_empty(T) && !__is_final(T) };
> +};
> +namespace empty_ {
> +template <class T, unsigned N = 0,
> + bool E = boost::use_empty_value_base<T>::value>
> +class empty_value {};
> +} // namespace empty_
> +using empty_::empty_value;
> +namespace beast {
> +template <class Handler, class Executor1,
> + class Allocator = std::allocator<void>>
> +class async_base : private boost::empty_value<Allocator> {};
> +template <class Handler, class Executor1,
> + class Allocator = std::allocator<void>>
> +class stable_async_base : public async_base<Handler, Executor1, Allocator> {};
> +} // namespace beast
> +namespace asio {
> +class any_io_executor
> + : public execution::any_executor<
> + execution::context_as_t<execution_context &>,
> + execution::blocking_t::never_t,
> + execution::prefer_only<execution::blocking_t::possibly_t>,
> + execution::prefer_only<execution::outstanding_work_t::tracked_t>,
> + execution::prefer_only<execution::outstanding_work_t::untracked_t>,
> + execution::prefer_only<execution::relationship_t::fork_t>,
> + execution::prefer_only<execution::relationship_t::continuation_t>> {};
> +namespace traits {}
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +template <int64_t v1, int64_t v2> struct gcd {
> + enum { value = gcd<v2, v1 % v2>::value };
> +};
> +template <int64_t v1> struct gcd<v1, 0> {
> + enum {};
> +};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +enum class cancellation_type : unsigned int {
> + none = 0,
> + terminal = 1,
> + partial = 2,
> + total = 4,
> + all = 0xFFFFFFFF
> +};
> +typedef cancellation_type cancellation_type_t;
> +constexpr bool operator!(cancellation_type_t x);
> +} // namespace asio
> +namespace asio {
> +class cancellation_slot {};
> +namespace detail {
> +template <typename T, typename = void>
> +struct has_cancellation_slot_type : false_type {};
> +}; // namespace detail
> +namespace detail {
> +namespace socket_ops {}
> +} // namespace detail
> +} // namespace asio
> +namespace date_time {
> +enum special_values {
> + not_a_date_time,
> + neg_infin,
> + pos_infin,
> + min_date_time,
> + max_date_time,
> + not_special,
> + NumSpecialValues
> +};
> +}
> +namespace date_time {
> +enum time_resolutions {
> + sec,
> + tenth,
> + hundreth,
> + hundredth = hundreth,
> + milli,
> + ten_thousandth,
> + micro,
> + nano,
> + NumResolutions
> +};
> +enum dst_flags { not_dst, is_dst, calculate };
> +} // namespace date_time
> +namespace operators_impl {
> +namespace operators_detail {
> +template <typename T> class empty_base {};
> +} // namespace operators_detail
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct less_than_comparable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct less_than_comparable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct equality_comparable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct equality_comparable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct multipliable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct multipliable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct addable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct addable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct subtractable2 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct subtractable2_left : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct subtractable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct dividable2 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct dividable2_left : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct dividable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct modable2 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct modable2_left : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct modable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct xorable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct xorable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct andable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct andable1 : B {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct orable2 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct orable1 : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct incrementable : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct decrementable : B {};
> +template <class T, class P, class B = operators_detail::empty_base<T>>
> +struct dereferenceable : B {};
> +template <class T, class I, class R, class B = operators_detail::empty_base<T>>
> +struct indexable : B {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct totally_ordered1 : less_than_comparable1<T, equality_comparable1<T, B>> {
> +};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct additive2 : addable2<T, U, subtractable2<T, U, B>> {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct additive1 : addable1<T, subtractable1<T, B>> {};
> +template <class T, class U, class B = operators_detail::empty_base<T>>
> +struct multiplicative2 : multipliable2<T, U, dividable2<T, U, B>> {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct multiplicative1 : multipliable1<T, dividable1<T, B>> {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct bitwise1 : xorable1<T, andable1<T, orable1<T, B>>> {};
> +template <class T, class P, class B = operators_detail::empty_base<T>>
> +struct input_iteratable
> + : equality_comparable1<T, incrementable<T, dereferenceable<T, P, B>>> {};
> +template <class T, class B = operators_detail::empty_base<T>>
> +struct output_iteratable : incrementable<T, B> {};
> +namespace operators_detail {
> +struct true_t {};
> +struct false_t {};
> +} // namespace operators_detail
> +template <class T> struct is_chained_base {
> + typedef operators_detail::false_t value;
> +};
> +template <class T, class U = T, class B = operators_detail::empty_base<T>,
> + class O = typename is_chained_base<U>::value>
> +struct less_than_comparable;
> +template <class T, class U, class B>
> +struct less_than_comparable<T, U, B, operators_detail::false_t>
> + : less_than_comparable2<T, U, B> {};
> +template <class T, class U>
> +struct less_than_comparable<T, U, operators_detail::empty_base<T>,
> + operators_detail::true_t>
> + : less_than_comparable1<T, U> {};
> +template <class T, class U = T, class B = operators_detail::empty_base<T>,
> + class O = typename is_chained_base<U>::value>
> +struct equality_comparable;
> +template <class T, class U, class B>
> +struct equality_comparable<T, U, B, operators_detail::false_t>
> + : equality_comparable2<T, U, B> {};
> +template <class T, class B>
> +struct is_chained_base<equality_comparable1<T, B>> {};
> +} // namespace operators_impl
> +using namespace operators_impl;
> +namespace date_time {
> +template <class T, typename rep_type>
> +class __attribute__((__visibility__("default"))) time_duration
> + : private boost::less_than_comparable<T, boost::equality_comparable<T>> {};
> +} // namespace date_time
> +namespace date_time {
> +template <typename int_type_> class int_adapter {
> +public:
> + typedef int_type_ int_type;
> +};
> +struct time_resolution_traits_adapted64_impl {
> + typedef boost::int64_t int_type;
> + typedef boost::date_time::int_adapter<boost::int64_t> impl_type;
> +};
> +template <typename frac_sec_type, time_resolutions res,
> + typename frac_sec_type::int_type resolution_adjust,
> + unsigned short frac_digits, typename var_type = boost::int64_t>
> +class time_resolution_traits {
> +public:
> + typedef typename frac_sec_type::int_type fractional_seconds_type;
> + typedef typename frac_sec_type::int_type tick_type;
> + typedef typename frac_sec_type::impl_type impl_type;
> + typedef var_type sec_type;
> +};
> +} // namespace date_time
> +} // namespace boost
> +namespace boost {
> +namespace date_time {
> +template <typename YearType, typename MonthType, typename DayType>
> +struct __attribute__((__visibility__("default"))) year_month_day_base {
> + typedef YearType year_type;
> + typedef MonthType month_type;
> + typedef DayType day_type;
> +};
> +} // namespace date_time
> +namespace date_time {
> +template <class T, class calendar, class duration_type_>
> +class __attribute__((__visibility__("default"))) date
> + : private boost::less_than_comparable<T, boost::equality_comparable<T>> {
> +public:
> + typedef T date_type;
> + typedef calendar calendar_type;
> +};
> +} // namespace date_time
> +} // namespace boost
> +namespace boost {
> +namespace CV {
> +enum violation_enum { min_violation, max_violation };
> +template <class value_policies>
> +class __attribute__((__visibility__("default"))) constrained_value {
> +public:
> + typedef typename value_policies::value_type value_type;
> +
> +private:
> +};
> +template <typename rep_type, rep_type min_value, rep_type max_value,
> + class exception_type>
> +class __attribute__((__visibility__("default"))) simple_exception_policy {
> +public:
> + typedef rep_type value_type;
> +};
> +} // namespace CV
> +namespace date_time {
> +enum weekdays {
> + Sunday,
> + Monday,
> + Tuesday,
> + Wednesday,
> + Thursday,
> + Friday,
> + Saturday
> +};
> +enum months_of_year {
> + Jan = 1,
> + Feb,
> + Mar,
> + Apr,
> + May,
> + Jun,
> + Jul,
> + Aug,
> + Sep,
> + Oct,
> + Nov,
> + Dec,
> + NotAMonth,
> + NumMonths
> +};
> +} // namespace date_time
> +namespace gregorian {
> +struct __attribute__((__visibility__("default"))) bad_weekday
> + : public std::out_of_range {};
> +typedef CV::simple_exception_policy<unsigned short, 0, 6, bad_weekday>
> + greg_weekday_policies;
> +struct __attribute__((__visibility__("default"))) bad_day_of_year
> + : public std::out_of_range {};
> +typedef CV::simple_exception_policy<unsigned short, 1, 366, bad_day_of_year>
> + greg_day_of_year_policies;
> +typedef CV::constrained_value<greg_day_of_year_policies> greg_day_of_year_rep;
> +} // namespace gregorian
> +namespace date_time {
> +template <typename ymd_type_, typename date_int_type_>
> +class __attribute__((__visibility__("default"))) gregorian_calendar_base {
> +public:
> + typedef ymd_type_ ymd_type;
> + typedef typename ymd_type::month_type month_type;
> + typedef typename ymd_type::day_type day_type;
> + typedef typename ymd_type::year_type year_type;
> + typedef date_int_type_ date_int_type;
> +};
> +} // namespace date_time
> +} // namespace boost
> +namespace boost {
> +namespace gregorian {
> +struct __attribute__((__visibility__("default"))) bad_day_of_month
> + : public std::out_of_range {};
> +typedef CV::simple_exception_policy<unsigned short, 1, 31, bad_day_of_month>
> + greg_day_policies;
> +typedef CV::constrained_value<greg_day_policies> greg_day_rep;
> +class __attribute__((__visibility__("default"))) greg_day
> + : public greg_day_rep {
> +public:
> +private:
> +};
> +struct __attribute__((__visibility__("default"))) bad_year
> + : public std::out_of_range {};
> +typedef CV::simple_exception_policy<unsigned short, 1400, 9999, bad_year>
> + greg_year_policies;
> +typedef CV::constrained_value<greg_year_policies> greg_year_rep;
> +class __attribute__((__visibility__("default"))) greg_year
> + : public greg_year_rep {
> +public:
> +};
> +struct __attribute__((__visibility__("default"))) bad_month
> + : public std::out_of_range {};
> +typedef CV::simple_exception_policy<unsigned short, 1, 12, bad_month>
> + greg_month_policies;
> +typedef CV::constrained_value<greg_month_policies> greg_month_rep;
> +class __attribute__((__visibility__("default"))) greg_month
> + : public greg_month_rep {};
> +} // namespace gregorian
> +} // namespace boost
> +namespace boost {
> +namespace gregorian {
> +typedef date_time::year_month_day_base<greg_year, greg_month, greg_day>
> + greg_year_month_day;
> +}
> +namespace gregorian {
> +typedef date_time::int_adapter<uint32_t> fancy_date_rep;
> +class __attribute__((__visibility__("default"))) gregorian_calendar
> + : public date_time::gregorian_calendar_base<greg_year_month_day,
> + fancy_date_rep::int_type> {
> +private:
> +};
> +} // namespace gregorian
> +namespace date_time {
> +template <class duration_rep_traits>
> +class __attribute__((__visibility__("default"))) date_duration
> + : private boost::less_than_comparable1<
> + date_duration<duration_rep_traits>,
> + boost::equality_comparable1<
> + date_duration<duration_rep_traits>,
> + boost::addable1<
> + date_duration<duration_rep_traits>,
> + boost::subtractable1<
> + date_duration<duration_rep_traits>,
> + boost::dividable2<date_duration<duration_rep_traits>,
> + int>>>>> {
> +public:
> + typedef typename duration_rep_traits::int_type duration_rep_type;
> + typedef typename duration_rep_traits::impl_type duration_rep;
> +};
> +struct __attribute__((__visibility__("default"))) duration_traits_long {};
> +struct __attribute__((__visibility__("default"))) duration_traits_adapted {
> + typedef long int_type;
> + typedef boost::date_time::int_adapter<long> impl_type;
> +};
> +} // namespace date_time
> +} // namespace boost
> +namespace boost {
> +namespace gregorian {
> +typedef boost::date_time::duration_traits_adapted date_duration_rep;
> +class __attribute__((__visibility__("default"))) date_duration
> + : public boost::date_time::date_duration<date_duration_rep> {
> + typedef boost::date_time::date_duration<date_duration_rep> base_type;
> +};
> +class __attribute__((__visibility__("default"))) date
> + : public date_time::date<date, gregorian_calendar, date_duration> {
> +public:
> + typedef gregorian_calendar::year_type year_type;
> + typedef gregorian_calendar::ymd_type ymd_type;
> + typedef date_duration duration_type;
> +
> +private:
> +};
> +} // namespace gregorian
> +namespace posix_time {
> +typedef date_time::time_resolution_traits<
> + boost::date_time::time_resolution_traits_adapted64_impl,
> + boost::date_time::micro, 1000000, 6>
> + time_res_traits;
> +class __attribute__((__visibility__("default"))) time_duration
> + : public date_time::time_duration<time_duration, time_res_traits> {
> +public:
> + typedef time_res_traits rep_type;
> + typedef time_res_traits::fractional_seconds_type fractional_seconds_type;
> +
> +protected:
> +};
> +class millisec_posix_time_system_config {
> +public:
> + typedef boost::int64_t time_rep_type;
> + typedef gregorian::date date_type;
> + typedef time_duration time_duration_type;
> + typedef time_res_traits::tick_type int_type;
> + typedef time_res_traits::impl_type impl_type;
> + typedef time_res_traits resolution_traits;
> +};
> +} // namespace posix_time
> +} // namespace boost
> +namespace boost {
> +namespace date_time {
> +template <class config> struct counted_time_rep {
> + typedef typename config::time_duration_type time_duration_type;
> +};
> +template <class time_rep> class counted_time_system {
> +public:
> + typedef time_rep time_rep_type;
> + typedef typename time_rep_type::time_duration_type time_duration_type;
> +};
> +} // namespace date_time
> +} // namespace boost
> +namespace boost {
> +namespace posix_time {
> +typedef date_time::counted_time_rep<millisec_posix_time_system_config>
> + int64_time_rep;
> +typedef date_time::counted_time_system<int64_time_rep> posix_time_system;
> +} // namespace posix_time
> +} // namespace boost
> +namespace boost {
> +namespace date_time {
> +template <class T, class time_system>
> +class base_time
> + : private boost::less_than_comparable<T, boost::equality_comparable<T>> {
> + typedef typename time_system::time_rep_type time_rep_type;
> +};
> +} // namespace date_time
> +namespace posix_time {
> +class __attribute__((__visibility__("default"))) ptime
> + : public date_time::base_time<ptime, posix_time_system> {};
> +} // namespace posix_time
> +namespace mpl {
> +namespace aux {}
> +} // namespace mpl
> +namespace asio {
> +template <typename Time> struct time_traits;
> +template <> struct time_traits<boost::posix_time::ptime> {};
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +typedef class epoll_reactor timer_scheduler;
> +}
> +class executor;
> +class io_context;
> +namespace detail {
> +template <typename Executor, typename CandidateExecutor = void,
> + typename IoContext = io_context,
> + typename PolymorphicExecutor = executor, typename = void>
> +class handler_work_base {};
> +template <typename Handler, typename IoExecutor, typename = void>
> +class handler_work
> + : handler_work_base<IoExecutor>,
> + handler_work_base<typename associated_executor<Handler, IoExecutor>::type,
> + IoExecutor> {};
> +template <typename Handler, typename IoExecutor>
> +class handler_work<Handler, IoExecutor,
> + typename enable_if<is_same<
> + typename associated_executor<Handler, IoExecutor>::
> + asio_associated_executor_is_unspecialised,
> + void>::value>::type> : handler_work_base<IoExecutor> {};
> +} // namespace detail
> +class io_context : public execution_context {
> +public:
> + template <typename Allocator, uintptr_t Bits> class basic_executor_type;
> + typedef basic_executor_type<std::allocator<void>, 0> executor_type;
> +};
> +namespace detail {
> +template <typename IoObjectService,
> + typename Executor = io_context::executor_type>
> +class io_object_impl {
> +public:
> + typedef IoObjectService service_type;
> +};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +template <typename Clock> struct wait_traits {};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>,
> + typename Executor = any_io_executor>
> +class basic_waitable_timer;
> +template <typename Clock, typename WaitTraits, typename Executor>
> +class basic_waitable_timer {};
> +} // namespace asio
> +namespace beast {
> +namespace detail {
> +struct any_endpoint {};
> +struct stream_base {
> + using time_point = typename std::chrono::steady_clock::time_point;
> + struct op_state {};
> + class pending_guard {};
> +};
> +} // namespace detail
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +class rate_policy_access {};
> +class unlimited_rate_policy {
> +public:
> +};
> +} // namespace beast
> +namespace beast {
> +namespace detail {
> +template <class T>
> +auto has_next_layer_impl(decltype(nullptr))
> + -> decltype(std::declval<T &>().next_layer(), std::true_type{});
> +template <class T>
> +using has_next_layer = decltype(has_next_layer_impl<T>(nullptr));
> +template <class T, bool = has_next_layer<T>::value>
> +struct lowest_layer_type_impl {};
> +template <class T>
> +using lowest_layer_type = typename lowest_layer_type_impl<T>::type;
> +template <class BufferType> struct BufferSequence {};
> +using MutableBufferSequence = BufferSequence<net::mutable_buffer>;
> +struct StreamHandler {};
> +using ReadHandler = StreamHandler;
> +} // namespace detail
> +} // namespace beast
> +namespace asio {
> +namespace detail {
> +namespace socket_option {
> +template <int Level, int Name> class boolean {};
> +} // namespace socket_option
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +class socket_base {
> +public:
> + enum shutdown_type {
> + shutdown_receive = SHUT_RD,
> + shutdown_send = SHUT_WR,
> + shutdown_both = SHUT_RDWR
> + };
> +
> +protected:
> +};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +class reactive_socket_service_base {
> + struct base_implementation_type {};
> +};
> +} // namespace detail
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +template <typename Protocol>
> +class reactive_socket_service
> + : public execution_context_service_base<reactive_socket_service<Protocol>>,
> + public reactive_socket_service_base {
> +public:
> + typedef Protocol protocol_type;
> + typedef socket_type native_handle_type;
> + struct implementation_type
> + : reactive_socket_service_base::base_implementation_type {};
> +};
> +} // namespace detail
> +template <typename Protocol, typename Executor = any_io_executor>
> +class basic_socket;
> +template <typename Protocol, typename Executor>
> +class basic_socket : public socket_base {
> +public:
> + typedef Executor executor_type;
> + template <typename Executor1> struct rebind_executor {};
> + typedef typename detail::reactive_socket_service<Protocol>::native_handle_type
> + native_handle_type;
> + executor_type get_executor() noexcept;
> +
> +private:
> + class initiate_async_connect {};
> + class initiate_async_wait {};
> +};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +template <class T> using lowest_layer_type = detail::lowest_layer_type<T>;
> +template <class T> lowest_layer_type<T> &get_lowest_layer(T &t) noexcept;
> +template <class T>
> +using executor_type = decltype(std::declval<T &>().get_executor());
> +template <class T, class = void> struct has_get_executor : std::false_type {};
> +template <class T>
> +struct has_get_executor<
> + T, boost::void_t<decltype(std::declval<T &>().get_executor())>>
> + : std::true_type {};
> +template <class T, class = void>
> +struct is_async_write_stream : std::false_type {};
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <typename Protocol, typename Executor = any_io_executor>
> +class basic_stream_socket;
> +template <typename Protocol, typename Executor>
> +class basic_stream_socket : public basic_socket<Protocol, Executor> {
> + template <typename Executor1> struct rebind_executor {};
> +
> +private:
> + class initiate_async_send {};
> +};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +template <typename T> char has_iterator_helper(T *, typename T::iterator * = 0);
> +template <typename T> struct has_iterator_typedef {
> + enum { value = (sizeof((has_iterator_helper)((T *)(0))) == 1) };
> +};
> +} // namespace detail
> +template <typename T> struct is_endpoint_sequence {
> + enum { value = detail::has_iterator_typedef<T>::value };
> +};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <cancellation_type_t Mask> struct cancellation_filter {};
> +typedef cancellation_filter<cancellation_type::terminal>
> + enable_terminal_cancellation;
> +class cancellation_state {
> +public:
> + ;
> + cancellation_type_t cancelled() const noexcept;
> +
> +private:
> + struct impl_base {};
> + template <typename InFilter = enable_terminal_cancellation,
> + typename OutFilter = InFilter>
> + struct impl : impl_base {};
> +};
> +namespace detail {
> +template <typename Handler, typename = void>
> +class base_from_cancellation_state {};
> +}; // namespace detail
> +} // namespace asio
> +template <class T> class weak_ptr {};
> +template <class T> class enable_shared_from_this {};
> +namespace asio {}
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +template <class Protocol, class Executor = net::any_io_executor,
> + class RatePolicy = unlimited_rate_policy>
> +class basic_stream : private detail::stream_base {
> +public:
> + using socket_type = net::basic_stream_socket<Protocol, Executor>;
> + using executor_type = beast::executor_type<socket_type>;
> + struct impl_type : boost::enable_shared_from_this<impl_type>,
> + boost::empty_value<RatePolicy> {};
> + template <class Executor2> struct timeout_handler;
> + struct ops;
> + using lowest_layer_type = socket_type;
> +};
> +} // namespace beast
> +namespace beast {
> +namespace detail {
> +template <class C, class F> struct is_invocable : std::false_type {};
> +template <class C, class R, class... A>
> +struct is_invocable<C, R(A...)>
> + : decltype(is_invocable_test<R>(std::declval<C>(), 1,
> + std::declval<A>()...)) {};
> +} // namespace detail
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +class coroutine {};
> +namespace detail {
> +class coroutine_ref {};
> +} // namespace detail
> +} // namespace asio
> +namespace beast {
> +template <class Protocol, class Executor, class RatePolicy>
> +template <class Executor2>
> +struct basic_stream<Protocol, Executor, RatePolicy>::timeout_handler {};
> +template <class Protocol, class Executor, class RatePolicy>
> +struct basic_stream<Protocol, Executor, RatePolicy>::ops {
> + template <bool isRead, class Buffers, class Handler>
> + class transfer_op : public async_base<Handler, Executor>,
> + public boost::asio::coroutine {};
> +};
> +} // namespace beast
> +namespace intrusive {
> +enum link_mode_type { normal_link, safe_link, auto_unlink };
> +template <link_mode_type link_mode> struct is_safe_autounlink {};
> +} // namespace intrusive
> +namespace intrusive {
> +template <typename Ptr, typename U> struct pointer_has_rebind {
> + template <typename V> struct any {};
> +};
> +template <typename Ptr, typename U> struct pointer_has_rebind_other {
> + template <typename V> struct any {};
> +};
> +template <typename Ptr, typename U> struct pointer_rebind_mode {};
> +template <typename Ptr, typename U, unsigned int RebindMode>
> +struct pointer_rebinder;
> +template <typename Ptr, typename U> struct pointer_rebinder<Ptr, U, 2u> {};
> +template <template <class> class Ptr, typename A, class U>
> +struct pointer_rebinder<Ptr<A>, U, 0u> {};
> +template <typename Ptr, typename U>
> +struct pointer_rebind
> + : public pointer_rebinder<Ptr, U, pointer_rebind_mode<Ptr, U>::mode> {};
> +template <typename T, typename U> struct pointer_rebind<T *, U> {
> + typedef U *type;
> +};
> +} // namespace intrusive
> +namespace intrusive {
> +template <class VoidPointer> struct list_node {
> + typedef typename pointer_rebind<VoidPointer, list_node>::type node_ptr;
> +};
> +template <class VoidPointer> struct list_node_traits {
> + typedef list_node<VoidPointer> node;
> +};
> +} // namespace intrusive
> +namespace intrusive {
> +enum algo_types {
> + CircularListAlgorithms,
> + CircularSListAlgorithms,
> + LinearSListAlgorithms,
> + CommonSListAlgorithms,
> + BsTreeAlgorithms,
> + RbTreeAlgorithms,
> + AvlTreeAlgorithms,
> + SgTreeAlgorithms,
> + SplayTreeAlgorithms,
> + TreapAlgorithms,
> + UnorderedAlgorithms,
> + UnorderedCircularSlistAlgorithms,
> + AnyAlgorithm
> +};
> +template <algo_types AlgoType, class NodeTraits> struct get_algo;
> +template <algo_types AlgoType, class ValueTraits, class NodePtrCompare,
> + class ExtraChecker>
> +struct get_node_checker;
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace intrusive {
> +template <class NodeTraits> class circular_list_algorithms {};
> +template <std::size_t... Indexes> struct index_tuple {};
> +template <std::size_t Num, typename Tuple = index_tuple<>>
> +struct build_number_seq;
> +template <std::size_t Num, std::size_t... Indexes>
> +struct build_number_seq<Num, index_tuple<Indexes...>>
> + : build_number_seq<Num - 1, index_tuple<Indexes..., sizeof...(Indexes)>> {};
> +template <std::size_t... Indexes>
> +struct build_number_seq<0, index_tuple<Indexes...>> {
> + typedef index_tuple<Indexes...> type;
> +};
> +template <class... Types> struct typelist {};
> +template <std::size_t I, typename Tuple> struct typelist_element;
> +template <std::size_t I, typename Head, typename... Tail>
> +struct typelist_element<I, typelist<Head, Tail...>> {
> + typedef typename typelist_element<I - 1, typelist<Tail...>>::type type;
> +};
> +template <typename Head, typename... Tail>
> +struct typelist_element<0, typelist<Head, Tail...>> {
> + typedef Head type;
> +};
> +template <class Typelist> struct sizeof_typelist;
> +template <class... Types> struct sizeof_typelist<typelist<Types...>> {
> + static const std::size_t value = sizeof...(Types);
> +};
> +template <class Typelist, class Indexes> struct invert_typelist_impl;
> +template <class Typelist, std::size_t... Ints>
> +struct invert_typelist_impl<Typelist, index_tuple<Ints...>> {
> + static const std::size_t last_idx = sizeof_typelist<Typelist>::value - 1;
> + typedef typelist<
> + typename typelist_element<last_idx - Ints, Typelist>::type...>
> + type;
> +};
> +template <class Typelist> struct invert_typelist;
> +template <class... Types> struct invert_typelist<typelist<Types...>> {
> + typedef typelist<Types...> typelist_t;
> + typedef typename build_number_seq<sizeof...(Types)>::type indexes_t;
> + typedef typename invert_typelist_impl<typelist_t, indexes_t>::type type;
> +};
> +template <class Typelist> struct do_pack;
> +template <class Prev> struct do_pack<typelist<Prev>> {};
> +template <class Prev, class Last> struct do_pack<typelist<Prev, Last>> {
> + typedef typename Prev::template pack<Last> type;
> +};
> +template <class... Others> struct do_pack<typelist<void, Others...>> {};
> +template <class DefaultOptions, class... Options> struct pack_options {
> + typedef typelist<DefaultOptions, Options...> typelist_t;
> + typedef typename invert_typelist<typelist_t>::type inverted_typelist;
> + typedef typename do_pack<inverted_typelist>::type type;
> +};
> +} // namespace intrusive
> +namespace intrusive {
> +struct empty {};
> +struct dft_tag;
> +struct member_tag;
> +template <class SupposedValueTraits> struct is_default_hook_tag;
> +template <link_mode_type LinkType> struct link_mode {
> + template <class Base> struct pack : Base {};
> +};
> +template <bool Enabled> struct optimize_size {
> + template <class Base> struct pack : Base {};
> +};
> +template <bool Enabled> struct incremental {
> + template <class Base> struct pack : Base {};
> +};
> +struct hook_defaults {
> + typedef void *void_pointer;
> + static const link_mode_type link_mode = safe_link;
> + typedef dft_tag tag;
> + static const bool optimize_size = false;
> +};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace movelib {
> +namespace detail {
> +template <typename T> struct first_param {};
> +template <typename T> struct has_internal_pointer_element {};
> +template <class Ptr, bool = has_internal_pointer_element<Ptr>::value>
> +struct pointer_element_impl {};
> +} // namespace detail
> +template <typename Ptr> struct pointer_element {};
> +template <typename T> struct pointer_element<T *> {};
> +} // namespace movelib
> +namespace intrusive {
> +namespace detail {
> +using boost::move_detail::alignment_of;
> +using boost::move_detail::disable_if_c;
> +using boost::move_detail::identity;
> +using boost::move_detail::if_c;
> +using boost::move_detail::is_same;
> +using boost::move_detail::yes_type;
> +template <std::size_t S> struct ls_zeros {};
> +template <typename T, typename DefaultType>
> +struct boost_intrusive_eval_default_type_element_type {};
> +template <typename T, typename DefaultType>
> +struct boost_intrusive_default_type_value_traits_ptr {
> + struct DefaultWrap {};
> +};
> +} // namespace detail
> +template <typename Ptr> struct pointer_traits {};
> +template <typename T> struct pointer_traits<T *> {};
> +} // namespace intrusive
> +namespace intrusive {
> +template <class Node, class Tag, unsigned int>
> +struct node_holder : public Node {};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace intrusive {
> +namespace detail {
> +template <link_mode_type LinkMode> struct link_dispatch {};
> +} // namespace detail
> +enum base_hook_type {
> + NoBaseHookId,
> + ListBaseHookId,
> + SlistBaseHookId,
> + RbTreeBaseHookId,
> + HashBaseHookId,
> + AvlTreeBaseHookId,
> + BsTreeBaseHookId,
> + TreapTreeBaseHookId,
> + AnyBaseHookId
> +};
> +template <class HookTags, unsigned int> struct hook_tags_definer {
> + typedef HookTags default_rbtree_hook;
> +};
> +template <class NodeTraits, class Tag, link_mode_type LinkMode,
> + base_hook_type BaseHookType>
> +struct hooktags_impl {
> + static const link_mode_type link_mode = LinkMode;
> + typedef Tag tag;
> +};
> +template <boost::intrusive::algo_types Algo, class NodeTraits, class Tag,
> + link_mode_type LinkMode, base_hook_type BaseHookType>
> +class generic_hook
> + : public detail::if_c<
> + detail::is_same<Tag, member_tag>::value, typename NodeTraits::node,
> + node_holder<typename NodeTraits::node, Tag, BaseHookType>>::type,
> + public hook_tags_definer<
> + generic_hook<Algo, NodeTraits, Tag, LinkMode, BaseHookType>,
> + detail::is_same<Tag, dft_tag>::value ? BaseHookType : NoBaseHookId> {
> +public:
> + typedef hooktags_impl<NodeTraits, Tag, LinkMode, BaseHookType> hooktags;
> +
> +public:
> +};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace intrusive {
> +template <class... Options> struct make_list_base_hook {
> + typedef typename pack_options<hook_defaults, Options...>::type packed_options;
> + typedef generic_hook<CircularListAlgorithms,
> + list_node_traits<typename packed_options::void_pointer>,
> + typename packed_options::tag, packed_options::link_mode,
> + ListBaseHookId>
> + implementation_defined;
> + typedef implementation_defined type;
> +};
> +template <class... Options>
> +class list_base_hook : public make_list_base_hook<Options...>::type {};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace intrusive {
> +template <class T, class NodePtr, class Tag, unsigned int Type>
> +struct bhtraits_base {
> +public:
> + typedef NodePtr node_ptr;
> +};
> +template <class T, class NodeTraits, link_mode_type LinkMode, class Tag,
> + unsigned int Type>
> +struct bhtraits
> + : public bhtraits_base<T, typename NodeTraits::node_ptr, Tag, Type> {};
> +namespace detail {
> +template <class T, class BaseHook> struct concrete_hook_base_value_traits {
> + typedef typename BaseHook::hooktags tags;
> + typedef bhtraits<T, typename tags::node_traits, tags::link_mode,
> + typename tags::tag, tags::type>
> + type;
> +};
> +template <class T, class AnyToSomeHook_ProtoValueTraits>
> +struct any_hook_base_value_traits {
> + typedef typename AnyToSomeHook_ProtoValueTraits::basic_hook_t basic_hook_t;
> + typedef typename pointer_rebind<
> + typename basic_hook_t::hooktags::node_traits::node_ptr, void>::type
> + void_pointer;
> + struct type {};
> +};
> +template <class MemberHook> struct get_member_value_traits {};
> +template <class T> struct internal_any_hook_bool {
> + ;
> + static const std::size_t value = sizeof(test<T>(0));
> +};
> +template <class T> struct internal_any_hook_bool_is_true {
> + static const bool value = internal_any_hook_bool<T>::value >
> + sizeof(yes_type) * 2;
> +};
> +template <class T> struct internal_base_hook_bool {
> + ;
> + static const std::size_t value = sizeof(test<T>(0));
> +};
> +template <class T> struct internal_base_hook_bool_is_true {
> + static const bool value = internal_base_hook_bool<T>::value >
> + sizeof(yes_type) * 2;
> +};
> +template <class T> struct internal_member_value_traits {};
> +template <class SupposedValueTraits, class T,
> + bool = is_default_hook_tag<SupposedValueTraits>::value>
> +struct supposed_value_traits;
> +template <class T, class BaseHook,
> + bool = internal_any_hook_bool_is_true<BaseHook>::value>
> +struct get_base_value_traits;
> +template <class SupposedValueTraits, class T,
> + bool = internal_base_hook_bool_is_true<SupposedValueTraits>::value>
> +struct supposed_base_value_traits;
> +template <class T, class BaseHook>
> +struct get_base_value_traits<T, BaseHook, false>
> + : concrete_hook_base_value_traits<T, BaseHook> {};
> +template <class SupposedValueTraits, class T>
> +struct supposed_value_traits<SupposedValueTraits, T, false> {};
> +template <class SupposedValueTraits> struct get_node_traits {};
> +} // namespace detail
> +} // namespace intrusive
> +namespace intrusive {
> +template <class Category, class T, class Difference, class Pointer,
> + class Reference>
> +struct iterator {};
> +template <class ValueTraits, bool IsConst, class Category> struct iiterator {};
> +template <class NodePtr, class StoredPointer, bool StatefulValueTraits = true>
> +struct iiterator_members {};
> +template <class NodePtr, class StoredPointer>
> +struct iiterator_members<NodePtr, StoredPointer, false> {};
> +} // namespace intrusive
> +namespace intrusive {
> +namespace detail {
> +template <typename T> struct is_unary_or_binary_function_impl {};
> +template <typename T>
> +struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T> {};
> +template <typename T, typename Tag = void,
> + bool = is_unary_or_binary_function<T>::value>
> +class ebo_functor_holder {};
> +} // namespace detail
> +} // namespace intrusive
> +namespace intrusive {
> +template <class From, class ValuePtr>
> +struct disable_if_smartref_to
> + : detail::disable_if_c<
> + detail::is_same<
> + From, typename pointer_traits<ValuePtr>::reference>::value ||
> + detail::is_same<
> + From,
> + typename pointer_traits<typename pointer_rebind<
> + ValuePtr, const typename boost::movelib::pointer_element<
> + ValuePtr>::type>::type>::reference>::value> {};
> +template <class ValuePtr, class KeyCompare, class KeyOfValue, class Ret = bool,
> + bool = boost::intrusive::detail::is_same<
> + typename boost::movelib::pointer_element<ValuePtr>::type,
> + typename KeyOfValue::type>::value>
> +struct tree_value_compare
> + : public boost::intrusive::detail::ebo_functor_holder<KeyCompare> {};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace intrusive {
> +namespace detail {
> +template <bool ConstantSize, class SizeType, class Tag = void>
> +struct size_holder {};
> +template <class SizeType, class Tag>
> +struct size_holder<false, SizeType, Tag> {};
> +} // namespace detail
> +struct default_list_hook_applier {
> + template <class T> struct apply {
> + typedef typename T::default_list_hook type;
> + };
> +};
> +} // namespace intrusive
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace detail {
> +;
> +template <class U> std::size_t constexpr max_alignof();
> +template <class... Ts> using void_t = boost::void_t<Ts...>;
> +template <std::size_t Len, class... Ts> struct aligned_union {};
> +} // namespace detail
> +} // namespace beast
> +namespace beast {
> +enum class file_mode {
> + read,
> + scan,
> + write,
> + write_new,
> + write_existing,
> + append,
> + append_existing
> +};
> +class file_posix {
> +public:
> + using native_handle_type = int;
> +};
> +} // namespace beast
> +namespace beast {
> +using file = file_posix;
> +template <class Allocator>
> +class basic_flat_buffer
> + : private boost::empty_value<typename detail::allocator_traits<
> + Allocator>::template rebind_alloc<char>> {
> +public:
> + using allocator_type = Allocator;
> + using const_buffers_type = net::const_buffer;
> + using mutable_buffers_type = net::mutable_buffer;
> +};
> +using flat_buffer = basic_flat_buffer<std::allocator<char>>;
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +class flat_static_buffer_base {
> +protected:
> +private:
> +};
> +template <std::size_t N>
> +class flat_static_buffer : public flat_static_buffer_base {
> +public:
> +};
> +namespace detail {
> +class flat_stream_base {};
> +} // namespace detail
> +} // namespace beast
> +namespace beast {
> +template <class NextLayer>
> +class flat_stream : private detail::flat_stream_base {
> +public:
> + using next_layer_type = typename std::remove_reference<NextLayer>::type;
> + using executor_type = beast::executor_type<next_layer_type>;
> +};
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace detail {
> +template <bool isMutable> class buffers_pair {
> +public:
> + using value_type = typename std::conditional<isMutable, net::mutable_buffer,
> + net::const_buffer>::type;
> +};
> +} // namespace detail
> +} // namespace beast
> +namespace beast {
> +class static_buffer_base {};
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +template <std::size_t N, class CharT = char,
> + class Traits = std::char_traits<CharT>>
> +class static_string {
> +private:
> +};
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <typename Protocol, typename Executor = any_io_executor>
> +class basic_socket_acceptor;
> +template <typename Protocol, typename Executor>
> +class basic_socket_acceptor : public socket_base {
> +private:
> + class initiate_async_wait {};
> +};
> +namespace detail {
> +template <typename Protocol, typename Clock, typename WaitTraits>
> +class socket_iostream_base {};
> +} // namespace detail
> +template <typename Protocol, typename Clock, typename WaitTraits>
> +class basic_socket_iostream
> + : private detail::socket_iostream_base<Protocol, Clock, WaitTraits>,
> + public std::basic_iostream<char> {
> +private:
> +};
> +} // namespace asio
> +namespace asio {
> +namespace ip {
> +class address_v4 {};
> +} // namespace ip
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace ip {
> +class address_v6 {};
> +enum v4_mapped_t { v4_mapped };
> +template <typename InternetProtocol> class basic_endpoint {};
> +} // namespace ip
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace ip {
> +template <typename InternetProtocol> class basic_resolver_entry {};
> +} // namespace ip
> +} // namespace asio
> +namespace asio {
> +namespace ip {
> +template <typename InternetProtocol> class basic_resolver_iterator {
> +protected:
> + typedef std::vector<basic_resolver_entry<InternetProtocol>> values_type;
> + typedef boost::asio::detail::shared_ptr<values_type> values_ptr_type;
> +};
> +} // namespace ip
> +namespace ip {
> +class resolver_base {
> +public:
> + enum flags {
> + canonical_name = 0x0002,
> + passive = 0x0001,
> + numeric_host = 0x0004,
> + numeric_service = 0x0400,
> + v4_mapped = 0x0008,
> + all_matching = 0x0010,
> + address_configured = 0x0020
> + };
> +
> +protected:
> +};
> +} // namespace ip
> +} // namespace asio
> +namespace asio {
> +namespace ip {
> +class resolver_query_base : public resolver_base {
> +protected:
> +};
> +} // namespace ip
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace ip {
> +template <typename InternetProtocol>
> +class basic_resolver_results
> + : public basic_resolver_iterator<InternetProtocol> {};
> +} // namespace ip
> +namespace detail {
> +class resolve_op : public operation {};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +class resolver_service_base {
> + class auto_addrinfo : private boost::asio::detail::noncopyable {};
> + typedef class scheduler scheduler_impl;
> +};
> +} // namespace detail
> +namespace ip {
> +template <typename InternetProtocol, typename Executor = any_io_executor>
> +class basic_resolver;
> +template <typename InternetProtocol, typename Executor>
> +class basic_resolver : public resolver_base {
> +public:
> + typedef Executor executor_type;
> + template <typename Executor1> struct rebind_executor {};
> + typedef InternetProtocol protocol_type;
> + typedef basic_resolver_results<InternetProtocol> results_type;
> + template <::boost::asio::completion_token_for<void(boost::system::error_code,
> + results_type)>
> + ResolveHandler = typename ::boost::asio::
> + default_completion_token<executor_type>::type>
> + auto async_resolve(boost::asio::string_view host,
> + boost::asio::string_view service,
> + resolver_base::flags resolve_flags,
> + ResolveHandler &&handler = typename ::boost::asio::
> + default_completion_token<executor_type>::type()){};
> +};
> +} // namespace ip
> +} // namespace asio
> +namespace asio {
> +namespace ip {
> +class tcp {
> +public:
> + typedef basic_endpoint<tcp> endpoint;
> + typedef basic_resolver<tcp> resolver;
> +};
> +} // namespace ip
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +using tcp_stream =
> + basic_stream<net::ip::tcp, net::any_io_executor, unlimited_rate_policy>;
> +}
> +namespace beast {
> +namespace http {
> +enum class error {
> + end_of_stream = 1,
> + partial_message,
> + need_more,
> + unexpected_body,
> + need_buffer,
> + end_of_chunk,
> + buffer_overflow,
> + header_limit,
> + body_limit,
> + bad_alloc,
> + bad_line_ending,
> + bad_method,
> + bad_target,
> + bad_version,
> + bad_status,
> + bad_reason,
> + bad_field,
> + bad_value,
> + bad_content_length,
> + bad_transfer_encoding,
> + bad_chunk,
> + bad_chunk_extension,
> + bad_obs_fold,
> + stale_parser,
> + short_read
> +};
> +}
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace system {
> +template <> struct is_error_code_enum<::boost::beast::http::error> {
> + static bool const value = true;
> +};
> +} // namespace system
> +namespace intrusive {
> +template <class NodeTraits> class bstree_algorithms_base {};
> +template <class NodePtr> struct data_for_rebalance_t {};
> +namespace detail {
> +template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
> +struct bstree_node_checker : public ExtraChecker {
> + typedef ExtraChecker base_checker_t;
> + typedef ValueTraits value_traits;
> +};
> +} // namespace detail
> +template <class NodeTraits>
> +class bstree_algorithms : public bstree_algorithms_base<NodeTraits> {};
> +template <class NodeTraits, class F>
> +struct rbtree_node_cloner : public detail::ebo_functor_holder<F> {};
> +namespace detail {
> +template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
> +struct rbtree_node_checker
> + : public bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> {
> + typedef bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker>
> + base_checker_t;
> + typedef ValueTraits value_traits;
> + typedef typename value_traits::node_traits node_traits;
> + struct return_type : public base_checker_t::return_type {};
> +};
> +} // namespace detail
> +template <class NodeTraits>
> +class rbtree_algorithms : public bstree_algorithms<NodeTraits> {
> +private:
> +};
> +template <class VoidPointer, std::size_t Alignment>
> +struct max_pointer_plus_bits {
> + static const std::size_t value = 0;
> +};
> +} // namespace intrusive
> +namespace intrusive {
> +template <class VoidPointer> struct compact_rbtree_node {};
> +template <class VoidPointer> struct rbtree_node {
> + typedef rbtree_node<VoidPointer> node;
> + typedef typename pointer_rebind<VoidPointer, node>::type node_ptr;
> +};
> +template <class VoidPointer> struct default_rbtree_node_traits_impl {
> + typedef rbtree_node<VoidPointer> node;
> +};
> +template <class VoidPointer> struct compact_rbtree_node_traits_impl {
> + typedef compact_rbtree_node<VoidPointer> node;
> +};
> +template <class VoidPointer, bool Compact>
> +struct rbtree_node_traits_dispatch
> + : public default_rbtree_node_traits_impl<VoidPointer> {};
> +template <class VoidPointer>
> +struct rbtree_node_traits_dispatch<VoidPointer, true>
> + : public compact_rbtree_node_traits_impl<VoidPointer> {};
> +template <class VoidPointer, bool OptimizeSize = false>
> +struct rbtree_node_traits
> + : public rbtree_node_traits_dispatch<
> + VoidPointer,
> + OptimizeSize &&
> + (max_pointer_plus_bits<VoidPointer,
> + detail::alignment_of<compact_rbtree_node<
> + VoidPointer>>::value>::value >= 1)> {};
> +template <class... Options> struct make_set_base_hook {
> + typedef typename pack_options<hook_defaults, Options...>::type packed_options;
> + typedef generic_hook<RbTreeAlgorithms,
> + rbtree_node_traits<typename packed_options::void_pointer,
> + packed_options::optimize_size>,
> + typename packed_options::tag, packed_options::link_mode,
> + RbTreeBaseHookId>
> + implementation_defined;
> + typedef implementation_defined type;
> +};
> +template <class... Options>
> +class set_base_hook : public make_set_base_hook<Options...>::type {};
> +} // namespace intrusive
> +namespace intrusive {
> +struct default_bstree_hook_applier {};
> +struct bstree_defaults {
> + static const bool constant_time_size = true;
> + typedef std::size_t size_type;
> +};
> +template <class ValueTraits, algo_types AlgoType, typename HeaderHolder>
> +struct bstbase3 {
> + typedef ValueTraits value_traits;
> + typedef typename value_traits::node_traits node_traits;
> +};
> +template <class Less, class T> struct get_compare {};
> +template <class KeyOfValue, class T> struct get_key_of_value {};
> +template <class ValuePtr, class VoidOrKeyOfValue, class VoidOrKeyComp>
> +struct bst_key_types {
> + typedef typename boost::movelib::pointer_element<ValuePtr>::type value_type;
> +};
> +template <class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp,
> + algo_types AlgoType, typename HeaderHolder>
> +struct bstbase2 : public detail::ebo_functor_holder<typename bst_key_types<
> + typename ValueTraits::pointer, VoidOrKeyOfValue,
> + VoidOrKeyComp>::value_compare>,
> + public bstbase3<ValueTraits, AlgoType, HeaderHolder> {
> + typedef bst_key_types<typename ValueTraits::pointer, VoidOrKeyOfValue,
> + VoidOrKeyComp>
> + key_types;
> +};
> +template <class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp,
> + bool ConstantTimeSize, class SizeType, algo_types AlgoType,
> + typename HeaderHolder>
> +struct bstbase_hack : public detail::size_holder<ConstantTimeSize, SizeType>,
> + public bstbase2<ValueTraits, VoidOrKeyOfValue,
> + VoidOrKeyComp, AlgoType, HeaderHolder> {};
> +template <class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp,
> + bool ConstantTimeSize, class SizeType, algo_types AlgoType,
> + typename HeaderHolder>
> +struct bstbase
> + : public bstbase_hack<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp,
> + ConstantTimeSize, SizeType, AlgoType, HeaderHolder> {
> +};
> +template <class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp,
> + class SizeType, bool ConstantTimeSize, algo_types AlgoType,
> + typename HeaderHolder>
> +class bstree_impl
> + : public bstbase<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp,
> + ConstantTimeSize, SizeType, AlgoType, HeaderHolder> {
> + typedef ValueTraits value_traits;
> +};
> +} // namespace intrusive
> +namespace intrusive {
> +struct default_rbtree_hook_applier {
> + template <class T> struct apply {
> + typedef typename T::default_rbtree_hook type;
> + };
> +};
> +struct rbtree_defaults : bstree_defaults {
> + typedef default_rbtree_hook_applier proto_value_traits;
> +};
> +template <class ValueTraits, class VoidOrKeyOfValue, class Compare,
> + class SizeType, bool ConstantTimeSize, typename HeaderHolder>
> +class multiset_impl
> + : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType,
> + ConstantTimeSize, RbTreeAlgorithms, HeaderHolder> {};
> +template <class T, class... Options> struct make_multiset {};
> +} // namespace intrusive
> +namespace beast {
> +namespace http {
> +template <class Allocator>
> +class basic_fields : private boost::empty_value<Allocator> {
> + class value_type {
> + protected:
> + public:
> + };
> + struct key_compare : beast::iless {};
> +};
> +using fields = basic_fields<std::allocator<char>>;
> +template <bool isRequest, class Fields> class header;
> +namespace detail {
> +template <class T> class is_header_impl {};
> +struct fields_model {
> +protected:
> +};
> +template <class T, class = beast::detail::void_t<>>
> +struct has_value_type : std::false_type {};
> +template <class T>
> +struct has_value_type<T, beast::detail::void_t<typename T::value_type>>
> + : std::true_type {};
> +template <class T, class = void> struct is_body_sized : std::false_type {};
> +template <class T>
> +struct is_body_sized<
> + T, beast::detail::void_t<
> + typename T::value_type,
> + decltype(std::declval<std::uint64_t &>() = T::size(
> + std::declval<typename T::value_type const &>()))>>
> + : std::true_type {};
> +template <class T> struct is_fields_helper : T {
> + template <class U = is_fields_helper>
> + static auto f1(int)
> + -> decltype(std::declval<string_view &>() =
> + std::declval<U const &>().get_method_impl(),
> + std::true_type());
> + using t1 = decltype(f1(0));
> + template <class U = is_fields_helper>
> + static auto f2(int)
> + -> decltype(std::declval<string_view &>() =
> + std::declval<U const &>().get_target_impl(),
> + std::true_type());
> + using t2 = decltype(f2(0));
> + template <class U = is_fields_helper>
> + static auto f3(int)
> + -> decltype(std::declval<string_view &>() =
> + std::declval<U const &>().get_reason_impl(),
> + std::true_type());
> + using t3 = decltype(f3(0));
> + template <class U = is_fields_helper>
> + static auto f4(int)
> + -> decltype(std::declval<bool &>() =
> + std::declval<U const &>().get_chunked_impl(),
> + std::true_type());
> + using t4 = decltype(f4(0));
> + template <class U = is_fields_helper>
> + static auto f5(int)
> + -> decltype(std::declval<bool &>() =
> + std::declval<U const &>().get_keep_alive_impl(
> + std::declval<unsigned>()),
> + std::true_type());
> + using t5 = decltype(f5(0));
> + template <class U = is_fields_helper>
> + static auto f6(int)
> + -> decltype(std::declval<bool &>() =
> + std::declval<U const &>().has_content_length_impl(),
> + std::true_type());
> + using t6 = decltype(f6(0));
> + template <class U = is_fields_helper>
> + static auto f7(int) -> decltype(void(std::declval<U &>().set_method_impl(
> + std::declval<string_view>())),
> + std::true_type());
> + using t7 = decltype(f7(0));
> + template <class U = is_fields_helper>
> + static auto f8(int) -> decltype(void(std::declval<U &>().set_target_impl(
> + std::declval<string_view>())),
> + std::true_type());
> + using t8 = decltype(f8(0));
> + template <class U = is_fields_helper>
> + static auto f9(int) -> decltype(void(std::declval<U &>().set_reason_impl(
> + std::declval<string_view>())),
> + std::true_type());
> + using t9 = decltype(f9(0));
> + template <class U = is_fields_helper>
> + static auto f10(int) -> decltype(void(std::declval<U &>().set_chunked_impl(
> + std::declval<bool>())),
> + std::true_type());
> + using t10 = decltype(f10(0));
> + template <class U = is_fields_helper>
> + static auto f11(int)
> + -> decltype(void(std::declval<U &>().set_content_length_impl(
> + std::declval<boost::optional<std::uint64_t>>())),
> + std::true_type());
> + using t11 = decltype(f11(0));
> +};
> +} // namespace detail
> +} // namespace http
> +} // namespace beast
> +namespace beast {
> +namespace http {
> +template <class T> using is_body = detail::has_value_type<T>;
> +template <class T, class = void> struct is_body_writer : std::false_type {};
> +template <class T, class = void> struct is_body_reader : std::false_type {};
> +template <class T>
> +struct is_body_reader<
> + T,
> + beast::detail::void_t<decltype(std::declval<typename T::reader &>().init(
> + boost::optional<std::uint64_t>(),
> + std::declval<error_code &>()),
> + std::declval<std::size_t &>() =
> + std::declval<typename T::reader &>().put(
> + std::declval<net::const_buffer>(),
> + std::declval<error_code &>()),
> + std::declval<typename T::reader &>().finish(
> + std::declval<error_code &>()))>>
> + : std::integral_constant<
> + bool, (std::is_constructible<typename T::reader,
> + header<true, detail::fields_model> &,
> + typename T::value_type &>::value &&
> + std::is_constructible<typename T::reader,
> + header<false, detail::fields_model> &,
> + typename T::value_type &>::value)> {};
> +template <class Fields> class header<true, Fields> : public Fields {};
> +template <class Fields> class header<false, Fields> : public Fields {};
> +template <class Fields = fields> using request_header = header<true, Fields>;
> +template <class Fields = fields> using response_header = header<false, Fields>;
> +template <bool isRequest, class Body, class Fields = fields>
> +class message : public header<isRequest, Fields>,
> + boost::empty_value<typename Body::value_type> {};
> +template <class Body, class Fields = fields>
> +using request = message<true, Body, Fields>;
> +template <class Body, class Fields = fields>
> +using response = message<false, Body, Fields>;
> +} // namespace http
> +} // namespace beast
> +namespace beast {
> +namespace http {
> +template <class File> struct basic_file_body { class value_type; };
> +template <class File> class basic_file_body<File>::value_type {};
> +} // namespace http
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace http {
> +namespace detail {
> +struct basic_parser_base {
> + enum class state {
> + nothing_yet = 0,
> + start_line,
> + fields,
> + body0,
> + body,
> + body_to_eof0,
> + body_to_eof,
> + chunk_header0,
> + chunk_header,
> + chunk_body,
> + complete
> + };
> +};
> +} // namespace detail
> +} // namespace http
> +} // namespace beast
> +namespace beast {
> +namespace http {
> +template <bool isRequest>
> +class basic_parser : private detail::basic_parser_base {};
> +} // namespace http
> +namespace http {
> +struct empty_body {
> + struct value_type {
> + ;
> + };
> +};
> +} // namespace http
> +} // namespace beast
> +namespace beast {}
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace http {
> +template <bool isRequest, class Body, class Allocator = std::allocator<char>>
> +class parser : public basic_parser<isRequest> {
> + static_assert(is_body<Body>::value, "Body type requirements not met");
> +};
> +template <class Body, class Allocator = std::allocator<char>>
> +using request_parser = parser<true, Body, Allocator>;
> +template <class Body, class Allocator = std::allocator<char>>
> +using response_parser = parser<false, Body, Allocator>;
> +} // namespace http
> +} // namespace beast
> +namespace asio {
> +namespace detail {
> +template <typename Executor, typename = void> class composed_work_guard {
> +public:
> + typedef typename decay<typename prefer_result<
> + Executor, execution::outstanding_work_t::tracked_t>::type>::type
> + executor_type;
> +};
> +template <typename> struct composed_io_executors;
> +template <> struct composed_io_executors<void()> {
> + typedef system_executor head_type;
> + system_executor head_;
> +};
> +template <typename Head> struct composed_io_executors<void(Head)> {
> + typedef Head head_type;
> + Head head_;
> +};
> +template <typename> struct composed_work;
> +template <typename Impl, typename Work, typename Handler, typename Signature>
> +class composed_op;
> +template <typename Impl, typename Work, typename Handler, typename R,
> + typename... Args>
> +class composed_op<Impl, Work, Handler, R(Args...)>
> + : public base_from_cancellation_state<Handler> {
> +public:
> + ;
> + typedef typename associated_executor<
> + Handler, typename composed_work_guard<typename Work::head_type>::
> + executor_type>::type executor_type;
> + unsigned invocations_;
> +};
> +}; // namespace detail
> + ;
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace http {
> +namespace detail {
> +struct parser_is_done {
> +public:
> + ;
> +};
> +;
> +;
> +} // namespace detail
> +template <class CharT, class Traits = std::char_traits<CharT>,
> + class Allocator = std::allocator<CharT>>
> +struct basic_string_body {
> +private:
> + static_assert(std::is_integral<CharT>::value && sizeof(CharT) == 1,
> + "CharT requirements not met");
> +
> +public:
> + using value_type = std::basic_string<CharT, Traits, Allocator>;
> + class writer {};
> +};
> +using string_body = basic_string_body<char>;
> +} // namespace http
> +} // namespace beast
> +} // namespace boost
> +namespace malloy::http {
> +template <typename Body = boost::beast::http::string_body,
> + typename Fields = boost::beast::http::fields>
> +class response : public boost::beast::http::response<Body, Fields> {
> + using msg_t = boost::beast::http::response<Body, Fields>;
> +};
> +} // namespace malloy::http
> +namespace malloy::http::concepts {
> +template <typename B>
> +concept body = boost::beast::http::is_body<B>::value;
> +}
> +namespace malloy {
> +using error_code = boost::beast::error_code;
> +}
> +namespace std __attribute__((__visibility__("default"))) {
> + template <bool _Switch, typename _Tag = void>
> + struct _Enable_default_constructor {};
> + template <bool _Copy, bool _CopyAssignment, bool _Move, bool _MoveAssignment,
> + typename _Tag = void>
> + struct _Enable_copy_move {};
> + namespace __detail {
> + namespace __variant {
> + template <size_t _Np, typename... _Types> struct _Nth_type;
> + template <size_t _Np, typename _First, typename... _Rest>
> + struct _Nth_type<_Np, _First, _Rest...> : _Nth_type<_Np - 1, _Rest...> {};
> + template <typename _First, typename... _Rest>
> + struct _Nth_type<0, _First, _Rest...> {
> + using type = _First;
> + };
> + } // namespace __variant
> + } // namespace __detail
> + template <typename... _Types> class variant;
> + template <typename _Variant> struct variant_size;
> + template <typename _Variant>
> + struct variant_size<const _Variant> : variant_size<_Variant> {};
> + template <typename... _Types>
> + struct variant_size<variant<_Types...>>
> + : std::integral_constant<size_t, sizeof...(_Types)> {};
> + template <typename _Variant>
> + inline constexpr size_t variant_size_v = variant_size<_Variant>::value;
> + template <size_t _Np, typename _Variant> struct variant_alternative;
> + template <size_t _Np, typename _First, typename... _Rest>
> + struct variant_alternative<_Np, variant<_First, _Rest...>>
> + : variant_alternative<_Np - 1, variant<_Rest...>> {};
> + template <typename _First, typename... _Rest>
> + struct variant_alternative<0, variant<_First, _Rest...>> {
> + using type = _First;
> + };
> + template <size_t _Np, typename _Variant>
> + using variant_alternative_t =
> + typename variant_alternative<_Np, _Variant>::type;
> + inline constexpr size_t variant_npos = -1;
> + namespace __detail {
> + namespace __variant {
> + template <typename _Tp, typename... _Types>
> + struct __index_of : std::integral_constant<size_t, 0> {};
> + struct __variant_cookie {};
> + struct __variant_idx_cookie {
> + using type = __variant_idx_cookie;
> + };
> + template <typename _Tp> struct __deduce_visit_result { using type = _Tp; };
> + ;
> + ;
> + template <typename _Type, bool = std::is_trivially_destructible_v<_Type>>
> + struct _Uninitialized;
> + template <typename _Type> struct _Uninitialized<_Type, true> {
> + _Type _M_storage;
> + };
> + ;
> + template <typename... _Types> struct _Traits {
> + static constexpr bool _S_default_ctor =
> + is_default_constructible_v<typename _Nth_type<0, _Types...>::type>;
> + static constexpr bool _S_copy_ctor =
> + (is_copy_constructible_v<_Types> && ...);
> + static constexpr bool _S_move_ctor =
> + (is_move_constructible_v<_Types> && ...);
> + static constexpr bool _S_copy_assign =
> + _S_copy_ctor && (is_copy_assignable_v<_Types> && ...);
> + static constexpr bool _S_move_assign =
> + _S_move_ctor && (is_move_assignable_v<_Types> && ...);
> + static constexpr bool _S_trivial_dtor =
> + (is_trivially_destructible_v<_Types> && ...);
> + static constexpr bool _S_trivial_copy_ctor =
> + (is_trivially_copy_constructible_v<_Types> && ...);
> + static constexpr bool _S_trivial_move_ctor =
> + (is_trivially_move_constructible_v<_Types> && ...);
> + static constexpr bool _S_trivial_copy_assign =
> + _S_trivial_dtor && _S_trivial_copy_ctor &&
> + (is_trivially_copy_assignable_v<_Types> && ...);
> + static constexpr bool _S_trivial_move_assign =
> + _S_trivial_dtor && _S_trivial_move_ctor &&
> + (is_trivially_move_assignable_v<_Types> && ...);
> + static constexpr bool _S_nothrow_default_ctor =
> + is_nothrow_default_constructible_v<
> + typename _Nth_type<0, _Types...>::type>;
> + static constexpr bool _S_nothrow_copy_ctor = false;
> + };
> + template <typename... _Types> union _Variadic_union {};
> + template <typename _First, typename... _Rest>
> + union _Variadic_union<_First, _Rest...> {
> + _Uninitialized<_First> _M_first;
> + _Variadic_union<_Rest...> _M_rest;
> + };
> + template <typename _Tp>
> + struct _Never_valueless_alt
> + : __and_<bool_constant<sizeof(_Tp) <= 256>, is_trivially_copyable<_Tp>> {
> + };
> + template <typename... _Types> constexpr bool __never_valueless() {
> + return _Traits<_Types...>::_S_move_assign &&
> + (_Never_valueless_alt<_Types>::value && ...);
> + }
> + template <bool __trivially_destructible, typename... _Types>
> + struct _Variant_storage;
> + template <typename... _Types>
> + using __select_index =
> + typename __select_int::_Select_int_base<sizeof...(_Types), unsigned char,
> + unsigned short>::type::value_type;
> + template <typename... _Types> struct _Variant_storage<false, _Types...> { ; };
> + template <typename... _Types> struct _Variant_storage<true, _Types...> { ; };
> + template <typename... _Types>
> + using _Variant_storage_alias =
> + _Variant_storage<_Traits<_Types...>::_S_trivial_dtor, _Types...>;
> + ;
> + ;
> + template <bool, typename... _Types>
> + struct _Copy_ctor_base : _Variant_storage_alias<_Types...> {
> + using _Base = _Variant_storage_alias<_Types...>;
> + using _Base::_Base;
> + };
> + template <typename... _Types>
> + struct _Copy_ctor_base<true, _Types...> : _Variant_storage_alias<_Types...> {
> + using _Base = _Variant_storage_alias<_Types...>;
> + using _Base::_Base;
> + };
> + template <typename... _Types>
> + using _Copy_ctor_alias =
> + _Copy_ctor_base<_Traits<_Types...>::_S_trivial_copy_ctor, _Types...>;
> + template <bool, typename... _Types>
> + struct _Move_ctor_base : _Copy_ctor_alias<_Types...> {
> + using _Base = _Copy_ctor_alias<_Types...>;
> + };
> + template <typename... _Types>
> + using _Move_ctor_alias =
> + _Move_ctor_base<_Traits<_Types...>::_S_trivial_move_ctor, _Types...>;
> + template <bool, typename... _Types>
> + struct _Copy_assign_base : _Move_ctor_alias<_Types...> {};
> + template <typename... _Types>
> + using _Copy_assign_alias =
> + _Copy_assign_base<_Traits<_Types...>::_S_trivial_copy_assign, _Types...>;
> + template <bool, typename... _Types>
> + struct _Move_assign_base : _Copy_assign_alias<_Types...> {};
> + template <typename... _Types>
> + using _Move_assign_alias =
> + _Move_assign_base<_Traits<_Types...>::_S_trivial_move_assign, _Types...>;
> + template <typename... _Types>
> + struct _Variant_base : _Move_assign_alias<_Types...> {
> + using _Base = _Move_assign_alias<_Types...>;
> + };
> + ;
> + template <typename _Maybe_variant_cookie, typename _Variant>
> + struct _Extra_visit_slot_needed {
> + template <typename> struct _Variant_never_valueless;
> + template <typename... _Types>
> + struct _Variant_never_valueless<variant<_Types...>>
> + : bool_constant<__variant::__never_valueless<_Types...>()> {};
> + static constexpr bool value =
> + (is_same_v<_Maybe_variant_cookie, __variant_cookie> ||
> + is_same_v<
> + _Maybe_variant_cookie,
> + __variant_idx_cookie>)&&!_Variant_never_valueless<__remove_cvref_t<_Variant>>::
> + value;
> + };
> + template <typename _Tp, size_t... _Dimensions> struct _Multi_array;
> + template <typename _Tp> struct _Multi_array<_Tp> {
> + template <typename> struct __untag_result : false_type {
> + using element_type = _Tp;
> + };
> + template <typename _Res, typename... _Args>
> + struct __untag_result<__deduce_visit_result<_Res> (*)(_Args...)>
> + : true_type {
> + using element_type = _Res (*)(_Args...);
> + };
> + using __result_is_deduced = __untag_result<_Tp>;
> + constexpr const typename __untag_result<_Tp>::element_type &
> + _M_access() const {
> + return _M_data;
> + }
> + typename __untag_result<_Tp>::element_type _M_data;
> + };
> + template <typename _Ret, typename _Visitor, typename... _Variants,
> + size_t __first, size_t... __rest>
> + struct _Multi_array<_Ret (*)(_Visitor, _Variants...), __first, __rest...> {
> + static constexpr size_t __index =
> + sizeof...(_Variants) - sizeof...(__rest) - 1;
> + using _Variant = typename _Nth_type<__index, _Variants...>::type;
> + static constexpr int __do_cookie =
> + _Extra_visit_slot_needed<_Ret, _Variant>::value ? 1 : 0;
> + using _Tp = _Ret (*)(_Visitor, _Variants...);
> + template <typename... _Args>
> + constexpr decltype(auto) _M_access(size_t __first_index,
> + _Args... __rest_indices) const {
> + return _M_arr[__first_index + __do_cookie]._M_access(__rest_indices...);
> + }
> + _Multi_array<_Tp, __rest...> _M_arr[__first + __do_cookie];
> + };
> + template <typename _Array_type, typename _Index_seq> struct __gen_vtable_impl;
> + template <typename _Result_type, typename _Visitor, size_t... __dimensions,
> + typename... _Variants, size_t... __indices>
> + struct __gen_vtable_impl<
> + _Multi_array<_Result_type (*)(_Visitor, _Variants...), __dimensions...>,
> + std::index_sequence<__indices...>> {
> + using _Next = remove_reference_t<
> + typename _Nth_type<sizeof...(__indices), _Variants...>::type>;
> + using _Array_type =
> + _Multi_array<_Result_type (*)(_Visitor, _Variants...), __dimensions...>;
> + static constexpr _Array_type _S_apply() {
> + _Array_type __vtable{};
> + _S_apply_all_alts(__vtable, make_index_sequence<variant_size_v<_Next>>());
> + return __vtable;
> + }
> + template <size_t... __var_indices>
> + static constexpr void
> + _S_apply_all_alts(_Array_type &__vtable,
> + std::index_sequence<__var_indices...>) {
> + if constexpr (_Extra_visit_slot_needed<_Result_type, _Next>::value)
> + (_S_apply_single_alt<true, __var_indices>(
> + __vtable._M_arr[__var_indices + 1], &(__vtable._M_arr[0])),
> + ...);
> + else
> + (_S_apply_single_alt<false, __var_indices>(
> + __vtable._M_arr[__var_indices]),
> + ...);
> + }
> + template <bool __do_cookie, size_t __index, typename _Tp>
> + static constexpr void _S_apply_single_alt(_Tp &__element,
> + _Tp *__cookie_element = nullptr) {
> + }
> + };
> + template <typename _Result_type, typename _Visitor, typename... _Variants,
> + size_t... __indices>
> + struct __gen_vtable_impl<
> + _Multi_array<_Result_type (*)(_Visitor, _Variants...)>,
> + std::index_sequence<__indices...>> {
> + using _Array_type = _Multi_array<_Result_type (*)(_Visitor, _Variants...)>;
> + ;
> + };
> + template <typename _Result_type, typename _Visitor, typename... _Variants>
> + struct __gen_vtable {
> + using _Array_type =
> + _Multi_array<_Result_type (*)(_Visitor, _Variants...),
> + variant_size_v<remove_reference_t<_Variants>>...>;
> + static constexpr _Array_type _S_vtable =
> + __gen_vtable_impl<_Array_type, std::index_sequence<>>::_S_apply();
> + };
> + template <size_t _Np, typename _Tp> struct _Base_dedup : public _Tp {};
> + } // namespace __variant
> + }; // namespace __detail
> + void __throw_bad_variant_access(const char *__what);
> + template <typename... _Types>
> + class variant : private __detail::__variant::_Variant_base<_Types...>,
> + private _Enable_default_constructor<
> + __detail::__variant::_Traits<_Types...>::_S_default_ctor,
> + variant<_Types...>>,
> + private _Enable_copy_move<
> + __detail::__variant::_Traits<_Types...>::_S_copy_ctor,
> + __detail::__variant::_Traits<_Types...>::_S_copy_assign,
> + __detail::__variant::_Traits<_Types...>::_S_move_ctor,
> + __detail::__variant::_Traits<_Types...>::_S_move_assign,
> + variant<_Types...>> {
> + template <typename _Tp> struct __is_in_place_tag : false_type {};
> + template <typename _Tp>
> + struct __is_in_place_tag<in_place_type_t<_Tp>> : true_type {};
> +
> + public:
> + ;
> + constexpr bool valueless_by_exception() const noexcept;
> + constexpr size_t index() const noexcept;
> +
> + private:
> + ;
> + ;
> + };
> + ;
> + template <size_t _Np, typename... _Types>
> + constexpr variant_alternative_t<_Np, variant<_Types...>> &&get(
> + variant<_Types...> && __v);
> + template <size_t _Np, typename... _Types>
> + constexpr const variant_alternative_t<_Np, variant<_Types...>> &get(
> + const variant<_Types...> &__v);
> + template <typename _Result_type, typename _Visitor, typename... _Variants>
> + constexpr decltype(auto) __do_visit(_Visitor && __visitor,
> + _Variants && ...__variants) {
> + constexpr auto &__vtable =
> + __detail::__variant::__gen_vtable<_Result_type, _Visitor &&,
> + _Variants &&...>::_S_vtable;
> + auto __func_ptr = __vtable._M_access(__variants.index()...);
> + return (*__func_ptr)(std::forward<_Visitor>(__visitor),
> + std::forward<_Variants>(__variants)...);
> + }
> + template <typename _Tp, typename... _Types>
> + constexpr inline bool __same_types = (is_same_v<_Tp, _Types> && ...);
> + template <size_t _Idx, typename _Visitor, typename _Variant>
> + decltype(auto) __check_visitor_result(_Visitor && __vis,
> + _Variant && __variant) {
> + return std::__invoke(std::forward<_Visitor>(__vis),
> + std::get<_Idx>(std::forward<_Variant>(__variant)));
> + }
> + template <typename _Visitor, typename _Variant, size_t... _Idxs>
> + constexpr bool __check_visitor_results(std::index_sequence<_Idxs...>) {
> + return __same_types<decltype(__check_visitor_result<_Idxs>(
> + std::declval<_Visitor>(), std::declval<_Variant>()))...>;
> + }
> + template <typename _Visitor, typename... _Variants>
> + constexpr decltype(auto) visit(_Visitor && __visitor,
> + _Variants && ...__variants) {
> + if ((__variants.valueless_by_exception() || ...))
> + __throw_bad_variant_access("std::visit: variant is valueless");
> + using _Result_type =
> + std::invoke_result_t<_Visitor, decltype(std::get<0>(
> + std::declval<_Variants>()))...>;
> + using _Tag = __detail::__variant::__deduce_visit_result<_Result_type>;
> + if constexpr (sizeof...(_Variants) == 1) {
> + constexpr bool __visit_rettypes_match =
> + __check_visitor_results<_Visitor, _Variants...>(
> + std::make_index_sequence<std::variant_size<
> + remove_reference_t<_Variants>...>::value>());
> + if constexpr (!__visit_rettypes_match) {
> + static_assert(__visit_rettypes_match,
> + "std::visit requires the visitor to have the same "
> + "return type for all alternatives of a variant");
> + return;
> + } else
> + return std::__do_visit<_Tag>(std::forward<_Visitor>(__visitor),
> + std::forward<_Variants>(__variants)...);
> + } else
> + return std::__do_visit<_Tag>(std::forward<_Visitor>(__visitor),
> + std::forward<_Variants>(__variants)...);
> + }
> +} // namespace )
> +namespace malloy::concepts {
> +template <typename B>
> +concept const_buffer_sequence = boost::asio::is_const_buffer_sequence<B>::value;
> +template <typename Func>
> +concept accept_handler = std::invocable<Func, malloy::error_code>;
> +template <typename Func>
> +concept err_completion_token =
> + boost::asio::completion_token_for<Func, void(malloy::error_code)>;
> +template <typename B>
> +concept dynamic_buffer = boost::asio::is_dynamic_buffer<B>::value;
> +template <typename Func>
> +concept read_completion_token =
> + boost::asio::completion_token_for<Func, void(boost::beast::error_code,
> + std::size_t)>;
> +namespace detail {
> + template <typename T, template <typename> typename Pred>
> + concept sats_pred = static_cast<bool>(Pred<T>::value);
> + template <template <typename...> typename A,
> + template <typename> typename Cond>
> + struct is_container_of_helper {
> + ;
> + };
> + template <typename T> struct always_true {
> + static constexpr bool value = true;
> + };
> +} // namespace detail
> +template <typename T, template <typename...> typename Container,
> + template <typename> typename Cond>
> +concept is_container_of_if = requires(
> + const T &v, const detail::is_container_of_helper<Container, Cond> &h) {
> + h(v);
> +};
> +template <typename T, template <typename...> typename A>
> +concept is = is_container_of_if<T, A, detail::always_true>;
> +template <typename V>
> +concept is_variant = is<V, std::variant>;
> +namespace detail {
> + template <template <typename...> typename A> struct is_a {};
> +} // namespace detail
> +template <typename T, template <typename...> typename Contained,
> + template <typename...> typename Container>
> +concept is_container_of =
> + is_container_of_if<T, Container, detail::is_a<Contained>::template type>;
> +template <typename T>
> +concept is_variant_of_bodies =
> + is_container_of_if<T, std::variant, boost::beast::http::is_body>;
> +} // namespace malloy::concepts
> +namespace malloy::client::concepts {
> +namespace detail {
> +template <typename F> struct response_filter_body_helper {
> + template <malloy::http::concepts::body T> void operator()(T &&);
> +};
> +template <typename Callback> struct http_cb_helper {
> + Callback cb;
> + ;
> +};
> +} // namespace detail
> +template <typename F>
> +concept response_filter = std::move_constructible<F> &&
> + requires(const F &f, const typename F::header_type &h) {
> + {std::visit(detail::response_filter_body_helper<F>{}, f.body_for(h))};
> +};
> +template <typename F, typename Filter>
> +concept http_callback = response_filter<Filter> && std::move_constructible<F> &&
> + requires(F cb, const Filter &f, const typename Filter::header_type &h) {
> + std::visit(detail::http_cb_helper<F>{std::move(cb)}, f.body_for(h));
> +};
> +} // namespace malloy::client::concepts
> +namespace malloy::http {
> +template <typename Fields = boost::beast::http::fields>
> +using request_header = boost::beast::http::request_header<Fields>;
> +template <typename Body = boost::beast::http::string_body>
> +class request : public boost::beast::http::request<Body> {
> + using msg_t = boost::beast::http::request<Body>;
> +};
> +} // namespace malloy::http
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +class strand_executor_service
> + : public execution_context_service_base<strand_executor_service> {
> +public:
> + class strand_impl {
> + public:
> + private:
> + friend class strand_executor_service;
> + strand_executor_service *service_;
> + };
> + typedef shared_ptr<strand_impl> implementation_type;
> +};
> +} // namespace detail
> +template <typename Executor> class strand {
> +public:
> + typedef Executor inner_executor_type;
> + ;
> + ;
> +};
> +template <typename Executor>
> +strand<Executor> make_strand(
> + const Executor &ex,
> + typename constraint<is_executor<Executor>::value ||
> + execution::is_executor<Executor>::value>::type = 0);
> +template <typename ExecutionContext>
> +strand<typename ExecutionContext::executor_type> make_strand(
> + ExecutionContext &ctx,
> + typename constraint<is_convertible<ExecutionContext &,
> + execution_context &>::value>::type = 0);
> +namespace traits {}
> +} // namespace asio
> +} // namespace boost
> +namespace fmt {
> +inline namespace v8 {
> +template <bool B, typename T = void>
> +using enable_if_t = typename std::enable_if<B, T>::type;
> +template <bool B, typename T, typename F>
> +using conditional_t = typename std::conditional<B, T, F>::type;
> +template <bool B> using bool_constant = std::integral_constant<bool, B>;
> +template <typename T>
> +using remove_reference_t = typename std::remove_reference<T>::type;
> +template <typename T>
> +using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
> +template <typename T> struct type_identity { using type = T; };
> +template <typename T> using type_identity_t = typename type_identity<T>::type;
> +struct monostate {};
> +;
> +namespace detail {
> +constexpr inline __attribute__((always_inline)) auto
> +is_constant_evaluated() noexcept -> bool {
> + return std::is_constant_evaluated();
> +}
> +template <typename T> constexpr auto const_check(T value) -> T { return value; }
> +constexpr unsigned char micro[] = "\u00B5";
> +} // namespace detail
> +template <typename Char> class basic_string_view {
> +private:
> + const Char *data_;
> + size_t size_;
> +
> +public:
> + using value_type = Char;
> + using iterator = const Char *;
> + constexpr inline __attribute__((always_inline))
> + basic_string_view(const Char *s)
> + : data_(s) {
> + if (detail::const_check(std::is_same<Char, char>::value &&
> + !detail::is_constant_evaluated()))
> + size_ = std::strlen(reinterpret_cast<const char *>(s));
> + else
> + size_ = std::char_traits<Char>::length(s);
> + };
> + ;
> +};
> +using string_view = basic_string_view<char>;
> +;
> +namespace detail {
> +template <typename S>
> +struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))> {
> +};
> +template <typename S, typename = void> struct char_t_impl {};
> +struct error_handler {
> + [[noreturn]] void on_error(const char *message);
> +};
> +} // namespace detail
> +template <typename S> using char_t = typename detail::char_t_impl<S>::type;
> +template <typename Char, typename ErrorHandler = detail::error_handler>
> +class basic_format_parse_context : private ErrorHandler {
> + using iterator = typename basic_string_view<Char>::iterator;
> +};
> +template <typename Context> class basic_format_args;
> +template <typename Context> class dynamic_format_arg_store;
> +template <typename T, typename Char = char, typename Enable = void>
> +struct formatter {};
> +template <typename T, typename Context>
> +using has_formatter =
> + std::is_constructible<typename Context::template formatter_type<T>>;
> +template <typename T> struct is_contiguous : std::false_type {};
> +template <typename Char>
> +struct is_contiguous<std::basic_string<Char>> : std::true_type {};
> +class appender;
> +namespace detail {
> +template <typename T> class buffer {
> +private:
> + T *ptr_;
> +
> +public:
> + using value_type = T;
> + size_t count_ = 0;
> +
> +protected:
> +public:
> +};
> +template <typename T>
> +using buffer_appender = conditional_t<std::is_same<T, char>::value, appender,
> + std::back_insert_iterator<buffer<T>>>;
> +template <typename T, typename Char = char, typename Enable = void>
> +struct fallback_formatter {};
> +template <typename T, typename Char>
> +using has_fallback_formatter =
> + std::is_constructible<fallback_formatter<T, Char>>;
> +struct view {};
> +template <typename Char, typename T> struct named_arg : view {
> + const Char *name;
> + const T &value;
> +};
> +template <typename Char> struct named_arg_info {
> + const Char *name;
> + int id;
> + ;
> +};
> +;
> +template <typename T> struct is_named_arg : std::false_type {};
> +;
> +template <bool B = false> constexpr auto count() -> size_t { return B ? 1 : 0; }
> +template <typename... Args> constexpr auto count_named_args() -> size_t {
> + return count<is_named_arg<Args>::value...>();
> +}
> +enum class type {
> + none_type,
> + int_type,
> + uint_type,
> + long_long_type,
> + ulong_long_type,
> + int128_type,
> + uint128_type,
> + bool_type,
> + char_type,
> + last_integer_type = char_type,
> + float_type,
> + double_type,
> + long_double_type,
> + last_numeric_type = long_double_type,
> + cstring_type,
> + string_type,
> + pointer_type,
> + custom_type
> +};
> +template <typename T, typename Char>
> +struct type_constant : std::integral_constant<type, type::custom_type> {};
> +template <typename Char>
> +struct type_constant<const void *, Char>
> + : std::integral_constant<type, type::pointer_type> {
> + const named_arg_info<Char> *data;
> +};
> +template <typename Context> class value {};
> +;
> +enum { long_short = sizeof(long) == sizeof(int) };
> +using long_type = conditional_t<long_short, int, long long>;
> +using ulong_type = conditional_t<long_short, unsigned, unsigned long long>;
> +struct unformattable {};
> +template <typename Context> struct arg_mapper {};
> +template <typename T, typename Context>
> +using mapped_type_constant = type_constant<decltype(arg_mapper<Context>().map(
> + std::declval<const T &>())),
> + typename Context::char_type>;
> +enum { packed_arg_bits = 4 };
> +enum { max_packed_args = 62 / packed_arg_bits };
> +enum : unsigned long long { is_unpacked_bit = 1ULL << 63 };
> +enum : unsigned long long { has_named_args_bit = 1ULL << 62 };
> +} // namespace detail
> +template <typename Context> class basic_format_arg {
> +private:
> + detail::value<Context> value_;
> + detail::type type_;
> +};
> +;
> +namespace detail {
> +;
> +;
> +} // namespace detail
> +template <typename OutputIt, typename Char> class basic_format_context {
> +public:
> + using char_type = Char;
> + template <typename T> using formatter_type = formatter<T, char_type>;
> +};
> +template <typename Context, typename... Args> class format_arg_store {
> +private:
> + static const size_t num_args = sizeof...(Args);
> + using format_arg = basic_format_arg<Context>;
> +
> +private:
> + unsigned long long desc_;
> + union {
> + const detail::value<Context> *values_;
> + const format_arg *args_;
> + };
> +};
> +namespace sign {
> +enum type { none, minus, plus, space };
> +template <typename Char> struct fill_t {
> +private:
> + enum { max_size = 4 };
> +
> +public:
> +};
> +} // namespace sign
> +template <typename Char> struct basic_format_specs {
> + int width;
> + int precision;
> +};
> +using format_specs = basic_format_specs<char>;
> +namespace detail {
> +enum class arg_id_kind { none, index, name };
> +;
> +;
> +template <typename Char, typename ErrorHandler = error_handler>
> +class compile_parse_context
> + : public basic_format_parse_context<Char, ErrorHandler> {
> +private:
> + int num_args_;
> + using base = basic_format_parse_context<Char, ErrorHandler>;
> +
> +public:
> +};
> +constexpr int invalid_arg_index = -1;
> +;
> +;
> +template <typename Char, typename ErrorHandler, typename... Args>
> +class format_string_checker {
> +private:
> + using parse_context_type = compile_parse_context<Char, ErrorHandler>;
> + enum { num_args = sizeof...(Args) };
> +
> +public:
> +};
> +;
> +}; // namespace detail
> +template <typename Char, typename... Args> class basic_format_string {
> +private:
> + basic_string_view<Char> str_;
> +
> +public:
> + template <typename S,
> + enable_if_t<(std::is_convertible<const S &,
> + basic_string_view<Char>>::value),
> + int> = 0>
> + consteval basic_format_string(const S &s) : str_(s) {
> + static_assert(
> + detail::count<
> + (std::is_base_of<detail::view, remove_reference_t<Args>>::value &&
> + std::is_reference<Args>::value)...>() == 0,
> + "passing views as lvalues is disallowed");
> + if constexpr (detail::count_named_args<Args...>() == 0) {
> + using checker = detail::format_string_checker<Char, detail::error_handler,
> + remove_cvref_t<Args>...>;
> + }
> + }
> +};
> +template <typename... Args>
> +using format_string = basic_format_string<char, type_identity_t<Args>...>;
> +;
> +enum { inline_buffer_size = 500 };
> +template <typename T, size_t SIZE = inline_buffer_size,
> + typename Allocator = std::allocator<T>>
> +class basic_memory_buffer final : public detail::buffer<T> {
> + ;
> +};
> +;
> +} // namespace v8
> +using string_view_t = fmt::basic_string_view<char>;
> +using memory_buf_t = fmt::basic_memory_buffer<char, 250>;
> +using level_t = std::atomic<int>;
> +namespace level {
> +enum level_enum {
> + trace = 0,
> + debug = 1,
> + info = 2,
> + warn = 3,
> + err = 4,
> + critical = 5,
> + off = 6,
> + n_levels
> +};
> +}
> +struct source_loc {
> + const char *funcname{nullptr};
> +};
> +namespace details {
> +struct log_msg {
> + string_view_t logger_name;
> +};
> +} // namespace details
> +namespace details {
> +template <typename T> class circular_q { private: };
> +} // namespace details
> +} // namespace fmt
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename... _MutexTypes> class scoped_lock {
> + public:
> + private:
> + tuple<_MutexTypes &...> _M_devices;
> + };
> +} // namespace )
> +namespace spdlog {
> +namespace details {
> +class backtracer {
> + mutable std::mutex mutex_;
> +
> +public:
> +};
> +} // namespace details
> +class logger {
> +public:
> + ;
> + template <typename... Args>
> + void trace(fmt::format_string<Args...> fmt, Args &&...args);
> + template <typename... Args>
> + void debug(fmt::format_string<Args...> fmt, Args &&...args);
> + template <typename... Args>
> + void error(fmt::format_string<Args...> fmt, Args &&...args);
> + ;
> + virtual std::shared_ptr<logger> clone(std::string logger_name);
> +
> +protected:
> + std::string name_;
> +};
> +} // namespace spdlog
> +namespace std __attribute__((__visibility__("default"))) {
> + class thread {
> + using native_handle_type = __gthread_t;
> + class id {
> + native_handle_type _M_thread;
> + };
> +
> + private:
> + id _M_id;
> + };
> + struct __at_thread_exit_elt {
> + typedef chrono::steady_clock __clock_t;
> + ;
> + };
> + template <typename _Res> class promise;
> + enum class launch { async = 1, deferred = 2 };
> + template <typename _Fn, typename... _Args>
> + using __async_result_of =
> + typename __invoke_result<typename decay<_Fn>::type,
> + typename decay<_Args>::type...>::type;
> + struct __future_base {
> + class _State_baseV2 {
> + ;
> +
> + private:
> + struct _Make_ready final : __at_thread_exit_elt {
> + weak_ptr<_State_baseV2> _M_shared_state;
> + };
> + };
> + using _State_base = _State_baseV2;
> + ;
> + };
> + template <typename _Res> class __basic_future : public __future_base {
> + protected:
> + typedef shared_ptr<_State_base> __state_type;
> +
> + protected:
> + struct _Reset {
> + __basic_future &_M_fut;
> + };
> + };
> + template <typename _Res> class future : public __basic_future<_Res> {
> + public:
> + _Res get();
> + };
> + struct nullopt_t {
> + enum class _Construct { _Token };
> + explicit constexpr nullopt_t(_Construct) {}
> + };
> + inline constexpr nullopt_t nullopt{nullopt_t::_Construct::_Token};
> + template <typename _Tp> struct _Optional_payload_base {
> + using _Stored_type = remove_const_t<_Tp>;
> + };
> + template <typename _Tp, bool = is_trivially_destructible_v<_Tp>,
> + bool = is_trivially_copy_assignable_v<_Tp>
> + &&is_trivially_copy_constructible_v<_Tp>,
> + bool = is_trivially_move_assignable_v<_Tp>
> + &&is_trivially_move_constructible_v<_Tp>>
> + struct _Optional_payload;
> + template <typename _Tp>
> + struct _Optional_payload<_Tp, true, false, false>
> + : _Optional_payload_base<_Tp> {
> + using _Optional_payload_base<_Tp>::_Optional_payload_base;
> + };
> + template <typename _Tp, typename _Dp> class _Optional_base_impl {
> + protected:
> + using _Stored_type = remove_const_t<_Tp>;
> + ;
> + };
> + template <typename _Tp, bool = is_trivially_copy_constructible_v<_Tp>,
> + bool = is_trivially_move_constructible_v<_Tp>>
> + struct _Optional_base : _Optional_base_impl<_Tp, _Optional_base<_Tp>> {
> + _Optional_payload<_Tp> _M_payload;
> + };
> + template <typename _Tp>
> + class optional
> + : private _Optional_base<_Tp>,
> + private _Enable_copy_move<
> + is_copy_constructible_v<_Tp>,
> + __and_v<is_copy_constructible<_Tp>, is_copy_assignable<_Tp>>,
> + is_move_constructible_v<_Tp>,
> + __and_v<is_move_constructible<_Tp>, is_move_assignable<_Tp>>,
> + optional<_Tp>> {
> + static_assert(!is_reference_v<_Tp>);
> + };
> + template <typename _Tp>
> + using __optional_relop_t =
> + enable_if_t<is_convertible<_Tp, bool>::value, bool>;
> +} // namespace )
> +namespace boost {
> +namespace beast {
> +namespace websocket {
> +using request_type = http::request<http::empty_body>;
> +using response_type = http::response<http::string_body>;
> +template <class Allocator>
> +bool is_upgrade(
> + beast::http::header<true, http::basic_fields<Allocator>> const &req);
> +enum close_code : std::uint16_t {
> + normal = 1000,
> + going_away = 1001,
> + protocol_error = 1002,
> + unknown_data = 1003,
> + bad_payload = 1007,
> + policy_error = 1008,
> + too_big = 1009,
> + needs_extension = 1010,
> + internal_error = 1011,
> + service_restart = 1012,
> + try_again_later = 1013,
> + none = 0,
> + reserved1 = 1004,
> + no_status = 1005,
> + abnormal = 1006,
> + reserved2 = 1014,
> + reserved3 = 1015
> +};
> +using reason_string = static_string<123, char>;
> +using ping_data = static_string<125, char>;
> +struct close_reason {
> + std::uint16_t code = close_code::none;
> + reason_string reason;
> +};
> +} // namespace websocket
> +namespace websocket {
> +namespace detail {
> +template <class T, class U, class = void>
> +struct can_invoke_with : std::false_type {
> + ;
> +};
> +} // namespace detail
> +} // namespace websocket
> +} // namespace beast
> +namespace beast {
> +namespace websocket {
> +struct stream_base {
> + using duration = std::chrono::steady_clock::duration;
> +};
> +} // namespace websocket
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace websocket {
> +template <class NextLayer, bool deflateSupported = true> class stream;
> +}
> +} // namespace beast
> +namespace beast {
> +namespace detail {
> +namespace base64 {
> +inline std::size_t constexpr encoded_size(std::size_t n) {
> + return 4 * ((n + 2) / 3);
> +}
> +} // namespace base64
> +} // namespace detail
> +namespace websocket {
> +namespace detail {
> +using sec_ws_key_type = static_string<beast::detail::base64::encoded_size(16)>;
> +using sec_ws_accept_type =
> + static_string<beast::detail::base64::encoded_size(20)>;
> +} // namespace detail
> +} // namespace websocket
> +} // namespace beast
> +namespace beast {}
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace websocket {
> +namespace detail {
> +enum class opcode : std::uint8_t {
> + cont = 0,
> + text = 1,
> + binary = 2,
> + rsv3 = 3,
> + rsv4 = 4,
> + rsv5 = 5,
> + rsv6 = 6,
> + rsv7 = 7,
> + close = 8,
> + ping = 9,
> + pong = 10,
> + crsvb = 11,
> + crsvc = 12,
> + crsvd = 13,
> + crsve = 14,
> + crsvf = 15
> +};
> +}
> +} // namespace websocket
> +namespace zlib {
> +using Byte = unsigned char;
> +using uInt = unsigned int;
> +enum kind { none = 0, best_speed = 1, best_size = 9, default_size = -1 };
> +enum class Strategy { normal, filtered, huffman, rle, fixed };
> +} // namespace zlib
> +} // namespace beast
> +namespace beast {
> +namespace zlib {
> +namespace detail {
> +class deflate_stream {};
> +} // namespace detail
> +class deflate_stream : private detail::deflate_stream {
> +public:
> +};
> +} // namespace zlib
> +} // namespace beast
> +namespace beast {
> +namespace zlib {
> +namespace detail {
> +class bitstream {
> + using value_type = std::uint32_t;
> + ;
> + ;
> +};
> +class inflate_stream {
> +protected:
> +private:
> + enum Mode {
> + HEAD,
> + FLAGS,
> + TIME,
> + OS,
> + EXLEN,
> + EXTRA,
> + NAME,
> + COMMENT,
> + HCRC,
> + TYPE,
> + TYPEDO,
> + STORED,
> + COPY_,
> + COPY,
> + TABLE,
> + LENLENS,
> + CODELENS,
> + LEN_,
> + LEN,
> + LENEXT,
> + DIST,
> + DISTEXT,
> + MATCH,
> + LIT,
> + CHECK,
> + LENGTH,
> + DONE,
> + BAD,
> + SYNC
> + };
> + struct code {};
> + enum class build { codes, lens, dists };
> + unsigned lenbits_;
> + unsigned distbits_;
> +};
> +} // namespace detail
> +} // namespace zlib
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace zlib {
> +class inflate_stream : private detail::inflate_stream {
> +public:
> +};
> +} // namespace zlib
> +} // namespace beast
> +namespace beast {
> +namespace websocket {
> +namespace detail {
> +template <bool deflateSupported> struct impl_base;
> +template <> struct impl_base<true> {
> + struct pmd_type {};
> + ;
> +};
> +} // namespace detail
> +} // namespace websocket
> +namespace websocket {
> +enum class frame_type { close, ping, pong };
> +namespace detail {
> +class frame_test;
> +}
> +template <class NextLayer, bool deflateSupported>
> +class stream : private stream_base {
> + struct impl_type;
> + static std::size_t constexpr max_control_frame_size = 2 + 8 + 4 + 125;
> + static std::size_t constexpr tcp_frame_size = 1536;
> + ;
> + template <class> class handshake_op;
> + struct run_accept_op;
> + struct run_close_op;
> +};
> +} // namespace websocket
> +} // namespace beast
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +namespace detail {
> +template <class T> struct service_base : net::execution_context::service {
> + static net::execution_context::id const id;
> +};
> +template <class T> net::execution_context::id const service_base<T>::id;
> +} // namespace detail
> +} // namespace beast
> +namespace beast {
> +namespace websocket {
> +namespace detail {
> +class service : public beast::detail::service_base<service> {
> +public:
> + class impl_type : public boost::enable_shared_from_this<impl_type> {
> + public:
> + };
> +
> +private:
> + std::mutex m_;
> + std::vector<impl_type *> v_;
> +
> +public:
> +};
> +} // namespace detail
> +} // namespace websocket
> +namespace websocket {
> +namespace detail {
> +class soft_mutex {};
> +} // namespace detail
> +} // namespace websocket
> +} // namespace beast
> +namespace beast {
> +namespace websocket {
> +template <class NextLayer, bool deflateSupported>
> +struct stream<NextLayer, deflateSupported>::impl_type
> + : boost::empty_value<NextLayer>,
> + detail::service::impl_type,
> + detail::impl_base<deflateSupported> {
> + ;
> + template <class Executor>
> + class timeout_handler : boost::empty_value<Executor> {
> + boost::weak_ptr<impl_type> wp_;
> +
> + public:
> + using executor_type = Executor;
> + };
> +};
> +template <class NextLayer, bool deflateSupported>
> +template <class Handler>
> +class stream<NextLayer, deflateSupported>::handshake_op
> + : public beast::stable_async_base<Handler, beast::executor_type<stream>>,
> + public asio::coroutine {};
> +} // namespace websocket
> +} // namespace beast
> +typedef struct asn1_string_st ASN1_OCTET_STRING;
> +typedef struct bio_st BIO;
> +typedef struct ssl_st SSL;
> +typedef struct ASN1_VALUE_st ASN1_VALUE;
> +typedef struct asn1_type_st {
> + int type;
> + ASN1_OCTET_STRING *salt;
> +} SCRYPT_PARAMS;
> +namespace asio {
> +namespace ssl {
> +class stream_base {
> +public:
> + enum handshake_type { client, server };
> +
> +protected:
> +};
> +} // namespace ssl
> +} // namespace asio
> +namespace asio {}
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +template <typename Time, typename TimeTraits = boost::asio::time_traits<Time>,
> + typename Executor = any_io_executor>
> +class basic_deadline_timer {
> +public:
> + typedef Executor executor_type;
> +};
> +namespace ssl {
> +namespace detail {}
> +} // namespace ssl
> +namespace ssl {
> +template <typename Stream>
> +class stream : public stream_base, private noncopyable {
> +public:
> + typedef SSL *native_handle_type;
> + struct impl_struct {
> + SSL *ssl;
> + };
> + typedef typename remove_reference<Stream>::type next_layer_type;
> +};
> +} // namespace ssl
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace beast {
> +template <class NextLayer> class ssl_stream : public net::ssl::stream_base {
> + using ssl_stream_type = net::ssl::stream<NextLayer>;
> + using stream_type = boost::beast::flat_stream<ssl_stream_type>;
> +};
> +;
> +;
> +} // namespace beast
> +} // namespace boost
> +namespace malloy::websocket {
> +namespace detail {
> +using tls_stream = boost::beast::websocket::stream<
> + boost::beast::ssl_stream<boost::beast::tcp_stream>>;
> +using websocket_t =
> + std::variant<tls_stream,
> + boost::beast::websocket::stream<boost::beast::tcp_stream>>;
> +template <typename T>
> +concept rw_completion_token =
> + boost::asio::completion_token_for<T, void(malloy::error_code, std::size_t)>;
> +} // namespace detail
> +class stream {
> + using ws_t = detail::websocket_t;
> +
> +public:
> + explicit stream(boost::beast::tcp_stream &&from);
> + ;
> + auto get_executor() {
> + return std::visit([](auto &s) {}, m_underlying_conn);
> + }
> +
> +private:
> + ws_t m_underlying_conn;
> +};
> +} // namespace malloy::websocket
> +namespace std __attribute__((__visibility__("default"))) {
> + template <typename _Tp, typename _Ref, typename _Ptr> struct _Deque_iterator {
> + private:
> + template <typename _CvTp>
> + using __iter = _Deque_iterator<_Tp, _CvTp &, __ptr_rebind<_Ptr, _CvTp>>;
> +
> + public:
> + typedef __iter<_Tp> iterator;
> + typedef std::random_access_iterator_tag iterator_category;
> + };
> + template <typename _Tp, typename _Alloc> class _Deque_base {
> + protected:
> + typedef
> + typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other
> + _Tp_alloc_type;
> + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
> + typedef typename _Alloc_traits::pointer _Ptr;
> + typedef typename _Alloc_traits::const_pointer _Ptr_const;
> + typedef _Alloc allocator_type;
> + typedef _Deque_iterator<_Tp, _Tp &, _Ptr> iterator;
> + typedef _Deque_iterator<_Tp, const _Tp &, _Ptr_const> const_iterator;
> + typedef typename iterator::_Map_pointer _Map_pointer;
> + struct _Deque_impl_data {};
> + };
> + template <typename _Tp, typename _Alloc = std::allocator<_Tp>>
> + class deque : protected _Deque_base<_Tp, _Alloc> {
> + ;
> + };
> + template <typename _Tp, typename _Sequence = deque<_Tp>> class queue { ; };
> +} // namespace )
> +namespace malloy::detail {
> +template <typename Executor> class action_queue {
> + template <typename... Args> class basic_action { public: };
> +
> +public:
> + using act_args = basic_action<> &;
> + using action = basic_action<act_args>;
> +
> +private:
> + using act_t = std::unique_ptr<action>;
> + using acts_t = std::queue<act_t>;
> + using ioc_t = boost::asio::strand<Executor>;
> + class on_done_delegate : public basic_action<> {
> + public:
> + action_queue *parent;
> + };
> +
> +public:
> + template <std::derived_from<action> Act>
> + void push(Act &&act) requires(std::is_move_constructible_v<Act>);
> +
> +private:
> + acts_t m_acts;
> +};
> +} // namespace malloy::detail
> +namespace malloy::websocket {
> +template <bool isClient>
> +class connection : public std::enable_shared_from_this<connection<isClient>> {
> + using ws_executor_t =
> + std::invoke_result_t<decltype(&stream::get_executor), stream *>;
> + using act_queue_t = malloy::detail::action_queue<ws_executor_t>;
> + template <std::invocable<error_code, std::size_t> Callback,
> + concepts::dynamic_buffer Buff>
> + class read_delegate : public act_queue_t::action {
> + ;
> + };
> + template <std::invocable<error_code, std::size_t> Callback,
> + concepts::const_buffer_sequence Payload>
> + class write_delegate : public act_queue_t::action {
> + public:
> + Callback done;
> + std::shared_ptr<connection> me;
> + };
> +
> +public:
> + using handler_t = std::function<void(const malloy::http::request<> &,
> + const std::shared_ptr<connection> &)>;
> + enum class state {
> + handshaking,
> + active,
> + closing,
> + closed,
> + inactive,
> + };
> + void set_binary(const bool enabled);
> + static std::shared_ptr<connection>
> + make(const std::shared_ptr<spdlog::logger> logger, stream &&ws,
> + const std::string &agent_string);
> + ;
> + auto read(concepts::dynamic_buffer auto &buff,
> + concepts::read_completion_token auto &&done) {
> + using buff_t = std::remove_cvref_t<decltype(buff)>;
> + m_logger->trace("read()");
> + auto wrapper = [buff = &buff, this,
> + me = this->shared_from_this()](auto done) mutable {};
> + return boost::asio::async_initiate<decltype(done),
> + void(error_code, std::size_t)>(
> + std::move(wrapper), done);
> + }
> + template <concepts::read_completion_token Callback>
> + auto send(const concepts::const_buffer_sequence auto &payload,
> + Callback &&done) {
> + using payload_t = std::remove_cvref_t<decltype(payload)>;
> + m_logger->trace("send(). payload size: {}", payload.size());
> + auto wrapper = [this, payload = payload,
> + me = this->shared_from_this()](auto done) mutable {
> + m_write_queue.push(
> + write_delegate<std::remove_cv_t<decltype(done)>, payload_t>{
> + std::move(done), me, payload});
> + };
> + return boost::asio::async_initiate<Callback, void(error_code, std::size_t)>(
> + std::move(wrapper), done);
> + }
> +
> +private:
> + enum class sending_state { idling, sending };
> + enum sending_state m_sending_state = sending_state::idling;
> + std::shared_ptr<spdlog::logger> m_logger;
> + stream m_ws;
> + std::string m_agent_string;
> + act_queue_t m_write_queue;
> + act_queue_t m_read_queue;
> + std::atomic<state> m_state{state::inactive};
> +};
> +} // namespace malloy::websocket
> +namespace malloy::client::websocket {
> +using connection = malloy::websocket::connection<true>;
> +}
> +namespace malloy {
> +class controller {
> +public:
> + enum class state { starting, running, stopping, stopped };
> + struct config {
> + std::size_t num_threads = 1;
> + std::shared_ptr<spdlog::logger> logger;
> + };
> + [[nodiscard]] virtual std::future<void> stop();
> +
> +protected:
> + [[nodiscard("init may fail")]] bool init(const config &cfg);
> + [[nodiscard]] boost::asio::io_context &io_ctx() const noexcept {
> + return *m_io_ctx;
> + }
> + std::shared_ptr<boost::asio::io_context> m_io_ctx;
> + std::vector<std::thread> m_io_threads;
> + std::atomic<enum state> m_state = state::stopped;
> +};
> +} // namespace malloy
> +namespace boost::asio::ssl {
> +class context;
> +}
> +namespace malloy::client {
> +namespace detail {
> +template <typename T>
> +concept ws_accept_completion_tkn = boost::asio::completion_token_for<
> + T, void(malloy::error_code, std::shared_ptr<websocket::connection>)>;
> +struct default_resp_filter {
> + using response_type = malloy::http::response<>;
> + using header_type = boost::beast::http::response_header<>;
> + using value_type = std::string;
> + auto body_for(const header_type &) const
> + -> std::variant<boost::beast::http::string_body>;
> +};
> +static_assert(malloy::client::concepts::response_filter<default_resp_filter>,
> + "default_resp_filter must satisfy response_filter");
> +} // namespace detail
> +class controller : public malloy::controller {
> +public:
> + struct config : malloy::controller::config {
> + std::string user_agent{"malloy-client"};
> + };
> + [[nodiscard("init may fail")]] auto init(config cfg) -> bool;
> + [[nodiscard("init might fail")]] bool init_tls();
> + template <malloy::http::concepts::body ReqBody, typename Callback,
> + concepts::response_filter Filter = detail::default_resp_filter>
> + requires concepts::http_callback<Callback, Filter>
> + [[nodiscard]] auto http_request(malloy::http::request<ReqBody> req,
> + Callback &&done, Filter filter = {})
> + -> std::future<malloy::error_code> {
> + return make_http_connection<true>(
> + std::move(req), std::forward<Callback>(done), std::move(filter));
> + }
> + auto wss_connect(const std::string &host, std::uint16_t port,
> + const std::string &resource,
> + detail::ws_accept_completion_tkn auto &&handler) {
> + check_tls();
> + return make_ws_connection<true>(host, port, resource,
> + std::forward<decltype(handler)>(handler));
> + }
> + void add_ca_file(const std::filesystem::path &file);
> + auto ws_connect(const std::string &host, std::uint16_t port,
> + const std::string &resource,
> + detail::ws_accept_completion_tkn auto &&handler) {
> + return make_ws_connection<false>(host, port, resource,
> + std::forward<decltype(handler)>(handler));
> + }
> +
> +protected:
> +private:
> + std::shared_ptr<boost::asio::ssl::context> m_tls_ctx;
> + config m_cfg;
> + void check_tls() const;
> + ;
> + template <bool isSecure>
> + auto make_ws_connection(const std::string &host, std::uint16_t port,
> + const std::string &resource,
> + detail::ws_accept_completion_tkn auto &&handler) {
> + auto resolver = std::make_shared<boost::asio::ip::tcp::resolver>(
> + boost::asio::make_strand(io_ctx()));
> + auto on_resolve = [this, resolver, resource,
> + handler = std::forward<decltype(handler)>(handler)](
> + auto act, error_code ec, auto results) mutable {
> + (void)handler;
> + if (ec) {
> + auto conn = websocket::connection::make(
> + m_cfg.logger->clone("connection"),
> + [this]() -> malloy::websocket::stream {
> + if constexpr (isSecure) {
> + return malloy::websocket::stream{
> + boost::beast::ssl_stream<boost::beast::tcp_stream>{
> + boost::beast::tcp_stream{
> + boost::asio::make_strand(io_ctx())},
> + *m_tls_ctx}};
> + } else
> + return malloy::websocket::stream{boost::beast::tcp_stream{
> + boost::asio::make_strand(io_ctx())}};
> + });
> + }
> + };
> + auto resolve_wrapper = [host, port, resolver,
> + on_resolve =
> + std::move(on_resolve)](auto done) mutable {
> + resolver->async_resolve(
> + host, std::to_string(port),
> + [done = std::forward<decltype(done)>(done),
> + on_resolve = std::move(on_resolve)](auto ec, auto rs) mutable {
> + on_resolve(std::forward<decltype(done)>(done), ec, rs);
> + });
> + };
> + return boost::asio::async_initiate<
> + decltype(handler),
> + void(error_code, std::shared_ptr<websocket::connection>)>(
> + std::move(resolve_wrapper), handler);
> + }
> +};
> +} // namespace malloy::client
> +namespace malloy::server {
> +class router;
> +class listener;
> +class controller : public malloy::controller {
> +public:
> + struct config : malloy::controller::config {
> + std::string interface = "127.0.0.1";
> + std::uint16_t port = 8080;
> + };
> + [[nodiscard("init may fail")]] bool init(config cfg);
> + [[nodiscard]] std::shared_ptr<malloy::server::router>
> + router() const noexcept {
> + return m_router;
> + }
> + std::shared_ptr<boost::asio::ssl::context> m_tls_ctx;
> + std::shared_ptr<malloy::server::router> m_router;
> +};
> +} // namespace malloy::server
> +namespace std __attribute__((__visibility__("default"))) {
> + inline namespace __n4861 {
> + template <typename _Result, typename = void>
> + struct __coroutine_traits_impl {};
> + template <typename _Result, typename...>
> + struct coroutine_traits : __coroutine_traits_impl<_Result> {};
> + template <typename _Promise = void> struct coroutine_handle;
> + template <> struct coroutine_handle<void> {
> + public:
> + constexpr coroutine_handle(std::nullptr_t __h);
> +
> + public:
> + public:
> + protected:
> + void *_M_fr_ptr;
> + };
> + template <typename _Promise> struct coroutine_handle {
> + constexpr operator coroutine_handle<>() const noexcept;
> + _Promise &promise() const;
> +
> + private:
> + void *_M_fr_ptr = nullptr;
> + };
> + struct suspend_always {
> + constexpr bool await_ready() const noexcept;
> + constexpr void await_suspend(coroutine_handle<>) const noexcept;
> + constexpr void await_resume() const noexcept;
> + };
> + struct suspend_never {};
> + } // namespace __n4861
> +} // namespace )
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +using std::coroutine_handle;
> +using std::suspend_always;
> +template <typename> class awaitable_thread;
> +template <typename, typename> class awaitable_frame;
> +} // namespace detail
> +template <typename T, typename Executor = any_io_executor>
> +class [[nodiscard]] awaitable {
> +public:
> + typedef T value_type;
> + typedef Executor executor_type;
> + constexpr awaitable() noexcept : frame_(nullptr) {}
> + awaitable(awaitable &&other) noexcept
> + : frame_(std::exchange(other.frame_, nullptr)) {}
> + awaitable &operator=(awaitable &&other) noexcept {
> + if (this != &other)
> + frame_ = std::exchange(other.frame_, nullptr);
> + return !!frame_;
> + }
> + bool await_ready() const noexcept { return false; }
> + template <class U>
> + void await_suspend(
> + detail::coroutine_handle<detail::awaitable_frame<U, Executor>> h) {
> + frame_->push_frame(&h.promise());
> + }
> + T await_resume() {
> + return awaitable(static_cast<awaitable &&>(*this)).frame_->get();
> + }
> +
> +private:
> + template <typename> friend class detail::awaitable_thread;
> + explicit awaitable(detail::awaitable_frame<T, Executor> *a) : frame_(a) {}
> + detail::awaitable_frame<T, Executor> *frame_;
> +};
> +namespace detail {
> +struct awaitable_thread_has_context_switched {};
> +template <typename Executor> class awaitable_frame_base {
> +public:
> + auto initial_suspend() noexcept { return suspend_always(); }
> + auto final_suspend() noexcept {
> + struct result {
> + awaitable_frame_base *this_;
> + bool await_ready() const noexcept;
> + void await_suspend(coroutine_handle<void>) noexcept;
> + void await_resume() const noexcept;
> + };
> + return result{this};
> + }
> + void unhandled_exception();
> + template <typename T> auto await_transform(awaitable<T, Executor> a) const {
> + if (attached_thread_->entry_point()->throw_if_cancelled_)
> + if (!!attached_thread_->get_cancellation_state().cancelled())
> + do_throw_error(boost::asio::error::operation_aborted, "co_await");
> + return a;
> + };
> + void push_frame(awaitable_frame_base<Executor> *caller) noexcept;
> +
> +protected:
> + coroutine_handle<void> coro_ = nullptr;
> + awaitable_thread<Executor> *attached_thread_ = nullptr;
> + awaitable_frame_base<Executor> *caller_ = nullptr;
> + std::exception_ptr pending_exception_ = nullptr;
> +};
> +template <typename T, typename Executor>
> +class awaitable_frame : public awaitable_frame_base<Executor> {
> +public:
> + T get();
> +
> +private:
> + alignas(T) unsigned char result_[sizeof(T)];
> + bool has_result_ = false;
> +};
> +template <typename Executor>
> +class awaitable_frame<void, Executor> : public awaitable_frame_base<Executor> {
> +public:
> + awaitable<void, Executor> get_return_object();
> + ;
> + void get();
> +};
> +struct awaitable_thread_entry_point {};
> +template <typename Executor>
> +class awaitable_frame<awaitable_thread_entry_point, Executor>
> + : public awaitable_frame_base<Executor> {
> +public:
> + ;
> + bool has_context_switched_;
> + bool throw_if_cancelled_;
> +};
> +template <typename Executor> class awaitable_thread {
> +public:
> + typedef Executor executor_type;
> + typedef cancellation_slot cancellation_slot_type;
> + awaitable_thread(awaitable<awaitable_thread_entry_point, Executor> p,
> + const Executor &ex, cancellation_slot parent_cancel_slot,
> + cancellation_state cancel_state)
> + : bottom_of_stack_(std::move(p)) {
> + bottom_of_stack_.frame_->top_of_stack_ = bottom_of_stack_.frame_;
> + new (&bottom_of_stack_.frame_->u_.executor_) Executor(ex);
> + }
> + awaitable_frame<awaitable_thread_entry_point, Executor> *entry_point() {
> + return bottom_of_stack_.frame_;
> + }
> + cancellation_state get_cancellation_state() const noexcept {}
> + void launch() {
> + bottom_of_stack_.frame_->top_of_stack_->attach_thread(this);
> + pump();
> + }
> +
> +protected:
> + template <typename> friend class awaitable_frame_base;
> + void pump();
> + awaitable<awaitable_thread_entry_point, Executor> bottom_of_stack_;
> +};
> +} // namespace detail
> +} // namespace asio
> +} // namespace boost
> +namespace std {
> +template <typename T, typename Executor, typename... Args>
> +struct coroutine_traits<boost::asio::awaitable<T, Executor>, Args...> {
> + typedef boost::asio::detail::awaitable_frame<T, Executor> promise_type;
> +};
> +} // namespace std
> +namespace boost {
> +namespace asio {
> +template <typename Executor = any_io_executor> struct use_awaitable_t {
> + constexpr use_awaitable_t(const char *file_name, int line,
> + const char *function_name) {}
> +};
> +constexpr use_awaitable_t<> use_awaitable(0, 0, 0);
> +namespace detail {
> +template <typename Executor, typename T>
> +class awaitable_handler_base : public awaitable_thread<Executor> {
> +public:
> + typedef void result_type;
> + typedef awaitable<T, Executor> awaitable_type;
> + awaitable_handler_base(awaitable<awaitable_thread_entry_point, Executor> a,
> + const Executor &ex, cancellation_slot pcs,
> + cancellation_state cs)
> + : awaitable_thread<Executor>(std::move(a), ex, pcs, cs) {}
> + explicit awaitable_handler_base(awaitable_thread<Executor> *h)
> + : awaitable_thread<Executor>(std::move(*h)) {}
> +};
> +template <typename, typename...> class awaitable_handler;
> +template <typename Executor, typename T>
> +class awaitable_handler<Executor, boost::system::error_code, T>
> + : public awaitable_handler_base<Executor, T> {
> +public:
> + using awaitable_handler_base<Executor, T>::awaitable_handler_base;
> +};
> +} // namespace detail
> +template <typename Executor, typename R, typename... Args>
> +class async_result<use_awaitable_t<Executor>, R(Args...)> {
> +public:
> + typedef typename detail::awaitable_handler<Executor,
> + typename decay<Args>::type...>
> + handler_type;
> + typedef typename handler_type::awaitable_type return_type;
> +};
> +} // namespace asio
> +} // namespace boost
> +namespace boost {
> +namespace asio {
> +namespace detail {
> +template <typename Function, typename Allocator> class packaged_token;
> +template <typename Function, typename Allocator, typename Result>
> +class packaged_handler;
> +} // namespace detail
> +template <typename Allocator = std::allocator<void>> class use_future_t {
> +public:
> + typedef Allocator allocator_type;
> + ;
> + ;
> +};
> +constexpr use_future_t<> use_future;
> +} // namespace asio
> +namespace asio {
> +namespace detail {
> +;
> +;
> +template <typename T, typename F> class promise_invoker {
> +public:
> +private:
> + shared_ptr<std::promise<T>> p_;
> + typename decay<F>::type f_;
> +};
> +template <typename T, typename Blocking = execution::blocking_t::possibly_t>
> +class promise_executor {
> + ;
> +
> +private:
> + shared_ptr<std::promise<T>> p_;
> +};
> +template <typename T> class promise_creator {
> +public:
> + typedef promise_executor<T> executor_type;
> + typedef std::future<T> future_type;
> +
> +protected:
> + ;
> + shared_ptr<std::promise<T>> p_;
> +};
> +class promise_handler_0 : public promise_creator<void> {
> +public:
> +};
> +class promise_handler_ec_0 : public promise_creator<void> {
> +public:
> +};
> +class promise_handler_ex_0 : public promise_creator<void> {
> +public:
> +};
> +template <typename T> class promise_handler_1 : public promise_creator<T> {
> +public:
> + ;
> +};
> +template <typename T> class promise_handler_ec_1 : public promise_creator<T> {
> +public:
> + ;
> +};
> +template <typename T> class promise_handler_ex_1 : public promise_creator<T> {
> +public:
> + ;
> +};
> +template <typename> class promise_handler_selector;
> +template <>
> +class promise_handler_selector<void()> : public promise_handler_0 {};
> +template <>
> +class promise_handler_selector<void(boost::system::error_code)>
> + : public promise_handler_ec_0 {};
> +template <>
> +class promise_handler_selector<void(std::exception_ptr)>
> + : public promise_handler_ex_0 {};
> +template <typename Arg>
> +class promise_handler_selector<void(Arg)> : public promise_handler_1<Arg> {};
> +template <typename Arg>
> +class promise_handler_selector<void(boost::system::error_code, Arg)>
> + : public promise_handler_ec_1<Arg> {};
> +template <typename Arg>
> +class promise_handler_selector<void(std::exception_ptr, Arg)>
> + : public promise_handler_ex_1<Arg> {};
> +template <typename Signature, typename Allocator>
> +class promise_handler : public promise_handler_selector<Signature> {
> +public:
> + typedef Allocator allocator_type;
> + typedef void result_type;
> +
> +private:
> + Allocator allocator_;
> +};
> +;
> +;
> +template <typename Signature, typename Allocator> class promise_async_result {
> +public:
> + typedef promise_handler<Signature, Allocator> completion_handler_type;
> + typedef typename completion_handler_type::future_type return_type;
> +
> +private:
> + return_type future_;
> +};
> +template <typename Function, typename Allocator> class packaged_token {
> +public:
> + Function function_;
> + Allocator allocator_;
> +};
> +;
> +;
> +template <typename Function, typename Allocator, typename Result>
> +class packaged_async_result {};
> +} // namespace detail
> +template <typename Allocator, typename Result, typename... Args>
> +class async_result<use_future_t<Allocator>, Result(Args...)>
> + : public detail::promise_async_result<void(typename decay<Args>::type...),
> + Allocator> {
> +public:
> +};
> +template <typename Function, typename Allocator, typename Result,
> + typename... Args>
> +class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
> + : public detail::packaged_async_result<
> + Function, Allocator, typename result_of<Function(Args...)>::type> {
> +public:
> +};
> +namespace traits {
> +template <typename T, typename Blocking, typename Property>
> +struct query_static_constexpr_member<
> + boost::asio::detail::promise_executor<T, Blocking>, Property,
> + typename boost::asio::enable_if<boost::asio::is_convertible<
> + Property, boost::asio::execution::blocking_t>::value>::type> {};
> +} // namespace traits
> +} // namespace asio
> +} // namespace boost
> +namespace malloy::test {
> +using boost::asio::awaitable;
> +void roundtrip_coro(
> + const uint16_t port,
> + std::function<awaitable<void>(malloy::client::controller &)> setup_client,
> + std::function<void(malloy::server::controller &)> setup_server);
> +void roundtrip(const uint16_t port,
> + std::function<void(malloy::client::controller &)> setup_client,
> + std::function<void(malloy::server::controller &)> setup_server);
> +} // namespace malloy::test
> +namespace malloy::server {
> +struct endpoint {
> + virtual ~endpoint() = default;
> +};
> +} // namespace malloy::server
> +namespace malloy::server::http {}
> +namespace malloy::server::websocket {
> +using connection = malloy::websocket::connection<false>;
> +}
> +namespace malloy::http {
> +class generator {};
> +} // namespace malloy::http
> +namespace malloy::server::http {
> +template <class Derived> class connection {
> +public:
> + class request_generator
> + : public std::enable_shared_from_this<request_generator> {
> + friend class connection;
> +
> + public:
> + using h_parser_t = std::unique_ptr<
> + boost::beast::http::request_parser<boost::beast::http::empty_body>>;
> + using header_t = boost::beast::http::request_header<>;
> + header_t m_header;
> + std::shared_ptr<connection> m_parent;
> + };
> + class handler {
> + using req_t = std::shared_ptr<request_generator>;
> + };
> + struct config {
> + std::uint64_t request_body_limit = 10 * 10e6;
> + std::string agent_string;
> + };
> + struct config cfg;
> + ;
> + void do_read();
> +
> +protected:
> + boost::beast::flat_buffer m_buffer;
> +
> +private:
> + friend class request_generator;
> + std::shared_ptr<spdlog::logger> m_logger;
> + std::shared_ptr<const std::filesystem::path> m_doc_root;
> + std::shared_ptr<handler> m_router;
> + std::shared_ptr<void> m_response;
> + typename request_generator::h_parser_t m_parser;
> + [[nodiscard]] Derived &derived() { return static_cast<Derived &>(*this); }
> + void on_read(boost::beast::error_code ec, std::size_t bytes_transferred) {
> + m_logger->trace("on_read(): bytes read: {}", bytes_transferred);
> + if (ec == boost::beast::http::error::end_of_stream ||
> + ec == boost::beast::error::timeout)
> + return do_close();
> + if (ec) {
> + m_logger->error("on_read(): {}", ec.message());
> + return;
> + }
> + auto header = m_parser->get().base();
> + auto gen = std::shared_ptr<request_generator>{new request_generator{
> + std::move(m_parser), std::move(header), derived().shared_from_this(),
> + std::move(m_buffer)}};
> + if (boost::beast::websocket::is_upgrade(gen->header())) {
> + m_logger->debug("upgrading HTTP connection to WS connection.");
> + boost::beast::get_lowest_layer(derived().stream()).expires_never();
> + auto ws_connection = server::websocket::connection::make(
> + m_logger->clone("websocket_connection"),
> + malloy::websocket::stream{derived().release_stream()},
> + cfg.agent_string);
> + m_router->websocket(*m_doc_root, gen, ws_connection);
> + };
> + do_read();
> + }
> + void do_close() {}
> +};
> +} // namespace malloy::server::http
> +namespace malloy::server::http {
> +class connection_plain : public connection<connection_plain>,
> + public std::enable_shared_from_this<connection_plain> {
> +};
> +} // namespace malloy::server::http
> +namespace malloy::server::http {
> +class connection_tls : public connection<connection_tls>,
> + public std::enable_shared_from_this<connection_tls> {
> + boost::beast::ssl_stream<boost::beast::tcp_stream> m_stream;
> +};
> +namespace detail {}
> +template <typename H>
> +concept request_filter = std::move_constructible<H> &&
> + requires(const H &f, const typename H::request_type::header_type &h,
> + typename H::request_type::body_type::value_type &v) {
> + {f.setup_body(h, v)};
> +};
> +template <typename P>
> +concept request_validator =
> + requires(P p, const boost::beast::http::request_header<> &h) {
> + {
> + std::invoke(p, h)
> + }
> + -> malloy::concepts::is_container_of<malloy::http::response, std::optional>;
> +};
> +} // namespace malloy::server::http
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace regex_constants {
> + enum __syntax_option {
> + _S_icase,
> + _S_nosubs,
> + _S_optimize,
> + _S_collate,
> + _S_ECMAScript,
> + _S_basic,
> + _S_extended,
> + _S_awk,
> + _S_grep,
> + _S_egrep,
> + _S_polynomial,
> + _S_syntax_last
> + };
> + enum syntax_option_type : unsigned int {};
> + inline constexpr syntax_option_type icase =
> + static_cast<syntax_option_type>(1 << _S_icase);
> + enum match_flag_type : unsigned int {};
> + inline constexpr match_flag_type format_default =
> + static_cast<match_flag_type>(0);
> + enum error_type {
> + _S_error_collate,
> + _S_error_ctype,
> + _S_error_escape,
> + _S_error_backref,
> + _S_error_brack,
> + _S_error_paren,
> + _S_error_brace,
> + _S_error_badbrace,
> + _S_error_range,
> + _S_error_space,
> + _S_error_badrepeat,
> + _S_error_complexity,
> + _S_error_stack,
> + };
> + } // namespace regex_constants
> + namespace __detail {
> + typedef long _StateIdT;
> + static const _StateIdT _S_invalid_state_id = -1;
> + template <typename _CharT> using _Matcher = std::function<bool(_CharT)>;
> + enum _Opcode : int {
> + _S_opcode_unknown,
> + _S_opcode_alternative,
> + _S_opcode_repeat,
> + _S_opcode_backref,
> + _S_opcode_line_begin_assertion,
> + _S_opcode_line_end_assertion,
> + _S_opcode_word_boundary,
> + _S_opcode_subexpr_lookahead,
> + _S_opcode_subexpr_begin,
> + _S_opcode_subexpr_end,
> + _S_opcode_dummy,
> + _S_opcode_match,
> + _S_opcode_accept,
> + };
> + struct _State_base {
> + protected:
> + _Opcode _M_opcode;
> +
> + public:
> + _StateIdT _M_next;
> +
> + protected:
> + public:
> + };
> + template <typename _Char_type> struct _State : _State_base {};
> + struct _NFA_base {
> + typedef size_t _SizeT;
> + };
> + template <typename _TraitsT>
> + struct _NFA : _NFA_base, std::vector<_State<typename _TraitsT::char_type>> {
> + typedef typename _TraitsT::char_type _Char_type;
> + typedef _State<_Char_type> _StateT;
> + typedef _Matcher<_Char_type> _MatcherT;
> + };
> + } // namespace __detail
> +} // namespace )
> +namespace std __attribute__((__visibility__("default"))) {
> + namespace __detail {
> + template <typename, typename, typename, bool> class _Executor;
> + }
> + namespace __cxx11 {
> + template <typename _Ch_type> class regex_traits {
> + public:
> + typedef _Ch_type char_type;
> + typedef std::basic_string<char_type> string_type;
> + typedef std::locale locale_type;
> +
> + private:
> + struct _RegexMask {
> + static constexpr unsigned char _S_under = 1 << 0;
> + static constexpr unsigned char _S_valid_mask = 0x1;
> + };
> + };
> + template <typename _Ch_type, typename _Rx_traits = regex_traits<_Ch_type>>
> + class basic_regex {
> + public:
> + static_assert(is_same<_Ch_type, typename _Rx_traits::char_type>::value,
> + "regex traits class must have the same char_type");
> + basic_regex &operator=(basic_regex &&__rhs) noexcept;
> +
> + private:
> + typedef std::shared_ptr<const __detail::_NFA<_Rx_traits>> _AutomatonPtr;
> + ;
> + ;
> + _AutomatonPtr _M_automaton;
> + };
> + ;
> + typedef basic_regex<char> regex;
> + typedef basic_regex<wchar_t> wregex;
> + ;
> + template <typename _BiIter>
> + class sub_match : public std::pair<_BiIter, _BiIter> {
> + typedef iterator_traits<_BiIter> __iter_traits;
> +
> + public:
> + typedef typename __iter_traits::value_type value_type;
> + ;
> + };
> + ;
> + template <typename _Bi_iter, typename _Alloc = allocator<sub_match<_Bi_iter>>>
> + class match_results : private std::vector<sub_match<_Bi_iter>, _Alloc> {
> + private:
> + typedef std::vector<sub_match<_Bi_iter>, _Alloc> _Base_type;
> + typedef std::iterator_traits<_Bi_iter> __iter_traits;
> + };
> + typedef match_results<const char *> cmatch;
> + typedef match_results<string::const_iterator> smatch;
> + } // namespace __cxx11
> +} // namespace )
> +namespace malloy::server {
> +class router {
> + class abstract_req_validator {
> + std::unique_ptr<abstract_req_validator> m_validator;
> + mutable std::optional<std::regex> m_compiled_reg;
> + std::string m_raw_reg;
> + };
> +
> +public:
> + template <typename Derived>
> + using req_generator =
> + std::shared_ptr<typename http::connection<Derived>::request_generator>;
> + ;
> + bool add_websocket(std::string &&resource,
> + typename websocket::connection::handler_t &&handler);
> +};
> +} // namespace malloy::server
> +using boost::asio::awaitable;
> +namespace {
> +constexpr auto server_msg = "Hello from server";
> +constexpr auto cli_msg = "Hello from client";
> +template <bool BinaryMode>
> +awaitable<void> client_ws_handler_coro(
> + malloy::error_code ec,
> + std::shared_ptr<malloy::client::websocket::connection> conn) {
> + conn->set_binary(BinaryMode);
> + auto buffer = std::make_shared<boost::beast::flat_buffer>();
> + auto size = co_await conn->read(*buffer, boost::asio::use_awaitable);
> + do {
> + doctest::detail::ResultBuilder _DOCTEST_RB(
> + doctest::assertType::DT_CHECK,
> + "/home/ash/sources/malloy/test/test_suites/components/websockets.cpp",
> + 46, "size == std::strlen(server_msg)");
> + if (_DOCTEST_RB.log())
> + __asm__("int $3\n" : :);
> + _DOCTEST_RB.react();
> + } while (false);
> + size = co_await conn->send(malloy::buffer(cli_msg, std::strlen(cli_msg)),
> + boost::asio::use_awaitable);
> +};
> +template <bool BinaryMode>
> +void server_ws_handler(
> + const malloy::http::request<> &req,
> + std::shared_ptr<malloy::server::websocket::connection> conn);
> +;
> +namespace doctest_detail_test_suite_ns {}
> +} // namespace
> +namespace _DOCTEST_ANON_SUITE_2 {
> +constexpr uint16_t port = 13312;
> +static void _DOCTEST_ANON_FUNC_7();
> +static void _DOCTEST_ANON_FUNC_7() {
> + if (const doctest::detail::Subcase & _DOCTEST_ANON_SUBCASE_13
> + __attribute__((unused)) = doctest::detail::Subcase(
> + "ws_connect coroutines",
> + "/home/ash/sources/malloy/test/test_suites/components/websockets.cpp",
> + 252)) {
> + malloy::test::roundtrip_coro(
> + port,
> + [](auto &ctrl) -> awaitable<void> {
> + auto v = co_await ctrl.ws_connect("127.0.0.1", port, "/",
> + boost::asio::use_awaitable);
> + co_await client_ws_handler_coro<false>(malloy::error_code{}, v);
> + },
> + [](auto &ctrl) {
> + ctrl.router()->add_websocket("/", &server_ws_handler<false>);
> + });
> + }
> + if (const doctest::detail::Subcase & _DOCTEST_ANON_SUBCASE_14
> + __attribute__((unused)) = doctest::detail::Subcase(
> + "ws_connect futures",
> + "/home/ash/sources/malloy/test/test_suites/components/websockets.cpp",
> + 261)) {
> + malloy::test::roundtrip(
> + port,
> + [](auto &ctrl) {
> + auto v =
> + ctrl.ws_connect("127.0.0.1", port, "/", boost::asio::use_future)
> + .get();
> + },
> + [](auto &ctrl) {
> + ctrl.router()->add_websocket("/", &server_ws_handler<false>);
> + });
> + }
> +}
> +} // namespace _DOCTEST_ANON_SUITE_2
> --
> 2.24.3 (Apple Git-128)
>
next prev parent reply other threads:[~2022-04-18 19:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 13:59 Iain Sandoe
2022-04-18 19:49 ` Eric Gallager [this message]
2022-04-18 19:55 ` Iain Sandoe
2022-04-19 9:47 ` Martin Liška
2022-04-20 3:45 ` Jason Merrill
2022-04-28 8:24 ` Iain Sandoe
2022-04-28 11:45 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMfHzOsTBanJq-qWGgmRGxhyytiwDK4gWXqjhzQFKF_cFd_2HA@mail.gmail.com \
--to=egall@gwmail.gwu.edu \
--cc=gcc-patches@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
--cc=iains.gcc@gmail.com \
--cc=nathan@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).