Skip to content

Instantly share code, notes, and snippets.

@otherjason
Created May 4, 2017 14:53
Show Gist options
  • Save otherjason/9f50d3f36207ea4b40bb805f6c710304 to your computer and use it in GitHub Desktop.
Save otherjason/9f50d3f36207ea4b40bb805f6c710304 to your computer and use it in GitHub Desktop.
Preprocessed source file for gcc bug
This file has been truncated, but you can view the full file.
# 1 "tuple_test.cc"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "tuple_test.cc"
# 1 "/usr/include/boost/hana.hpp" 1 3 4
# 45 "/usr/include/boost/hana.hpp" 3 4
# 1 "/usr/include/boost/hana/config.hpp" 1 3 4
# 13 "/usr/include/boost/hana/config.hpp" 3 4
# 1 "/usr/include/boost/hana/version.hpp" 1 3 4
# 14 "/usr/include/boost/hana/config.hpp" 2 3 4
# 83 "/usr/include/boost/hana/config.hpp" 3 4
# 1 "/usr/include/c++/6/cstddef" 1 3 4
# 42 "/usr/include/c++/6/cstddef" 3 4
# 43 "/usr/include/c++/6/cstddef" 3
# 1 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 1 3
# 199 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 3
# 199 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 3
namespace std
{
typedef long unsigned int size_t;
typedef long int ptrdiff_t;
typedef decltype(nullptr) nullptr_t;
}
# 221 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 3
namespace std
{
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}
namespace __gnu_cxx
{
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}
# 507 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 3
# 1 "/usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h" 1 3
# 39 "/usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h" 3
# 1 "/usr/include/features.h" 1 3 4
# 364 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
# 415 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 416 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
# 365 "/usr/include/features.h" 2 3 4
# 388 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
# 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
# 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
# 389 "/usr/include/features.h" 2 3 4
# 40 "/usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h" 2 3
# 508 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 2 3
# 1 "/usr/include/x86_64-linux-gnu/c++/6/bits/cpu_defines.h" 1 3
# 511 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h" 2 3
# 50 "/usr/include/c++/6/cstddef" 2 3
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 149 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 216 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 426 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 3 4
typedef struct {
long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
typedef decltype(nullptr) nullptr_t;
# 51 "/usr/include/c++/6/cstddef" 2 3
namespace std
{
using ::max_align_t;
}
# 84 "/usr/include/boost/hana/config.hpp" 2 3 4
# 46 "/usr/include/boost/hana.hpp" 2 3 4
# 58 "/usr/include/boost/hana.hpp" 3 4
# 1 "/usr/include/boost/hana/accessors.hpp" 1 3 4
# 13 "/usr/include/boost/hana/accessors.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/accessors.hpp" 1 3 4
# 14 "/usr/include/boost/hana/fwd/accessors.hpp" 3 4
# 1 "/usr/include/boost/hana/core/when.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/when.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/when.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/when.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/core/when.hpp" 3 4
template <bool condition>
struct when;
namespace core_detail {
template <typename ...>
struct always_true { static constexpr bool value = true; };
}
# 67 "/usr/include/boost/hana/fwd/core/when.hpp" 3 4
template <typename ...Dummy>
using when_valid = when<
core_detail::always_true<Dummy...>::value
>;
}}
# 14 "/usr/include/boost/hana/core/when.hpp" 2 3 4
# 15 "/usr/include/boost/hana/fwd/accessors.hpp" 2 3 4
namespace boost { namespace hana {
# 39 "/usr/include/boost/hana/fwd/accessors.hpp" 3 4
template <typename S, typename = void>
struct accessors_impl : accessors_impl<S, when<true>> { };
template <typename S>
struct accessors_t;
template <typename S>
constexpr accessors_t<S> accessors{};
}}
# 14 "/usr/include/boost/hana/accessors.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/struct.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/struct.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/struct.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/struct.hpp" 3 4
namespace boost { namespace hana {
# 152 "/usr/include/boost/hana/fwd/concept/struct.hpp" 3 4
template <typename S>
struct Struct;
}}
# 14 "/usr/include/boost/hana/concept/struct.hpp" 2 3 4
# 1 "/usr/include/boost/hana/accessors.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concept/struct.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/default.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/default.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/default.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/default.hpp" 3 4
namespace boost { namespace hana {
# 30 "/usr/include/boost/hana/fwd/core/default.hpp" 3 4
struct default_ { };
# 51 "/usr/include/boost/hana/fwd/core/default.hpp" 3 4
template <typename T, typename = void>
struct is_default;
}}
# 14 "/usr/include/boost/hana/core/default.hpp" 2 3 4
# 1 "/usr/include/c++/6/type_traits" 1 3 4
# 32 "/usr/include/c++/6/type_traits" 3 4
# 33 "/usr/include/c++/6/type_traits" 3
# 42 "/usr/include/c++/6/type_traits" 3
namespace std
{
typedef short unsigned int uint_least16_t;
typedef unsigned int uint_least32_t;
}
namespace std __attribute__ ((__visibility__ ("default")))
{
# 68 "/usr/include/c++/6/type_traits" 3
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 { return value; }
constexpr value_type operator()() const { return value; }
};
template<typename _Tp, _Tp __v>
constexpr _Tp integral_constant<_Tp, __v>::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>;
# 103 "/usr/include/c++/6/type_traits" 3
template<bool, typename, typename>
struct conditional;
template<typename...>
struct __or_;
template<>
struct __or_<>
: public false_type
{ };
template<typename _B1>
struct __or_<_B1>
: public _B1
{ };
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<>
struct __and_<>
: public true_type
{ };
template<typename _B1>
struct __and_<_B1>
: public _B1
{ };
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 integral_constant<bool, !_Pp::value>
{ };
struct __nonesuch {
__nonesuch() = delete;
~__nonesuch() = delete;
__nonesuch(__nonesuch const&) = delete;
void operator=(__nonesuch const&) = delete;
};
# 189 "/usr/include/c++/6/type_traits" 3
template<typename _Tp>
struct __success_type
{ typedef _Tp type; };
struct __failure_type
{ };
template<typename>
struct remove_cv;
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<typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct __is_integral_helper
: public false_type { };
template<>
struct __is_integral_helper<bool>
: public true_type { };
template<>
struct __is_integral_helper<char>
: public true_type { };
template<>
struct __is_integral_helper<signed char>
: public true_type { };
template<>
struct __is_integral_helper<unsigned char>
: public true_type { };
template<>
struct __is_integral_helper<wchar_t>
: public true_type { };
template<>
struct __is_integral_helper<char16_t>
: public true_type { };
template<>
struct __is_integral_helper<char32_t>
: public true_type { };
template<>
struct __is_integral_helper<short>
: public true_type { };
template<>
struct __is_integral_helper<unsigned short>
: public true_type { };
template<>
struct __is_integral_helper<int>
: public true_type { };
template<>
struct __is_integral_helper<unsigned int>
: public true_type { };
template<>
struct __is_integral_helper<long>
: public true_type { };
template<>
struct __is_integral_helper<unsigned long>
: public true_type { };
template<>
struct __is_integral_helper<long long>
: public true_type { };
template<>
struct __is_integral_helper<unsigned long long>
: public true_type { };
# 321 "/usr/include/c++/6/type_traits" 3
template<typename _Tp>
struct is_integral
: public __is_integral_helper<typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct __is_floating_point_helper
: public false_type { };
template<>
struct __is_floating_point_helper<float>
: public true_type { };
template<>
struct __is_floating_point_helper<double>
: public true_type { };
template<>
struct __is_floating_point_helper<long double>
: public true_type { };
# 349 "/usr/include/c++/6/type_traits" 3
template<typename _Tp>
struct is_floating_point
: public __is_floating_point_helper<typename remove_cv<_Tp>::type>::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 _Tp>
struct is_array<_Tp[]>
: 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<typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct is_lvalue_reference
: public false_type { };
template<typename _Tp>
struct is_lvalue_reference<_Tp&>
: public true_type { };
template<typename>
struct is_rvalue_reference
: public false_type { };
template<typename _Tp>
struct is_rvalue_reference<_Tp&&>
: public true_type { };
template<typename>
struct is_function;
template<typename>
struct __is_member_object_pointer_helper
: public false_type { };
template<typename _Tp, typename _Cp>
struct __is_member_object_pointer_helper<_Tp _Cp::*>
: public integral_constant<bool, !is_function<_Tp>::value> { };
template<typename _Tp>
struct is_member_object_pointer
: public __is_member_object_pointer_helper<
typename remove_cv<_Tp>::type>::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 integral_constant<bool, is_function<_Tp>::value> { };
template<typename _Tp>
struct is_member_function_pointer
: public __is_member_function_pointer_helper<
typename remove_cv<_Tp>::type>::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>
struct is_function
: public false_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile &&>
: public true_type { };
template<typename>
struct __is_null_pointer_helper
: public false_type { };
template<>
struct __is_null_pointer_helper<std::nullptr_t>
: public true_type { };
template<typename _Tp>
struct is_null_pointer
: public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
{ };
template<typename _Tp>
struct __is_nullptr_t
: public is_null_pointer<_Tp>
{ };
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_compound
: public integral_constant<bool, !is_fundamental<_Tp>::value> { };
template<typename _Tp>
struct __is_member_pointer_helper
: public false_type { };
template<typename _Tp, typename _Cp>
struct __is_member_pointer_helper<_Tp _Cp::*>
: public true_type { };
template<typename _Tp>
struct is_member_pointer
: public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
{ };
template<typename _Tp>
struct __is_referenceable
: public __or_<is_object<_Tp>, is_reference<_Tp>>::type
{ };
template<typename _Res, typename... _Args>
struct __is_referenceable<_Res(_Args...)>
: public true_type
{ };
template<typename _Res, typename... _Args>
struct __is_referenceable<_Res(_Args......)>
: 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_volatile<_Tp volatile>
: public true_type { };
template<typename _Tp>
struct is_trivial
: public integral_constant<bool, __is_trivial(_Tp)>
{ };
template<typename _Tp>
struct is_trivially_copyable
: public integral_constant<bool, __is_trivially_copyable(_Tp)>
{ };
template<typename _Tp>
struct is_standard_layout
: public integral_constant<bool, __is_standard_layout(_Tp)>
{ };
template<typename _Tp>
struct is_pod
: public integral_constant<bool, __is_pod(_Tp)>
{ };
template<typename _Tp>
struct is_literal_type
: public integral_constant<bool, __is_literal_type(_Tp)>
{ };
template<typename _Tp>
struct is_empty
: public integral_constant<bool, __is_empty(_Tp)>
{ };
template<typename _Tp>
struct is_polymorphic
: public integral_constant<bool, __is_polymorphic(_Tp)>
{ };
template<typename _Tp>
struct is_final
: public integral_constant<bool, __is_final(_Tp)>
{ };
template<typename _Tp>
struct is_abstract
: public integral_constant<bool, __is_abstract(_Tp)>
{ };
template<typename _Tp,
bool = is_arithmetic<_Tp>::value>
struct __is_signed_helper
: public false_type { };
template<typename _Tp>
struct __is_signed_helper<_Tp, true>
: public integral_constant<bool, _Tp(-1) < _Tp(0)>
{ };
template<typename _Tp>
struct is_signed
: public __is_signed_helper<_Tp>::type
{ };
template<typename _Tp>
struct is_unsigned
: public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>
{ };
template<typename>
struct add_rvalue_reference;
template<typename _Tp>
typename add_rvalue_reference<_Tp>::type declval() noexcept;
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>
static false_type __test(...);
};
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_safe<_Tp, true, false>
: public false_type { };
template<typename _Tp>
struct __is_destructible_safe<_Tp, false, true>
: public true_type { };
template<typename _Tp>
struct is_destructible
: public __is_destructible_safe<_Tp>::type
{ };
struct __do_is_nt_destructible_impl
{
template<typename _Tp>
static integral_constant<bool, noexcept(declval<_Tp&>().~_Tp())>
__test(int);
template<typename>
static false_type __test(...);
};
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_nt_destructible_safe<_Tp, true, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_destructible_safe<_Tp, false, true>
: public true_type { };
template<typename _Tp>
struct is_nothrow_destructible
: public __is_nt_destructible_safe<_Tp>::type
{ };
struct __do_is_default_constructible_impl
{
template<typename _Tp, typename = decltype(_Tp())>
static true_type __test(int);
template<typename>
static false_type __test(...);
};
template<typename _Tp>
struct __is_default_constructible_impl
: public __do_is_default_constructible_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp>
struct __is_default_constructible_atom
: public __and_<__not_<is_void<_Tp>>,
__is_default_constructible_impl<_Tp>>
{ };
template<typename _Tp, bool = is_array<_Tp>::value>
struct __is_default_constructible_safe;
template<typename _Tp>
struct __is_default_constructible_safe<_Tp, true>
: public __and_<__is_array_known_bounds<_Tp>,
__is_default_constructible_atom<typename
remove_all_extents<_Tp>::type>>
{ };
template<typename _Tp>
struct __is_default_constructible_safe<_Tp, false>
: public __is_default_constructible_atom<_Tp>::type
{ };
template<typename _Tp>
struct is_default_constructible
: public __is_default_constructible_safe<_Tp>::type
{ };
# 933 "/usr/include/c++/6/type_traits" 3
struct __do_is_static_castable_impl
{
template<typename _From, typename _To, typename
= decltype(static_cast<_To>(declval<_From>()))>
static true_type __test(int);
template<typename, typename>
static false_type __test(...);
};
template<typename _From, typename _To>
struct __is_static_castable_impl
: public __do_is_static_castable_impl
{
typedef decltype(__test<_From, _To>(0)) type;
};
template<typename _From, typename _To>
struct __is_static_castable_safe
: public __is_static_castable_impl<_From, _To>::type
{ };
template<typename _From, typename _To>
struct __is_static_castable
: public integral_constant<bool, (__is_static_castable_safe<
_From, _To>::value)>
{ };
struct __do_is_direct_constructible_impl
{
template<typename _Tp, typename _Arg, typename
= decltype(::new _Tp(declval<_Arg>()))>
static true_type __test(int);
template<typename, typename>
static false_type __test(...);
};
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_impl
: public __do_is_direct_constructible_impl
{
typedef decltype(__test<_Tp, _Arg>(0)) type;
};
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_new_safe
: public __and_<is_destructible<_Tp>,
__is_direct_constructible_impl<_Tp, _Arg>>
{ };
template<typename, typename>
struct is_same;
template<typename, typename>
struct is_base_of;
template<typename>
struct remove_reference;
template<typename _From, typename _To, bool
= __not_<__or_<is_void<_From>,
is_function<_From>>>::value>
struct __is_base_to_derived_ref;
template<typename _Tp, typename... _Args>
struct is_constructible;
template<typename _From, typename _To>
struct __is_base_to_derived_ref<_From, _To, true>
{
typedef typename remove_cv<typename remove_reference<_From
>::type>::type __src_t;
typedef typename remove_cv<typename remove_reference<_To
>::type>::type __dst_t;
typedef __and_<__not_<is_same<__src_t, __dst_t>>,
is_base_of<__src_t, __dst_t>,
__not_<is_constructible<__dst_t, _From>>> type;
static constexpr bool value = type::value;
};
template<typename _From, typename _To>
struct __is_base_to_derived_ref<_From, _To, false>
: public false_type
{ };
template<typename _From, typename _To, bool
= __and_<is_lvalue_reference<_From>,
is_rvalue_reference<_To>>::value>
struct __is_lvalue_to_rvalue_ref;
template<typename _From, typename _To>
struct __is_lvalue_to_rvalue_ref<_From, _To, true>
{
typedef typename remove_cv<typename remove_reference<
_From>::type>::type __src_t;
typedef typename remove_cv<typename remove_reference<
_To>::type>::type __dst_t;
typedef __and_<__not_<is_function<__src_t>>,
__or_<is_same<__src_t, __dst_t>,
is_base_of<__dst_t, __src_t>>> type;
static constexpr bool value = type::value;
};
template<typename _From, typename _To>
struct __is_lvalue_to_rvalue_ref<_From, _To, false>
: public false_type
{ };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_ref_cast
: public __and_<__is_static_castable<_Arg, _Tp>,
__not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>,
__is_lvalue_to_rvalue_ref<_Arg, _Tp>
>>>
{ };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_new
: public conditional<is_reference<_Tp>::value,
__is_direct_constructible_ref_cast<_Tp, _Arg>,
__is_direct_constructible_new_safe<_Tp, _Arg>
>::type
{ };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible
: public __is_direct_constructible_new<_Tp, _Arg>::type
{ };
struct __do_is_nary_constructible_impl
{
template<typename _Tp, typename... _Args, typename
= decltype(_Tp(declval<_Args>()...))>
static true_type __test(int);
template<typename, typename...>
static false_type __test(...);
};
template<typename _Tp, typename... _Args>
struct __is_nary_constructible_impl
: public __do_is_nary_constructible_impl
{
typedef decltype(__test<_Tp, _Args...>(0)) type;
};
template<typename _Tp, typename... _Args>
struct __is_nary_constructible
: public __is_nary_constructible_impl<_Tp, _Args...>::type
{
static_assert(sizeof...(_Args) > 1,
"Only useful for > 1 arguments");
};
template<typename _Tp, typename... _Args>
struct __is_constructible_impl
: public __is_nary_constructible<_Tp, _Args...>
{ };
template<typename _Tp, typename _Arg>
struct __is_constructible_impl<_Tp, _Arg>
: public __is_direct_constructible<_Tp, _Arg>
{ };
template<typename _Tp>
struct __is_constructible_impl<_Tp>
: public is_default_constructible<_Tp>
{ };
template<typename _Tp, typename... _Args>
struct is_constructible
: public __is_constructible_impl<_Tp, _Args...>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_copy_constructible_impl;
template<typename _Tp>
struct __is_copy_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_copy_constructible_impl<_Tp, true>
: public is_constructible<_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, false>
: public false_type { };
template<typename _Tp>
struct __is_move_constructible_impl<_Tp, true>
: public is_constructible<_Tp, _Tp&&>
{ };
template<typename _Tp>
struct is_move_constructible
: public __is_move_constructible_impl<_Tp>
{ };
template<typename _Tp>
struct __is_nt_default_constructible_atom
: public integral_constant<bool, noexcept(_Tp())>
{ };
template<typename _Tp, bool = is_array<_Tp>::value>
struct __is_nt_default_constructible_impl;
template<typename _Tp>
struct __is_nt_default_constructible_impl<_Tp, true>
: public __and_<__is_array_known_bounds<_Tp>,
__is_nt_default_constructible_atom<typename
remove_all_extents<_Tp>::type>>
{ };
template<typename _Tp>
struct __is_nt_default_constructible_impl<_Tp, false>
: public __is_nt_default_constructible_atom<_Tp>
{ };
template<typename _Tp>
struct is_nothrow_default_constructible
: public __and_<is_default_constructible<_Tp>,
__is_nt_default_constructible_impl<_Tp>>
{ };
template<typename _Tp, typename... _Args>
struct __is_nt_constructible_impl
: public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))>
{ };
template<typename _Tp, typename _Arg>
struct __is_nt_constructible_impl<_Tp, _Arg>
: public integral_constant<bool,
noexcept(static_cast<_Tp>(declval<_Arg>()))>
{ };
template<typename _Tp>
struct __is_nt_constructible_impl<_Tp>
: public is_nothrow_default_constructible<_Tp>
{ };
template<typename _Tp, typename... _Args>
struct is_nothrow_constructible
: public __and_<is_constructible<_Tp, _Args...>,
__is_nt_constructible_impl<_Tp, _Args...>>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nothrow_copy_constructible_impl;
template<typename _Tp>
struct __is_nothrow_copy_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nothrow_copy_constructible_impl<_Tp, true>
: public is_nothrow_constructible<_Tp, const _Tp&>
{ };
template<typename _Tp>
struct is_nothrow_copy_constructible
: public __is_nothrow_copy_constructible_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nothrow_move_constructible_impl;
template<typename _Tp>
struct __is_nothrow_move_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nothrow_move_constructible_impl<_Tp, true>
: public is_nothrow_constructible<_Tp, _Tp&&>
{ };
template<typename _Tp>
struct is_nothrow_move_constructible
: public __is_nothrow_move_constructible_impl<_Tp>
{ };
template<typename _Tp, typename _Up>
class __is_assignable_helper
{
template<typename _Tp1, typename _Up1,
typename = decltype(declval<_Tp1>() = declval<_Up1>())>
static true_type
__test(int);
template<typename, typename>
static false_type
__test(...);
public:
typedef decltype(__test<_Tp, _Up>(0)) type;
};
template<typename _Tp, typename _Up>
struct is_assignable
: public __is_assignable_helper<_Tp, _Up>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_copy_assignable_impl;
template<typename _Tp>
struct __is_copy_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_copy_assignable_impl<_Tp, true>
: public is_assignable<_Tp&, const _Tp&>
{ };
template<typename _Tp>
struct is_copy_assignable
: public __is_copy_assignable_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_move_assignable_impl;
template<typename _Tp>
struct __is_move_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_move_assignable_impl<_Tp, true>
: public is_assignable<_Tp&, _Tp&&>
{ };
template<typename _Tp>
struct is_move_assignable
: public __is_move_assignable_impl<_Tp>
{ };
template<typename _Tp, typename _Up>
struct __is_nt_assignable_impl
: public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())>
{ };
template<typename _Tp, typename _Up>
struct is_nothrow_assignable
: public __and_<is_assignable<_Tp, _Up>,
__is_nt_assignable_impl<_Tp, _Up>>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nt_copy_assignable_impl;
template<typename _Tp>
struct __is_nt_copy_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_copy_assignable_impl<_Tp, true>
: public is_nothrow_assignable<_Tp&, const _Tp&>
{ };
template<typename _Tp>
struct is_nothrow_copy_assignable
: public __is_nt_copy_assignable_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nt_move_assignable_impl;
template<typename _Tp>
struct __is_nt_move_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_move_assignable_impl<_Tp, true>
: public is_nothrow_assignable<_Tp&, _Tp&&>
{ };
template<typename _Tp>
struct is_nothrow_move_assignable
: public __is_nt_move_assignable_impl<_Tp>
{ };
template<typename _Tp, typename... _Args>
struct is_trivially_constructible
: public __and_<is_constructible<_Tp, _Args...>, integral_constant<bool,
__is_trivially_constructible(_Tp, _Args...)>>
{ };
template<typename _Tp>
struct is_trivially_default_constructible
: public is_trivially_constructible<_Tp>::type
{ };
struct __do_is_implicitly_default_constructible_impl
{
template <typename _Tp>
static void __helper(const _Tp&);
template <typename _Tp>
static true_type __test(const _Tp&,
decltype(__helper<const _Tp&>({}))* = 0);
static false_type __test(...);
};
template<typename _Tp>
struct __is_implicitly_default_constructible_impl
: public __do_is_implicitly_default_constructible_impl
{
typedef decltype(__test(declval<_Tp>())) type;
};
template<typename _Tp>
struct __is_implicitly_default_constructible_safe
: public __is_implicitly_default_constructible_impl<_Tp>::type
{ };
template <typename _Tp>
struct __is_implicitly_default_constructible
: public __and_<is_default_constructible<_Tp>,
__is_implicitly_default_constructible_safe<_Tp>>
{ };
template<typename _Tp>
struct is_trivially_copy_constructible
: public __and_<is_copy_constructible<_Tp>,
integral_constant<bool,
__is_trivially_constructible(_Tp, const _Tp&)>>
{ };
template<typename _Tp>
struct is_trivially_move_constructible
: public __and_<is_move_constructible<_Tp>,
integral_constant<bool,
__is_trivially_constructible(_Tp, _Tp&&)>>
{ };
template<typename _Tp, typename _Up>
struct is_trivially_assignable
: public __and_<is_assignable<_Tp, _Up>,
integral_constant<bool,
__is_trivially_assignable(_Tp, _Up)>>
{ };
template<typename _Tp>
struct is_trivially_copy_assignable
: public __and_<is_copy_assignable<_Tp>,
integral_constant<bool,
__is_trivially_assignable(_Tp&, const _Tp&)>>
{ };
template<typename _Tp>
struct is_trivially_move_assignable
: public __and_<is_move_assignable<_Tp>,
integral_constant<bool,
__is_trivially_assignable(_Tp&, _Tp&&)>>
{ };
template<typename _Tp>
struct is_trivially_destructible
: public __and_<is_destructible<_Tp>, integral_constant<bool,
__has_trivial_destructor(_Tp)>>
{ };
template<typename _Tp>
struct has_trivial_default_constructor
: public integral_constant<bool, __has_trivial_constructor(_Tp)>
{ } __attribute__ ((__deprecated__));
template<typename _Tp>
struct has_trivial_copy_constructor
: public integral_constant<bool, __has_trivial_copy(_Tp)>
{ } __attribute__ ((__deprecated__));
template<typename _Tp>
struct has_trivial_copy_assign
: public integral_constant<bool, __has_trivial_assign(_Tp)>
{ } __attribute__ ((__deprecated__));
template<typename _Tp>
struct has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)>
{ };
template<typename _Tp>
struct alignment_of
: public integral_constant<std::size_t, __alignof__(_Tp)> { };
template<typename>
struct rank
: public integral_constant<std::size_t, 0> { };
template<typename _Tp, std::size_t _Size>
struct rank<_Tp[_Size]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
template<typename _Tp>
struct rank<_Tp[]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
template<typename, unsigned _Uint>
struct extent
: public integral_constant<std::size_t, 0> { };
template<typename _Tp, unsigned _Uint, std::size_t _Size>
struct extent<_Tp[_Size], _Uint>
: public integral_constant<std::size_t,
_Uint == 0 ? _Size : extent<_Tp,
_Uint - 1>::value>
{ };
template<typename _Tp, unsigned _Uint>
struct extent<_Tp[], _Uint>
: public integral_constant<std::size_t,
_Uint == 0 ? 0 : extent<_Tp,
_Uint - 1>::value>
{ };
template<typename, typename>
struct is_same
: public false_type { };
template<typename _Tp>
struct is_same<_Tp, _Tp>
: public true_type { };
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
{ typedef typename is_void<_To>::type type; };
template<typename _From, typename _To>
class __is_convertible_helper<_From, _To, false>
{
template<typename _To1>
static void __test_aux(_To1);
template<typename _From1, typename _To1,
typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
static true_type
__test(int);
template<typename, typename>
static false_type
__test(...);
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 _Tp>
struct remove_const
{ typedef _Tp type; };
template<typename _Tp>
struct remove_const<_Tp const>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_volatile
{ typedef _Tp type; };
template<typename _Tp>
struct remove_volatile<_Tp volatile>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_cv
{
typedef typename
remove_const<typename remove_volatile<_Tp>::type>::type type;
};
template<typename _Tp>
struct add_const
{ typedef _Tp const type; };
template<typename _Tp>
struct add_volatile
{ typedef _Tp volatile type; };
template<typename _Tp>
struct add_cv
{
typedef typename
add_const<typename add_volatile<_Tp>::type>::type type;
};
template<typename _Tp>
using remove_const_t = typename remove_const<_Tp>::type;
template<typename _Tp>
using remove_volatile_t = typename remove_volatile<_Tp>::type;
template<typename _Tp>
using remove_cv_t = typename remove_cv<_Tp>::type;
template<typename _Tp>
using add_const_t = typename add_const<_Tp>::type;
template<typename _Tp>
using add_volatile_t = typename add_volatile<_Tp>::type;
template<typename _Tp>
using add_cv_t = typename add_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_lvalue_reference_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_lvalue_reference_helper<_Tp, true>
{ typedef _Tp& type; };
template<typename _Tp>
struct add_lvalue_reference
: public __add_lvalue_reference_helper<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __add_rvalue_reference_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_rvalue_reference_helper<_Tp, true>
{ 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_lvalue_reference_t = typename add_lvalue_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 _Unqualified>
struct __cv_selector<_Unqualified, false, true>
{ typedef volatile _Unqualified __type; };
template<typename _Unqualified>
struct __cv_selector<_Unqualified, true, false>
{ typedef const _Unqualified __type; };
template<typename _Unqualified>
struct __cv_selector<_Unqualified, true, true>
{ typedef const volatile _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<>
struct __make_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __make_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __make_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __make_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __make_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __make_unsigned<long long>
{ typedef unsigned long long __type; };
template<>
struct __make_unsigned<wchar_t> : __make_unsigned<int>
{ };
# 1785 "/usr/include/c++/6/type_traits" 3
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>
{
typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
typedef typename __unsignedt::__type __unsigned_type;
typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
public:
typedef typename __cv_unsigned::__type __type;
};
template<typename _Tp>
class __make_unsigned_selector<_Tp, false, true>
{
typedef unsigned char __smallest;
static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short);
static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int);
static const bool __b3 = sizeof(_Tp) <= sizeof(unsigned long);
typedef conditional<__b3, unsigned long, unsigned long long> __cond3;
typedef typename __cond3::type __cond3_type;
typedef conditional<__b2, unsigned int, __cond3_type> __cond2;
typedef typename __cond2::type __cond2_type;
typedef conditional<__b1, unsigned short, __cond2_type> __cond1;
typedef typename __cond1::type __cond1_type;
typedef typename conditional<__b0, __smallest, __cond1_type>::type
__unsigned_type;
typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
public:
typedef typename __cv_unsigned::__type __type;
};
template<typename _Tp>
struct make_unsigned
{ typedef typename __make_unsigned_selector<_Tp>::__type type; };
template<>
struct make_unsigned<bool>;
template<typename _Tp>
struct __make_signed
{ typedef _Tp __type; };
template<>
struct __make_signed<char>
{ typedef signed char __type; };
template<>
struct __make_signed<unsigned char>
{ typedef signed char __type; };
template<>
struct __make_signed<unsigned short>
{ typedef signed short __type; };
template<>
struct __make_signed<unsigned int>
{ typedef signed int __type; };
template<>
struct __make_signed<unsigned long>
{ typedef signed long __type; };
template<>
struct __make_signed<unsigned long long>
{ typedef signed long long __type; };
# 1874 "/usr/include/c++/6/type_traits" 3
template<>
struct __make_signed<char16_t> : __make_signed<uint_least16_t>
{ };
template<>
struct __make_signed<char32_t> : __make_signed<uint_least32_t>
{ };
# 1904 "/usr/include/c++/6/type_traits" 3
template<typename _Tp,
bool _IsInt = is_integral<_Tp>::value,
bool _IsEnum = is_enum<_Tp>::value>
class __make_signed_selector;
template<typename _Tp>
class __make_signed_selector<_Tp, true, false>
{
typedef __make_signed<typename remove_cv<_Tp>::type> __signedt;
typedef typename __signedt::__type __signed_type;
typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed;
public:
typedef typename __cv_signed::__type __type;
};
template<typename _Tp>
class __make_signed_selector<_Tp, false, true>
{
typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type;
public:
typedef typename __make_signed_selector<__unsigned_type>::__type __type;
};
template<typename _Tp>
struct make_signed
{ typedef typename __make_signed_selector<_Tp>::__type type; };
template<>
struct make_signed<bool>;
template<typename _Tp>
using make_signed_t = typename make_signed<_Tp>::type;
template<typename _Tp>
using make_unsigned_t = typename make_unsigned<_Tp>::type;
template<typename _Tp>
struct remove_extent
{ typedef _Tp type; };
template<typename _Tp, std::size_t _Size>
struct remove_extent<_Tp[_Size]>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_extent<_Tp[]>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_all_extents
{ typedef _Tp type; };
template<typename _Tp, std::size_t _Size>
struct remove_all_extents<_Tp[_Size]>
{ typedef typename remove_all_extents<_Tp>::type type; };
template<typename _Tp>
struct remove_all_extents<_Tp[]>
{ typedef typename remove_all_extents<_Tp>::type type; };
template<typename _Tp>
using remove_extent_t = typename remove_extent<_Tp>::type;
template<typename _Tp>
using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
template<typename _Tp, typename>
struct __remove_pointer_helper
{ typedef _Tp type; };
template<typename _Tp, typename _Up>
struct __remove_pointer_helper<_Tp, _Up*>
{ typedef _Up type; };
template<typename _Tp>
struct remove_pointer
: public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
{ };
template<typename _Tp, bool = __or_<__is_referenceable<_Tp>,
is_void<_Tp>>::value>
struct __add_pointer_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_pointer_helper<_Tp, true>
{ typedef typename remove_reference<_Tp>::type* type; };
template<typename _Tp>
struct add_pointer
: public __add_pointer_helper<_Tp>
{ };
template<typename _Tp>
using remove_pointer_t = typename remove_pointer<_Tp>::type;
template<typename _Tp>
using add_pointer_t = typename add_pointer<_Tp>::type;
template<std::size_t _Len>
struct __aligned_storage_msa
{
union __type
{
unsigned char __data[_Len];
struct __attribute__((__aligned__)) { } __align;
};
};
# 2050 "/usr/include/c++/6/type_traits" 3
template<std::size_t _Len, std::size_t _Align =
__alignof__(typename __aligned_storage_msa<_Len>::__type)>
struct aligned_storage
{
union type
{
unsigned char __data[_Len];
struct __attribute__((__aligned__((_Align)))) { } __align;
};
};
template <typename... _Types>
struct __strictest_alignment
{
static const size_t _S_alignment = 0;
static const size_t _S_size = 0;
};
template <typename _Tp, typename... _Types>
struct __strictest_alignment<_Tp, _Types...>
{
static const size_t _S_alignment =
alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
static const size_t _S_size =
sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
};
# 2089 "/usr/include/c++/6/type_traits" 3
template <size_t _Len, typename... _Types>
struct aligned_union
{
private:
static_assert(sizeof...(_Types) != 0, "At least one type is required");
using __strictest = __strictest_alignment<_Types...>;
static const size_t _S_len = _Len > __strictest::_S_size
? _Len : __strictest::_S_size;
public:
static const size_t alignment_value = __strictest::_S_alignment;
typedef typename aligned_storage<_S_len, alignment_value>::type type;
};
template <size_t _Len, typename... _Types>
const size_t aligned_union<_Len, _Types...>::alignment_value;
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 typename remove_cv<_Up>::type __type; };
template<typename _Up>
struct __decay_selector<_Up, true, false>
{ typedef typename remove_extent<_Up>::type* __type; };
template<typename _Up>
struct __decay_selector<_Up, false, true>
{ typedef typename add_pointer<_Up>::type __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>
class reference_wrapper;
template<typename _Tp>
struct __strip_reference_wrapper
{
typedef _Tp __type;
};
template<typename _Tp>
struct __strip_reference_wrapper<reference_wrapper<_Tp> >
{
typedef _Tp& __type;
};
template<typename _Tp>
struct __decay_and_strip
{
typedef typename __strip_reference_wrapper<
typename decay<_Tp>::type>::__type __type;
};
template<bool, typename _Tp = void>
struct enable_if
{ };
template<typename _Tp>
struct enable_if<true, _Tp>
{ typedef _Tp type; };
template<typename... _Cond>
using _Require = typename enable_if<__and_<_Cond...>::value>::type;
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>
struct common_type;
struct __do_common_type_impl
{
template<typename _Tp, typename _Up>
static __success_type<typename decay<decltype
(true ? std::declval<_Tp>()
: std::declval<_Up>())>::type> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _Tp, typename _Up>
struct __common_type_impl
: private __do_common_type_impl
{
typedef decltype(_S_test<_Tp, _Up>(0)) type;
};
struct __do_member_type_wrapper
{
template<typename _Tp>
static __success_type<typename _Tp::type> _S_test(int);
template<typename>
static __failure_type _S_test(...);
};
template<typename _Tp>
struct __member_type_wrapper
: private __do_member_type_wrapper
{
typedef decltype(_S_test<_Tp>(0)) type;
};
template<typename _CTp, typename... _Args>
struct __expanded_common_type_wrapper
{
typedef common_type<typename _CTp::type, _Args...> type;
};
template<typename... _Args>
struct __expanded_common_type_wrapper<__failure_type, _Args...>
{ typedef __failure_type type; };
template<typename _Tp>
struct common_type<_Tp>
{ typedef typename decay<_Tp>::type type; };
template<typename _Tp, typename _Up>
struct common_type<_Tp, _Up>
: public __common_type_impl<_Tp, _Up>::type
{ };
template<typename _Tp, typename _Up, typename... _Vp>
struct common_type<_Tp, _Up, _Vp...>
: public __expanded_common_type_wrapper<typename __member_type_wrapper<
common_type<_Tp, _Up>>::type, _Vp...>::type
{ };
template<typename _Tp>
struct underlying_type
{
typedef __underlying_type(_Tp) type;
};
template<typename _Tp>
struct __declval_protector
{
static const bool __stop = false;
static typename add_rvalue_reference<_Tp>::type __delegate();
};
template<typename _Tp>
inline typename add_rvalue_reference<_Tp>::type
declval() noexcept
{
static_assert(__declval_protector<_Tp>::__stop,
"declval() must not be used!");
return __declval_protector<_Tp>::__delegate();
}
template<typename _Signature>
class result_of;
struct __invoke_memfun_ref { };
struct __invoke_memfun_deref { };
struct __invoke_memobj_ref { };
struct __invoke_memobj_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 _Fp, typename _Tp1, typename... _Args>
static __result_of_success<decltype(
(std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...)
), __invoke_memfun_ref> _S_test(int);
template<typename...>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_memfun_ref
: private __result_of_memfun_ref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
};
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...>
static __failure_type _S_test(...);
};
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;
};
struct __result_of_memobj_ref_impl
{
template<typename _Fp, typename _Tp1>
static __result_of_success<decltype(
std::declval<_Tp1>().*std::declval<_Fp>()
), __invoke_memobj_ref> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj_ref
: private __result_of_memobj_ref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
};
struct __result_of_memobj_deref_impl
{
template<typename _Fp, typename _Tp1>
static __result_of_success<decltype(
(*std::declval<_Tp1>()).*std::declval<_Fp>()
), __invoke_memobj_deref> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj_deref
: private __result_of_memobj_deref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj;
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, _Arg>
{
typedef typename remove_cv<typename remove_reference<
_Arg>::type>::type _Argval;
typedef _Res _Class::* _MemPtr;
typedef typename conditional<__or_<is_same<_Argval, _Class>,
is_base_of<_Class, _Argval>>::value,
__result_of_memobj_ref<_MemPtr, _Arg>,
__result_of_memobj_deref<_MemPtr, _Arg>
>::type::type 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_cv<typename remove_reference<
_Arg>::type>::type _Argval;
typedef _Res _Class::* _MemPtr;
typedef typename conditional<__or_<is_same<_Argval, _Class>,
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 _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>>
: __result_of_memobj_ref<_Res _Class::*, _Arg&>
{ };
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&>
: __result_of_memobj_ref<_Res _Class::*, _Arg&>
{ };
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, const reference_wrapper<_Arg>&>
: __result_of_memobj_ref<_Res _Class::*, _Arg&>
{ };
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&&>
: __result_of_memobj_ref<_Res _Class::*, _Arg&>
{ };
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, const reference_wrapper<_Arg>&&>
: __result_of_memobj_ref<_Res _Class::*, _Arg&>
{ };
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>, _Args...>
: __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
{ };
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&,
_Args...>
: __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
{ };
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, const reference_wrapper<_Arg>&,
_Args...>
: __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
{ };
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&&,
_Args...>
: __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
{ };
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, const reference_wrapper<_Arg>&&,
_Args...>
: __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
{ };
template<bool, bool, typename _Functor, typename... _ArgTypes>
struct __result_of_impl
{
typedef __failure_type type;
};
template<typename _MemPtr, typename _Arg>
struct __result_of_impl<true, false, _MemPtr, _Arg>
: public __result_of_memobj<typename decay<_MemPtr>::type, _Arg>
{ };
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
: public __result_of_memfun<typename decay<_MemPtr>::type, _Arg, _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...>
static __failure_type _S_test(...);
};
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 result_of<_Functor(_ArgTypes...)>
: 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<size_t _Len, size_t _Align =
__alignof__(typename __aligned_storage_msa<_Len>::__type)>
using aligned_storage_t = typename aligned_storage<_Len, _Align>::type;
template <size_t _Len, typename... _Types>
using aligned_union_t = typename aligned_union<_Len, _Types...>::type;
template<typename _Tp>
using decay_t = typename decay<_Tp>::type;
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... _Tp>
using common_type_t = typename common_type<_Tp...>::type;
template<typename _Tp>
using underlying_type_t = typename underlying_type<_Tp>::type;
template<typename _Tp>
using result_of_t = typename result_of<_Tp>::type;
template<typename...> using __void_t = void;
# 2551 "/usr/include/c++/6/type_traits" 3
template<typename _Default, typename _AlwaysVoid,
template<typename...> class _Op, typename... _Args>
struct __detector
{
using value_t = false_type;
using type = _Default;
};
template<typename _Default, template<typename...> class _Op,
typename... _Args>
struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
{
using value_t = true_type;
using type = _Op<_Args...>;
};
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;
# 2595 "/usr/include/c++/6/type_traits" 3
template <typename _Tp>
struct __is_swappable;
template <typename _Tp>
struct __is_nothrow_swappable;
template<typename _Tp>
inline
typename enable_if<__and_<is_move_constructible<_Tp>,
is_move_assignable<_Tp>>::value>::type
swap(_Tp&, _Tp&)
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value);
template<typename _Tp, size_t _Nm>
inline
typename enable_if<__is_swappable<_Tp>::value>::type
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
noexcept(__is_nothrow_swappable<_Tp>::value);
namespace __swappable_details {
using std::swap;
struct __do_is_swappable_impl
{
template<typename _Tp, typename
= decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))>
static true_type __test(int);
template<typename>
static false_type __test(...);
};
struct __do_is_nothrow_swappable_impl
{
template<typename _Tp>
static __bool_constant<
noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))
> __test(int);
template<typename>
static false_type __test(...);
};
}
template<typename _Tp>
struct __is_swappable_impl
: public __swappable_details::__do_is_swappable_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp>
struct __is_nothrow_swappable_impl
: public __swappable_details::__do_is_nothrow_swappable_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp>
struct __is_swappable
: public __is_swappable_impl<_Tp>::type
{ };
template<typename _Tp>
struct __is_nothrow_swappable
: public __is_nothrow_swappable_impl<_Tp>::type
{ };
}
# 18 "/usr/include/boost/hana/core/default.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Method, typename>
struct is_default : std::false_type { };
template <typename Method>
struct is_default<Method, decltype((void)
static_cast<default_>(*(Method*)0)
)>
: std::true_type
{ };
}}
# 18 "/usr/include/boost/hana/concept/struct.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/tag_of.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/tag_of.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/tag_of.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/tag_of.hpp" 3 4
namespace boost { namespace hana {
# 105 "/usr/include/boost/hana/fwd/core/tag_of.hpp" 3 4
template <typename T, typename = void>
struct tag_of;
# 116 "/usr/include/boost/hana/fwd/core/tag_of.hpp" 3 4
template <typename T>
using tag_of_t = typename hana::tag_of<T>::type;
}}
# 14 "/usr/include/boost/hana/core/tag_of.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T, typename>
struct tag_of : tag_of<T, when<true>> { };
namespace core_detail {
template <typename ...>
struct is_valid { static constexpr bool value = true; };
}
template <typename T, bool condition>
struct tag_of<T, when<condition>> {
using type = T;
};
template <typename T>
struct tag_of<T, when<
core_detail::is_valid<typename T::hana_tag>::value
>> {
using type = typename T::hana_tag;
};
template <typename T> struct tag_of<T const> : tag_of<T> { };
template <typename T> struct tag_of<T volatile> : tag_of<T> { };
template <typename T> struct tag_of<T const volatile> : tag_of<T> { };
template <typename T> struct tag_of<T&> : tag_of<T> { };
template <typename T> struct tag_of<T&&> : tag_of<T> { };
}}
# 19 "/usr/include/boost/hana/concept/struct.hpp" 2 3 4
namespace boost { namespace hana {
template <typename S>
struct Struct {
using Tag = typename tag_of<S>::type;
static constexpr bool value = !is_default<accessors_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/accessors.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/dispatch.hpp" 1 3 4
# 14 "/usr/include/boost/hana/core/dispatch.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/dispatch_if.hpp" 1 3 4
# 18 "/usr/include/boost/hana/detail/dispatch_if.hpp" 3 4
namespace boost { namespace hana {
struct deleted_implementation {
template <typename ...T>
static constexpr auto apply(T&& ...) = delete;
};
# 54 "/usr/include/boost/hana/detail/dispatch_if.hpp" 3 4
}}
# 15 "/usr/include/boost/hana/core/dispatch.hpp" 2 3 4
# 18 "/usr/include/boost/hana/accessors.hpp" 2 3 4
namespace boost { namespace hana {
template <typename S>
struct accessors_t {
static_assert(hana::Struct<S>::value,
"hana::accessors<S> requires 'S' to be a Struct");
constexpr decltype(auto) operator()() const {
using Accessors = ::std::conditional_t< (hana::Struct<S>::value), accessors_impl<S>, ::boost::hana::deleted_implementation >
;
return Accessors::apply();
}
};
template <typename S, bool condition>
struct accessors_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
namespace struct_detail {
template <typename ...>
struct is_valid { static constexpr bool value = true; };
}
template <typename S>
struct accessors_impl<S, when<
struct_detail::is_valid<typename S::hana_accessors_impl>::value
>>
: S::hana_accessors_impl
{ };
}}
# 59 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/adapt_adt.hpp" 1 3 4
# 13 "/usr/include/boost/hana/adapt_adt.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/adapt_adt.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/adapt_adt.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/adapt_adt.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/adapt_adt.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/struct_macros.hpp" 1 3 4
# 26 "/usr/include/boost/hana/detail/struct_macros.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/preprocessor.hpp" 1 3 4
# 27 "/usr/include/boost/hana/detail/struct_macros.hpp" 2 3 4
# 1 "/usr/include/boost/hana/pair.hpp" 1 3 4
# 13 "/usr/include/boost/hana/pair.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/pair.hpp" 1 3 4
# 14 "/usr/include/boost/hana/fwd/pair.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/make.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/make.hpp" 3 4
namespace boost { namespace hana {
# 54 "/usr/include/boost/hana/fwd/core/make.hpp" 3 4
template <typename Tag, typename = void>
struct make_impl;
template <typename Tag>
struct make_t {
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const {
return make_impl<Tag>::apply(static_cast<X&&>(x)...);
}
};
template <typename Tag>
constexpr make_t<Tag> make{};
}}
# 15 "/usr/include/boost/hana/fwd/pair.hpp" 2 3 4
namespace boost { namespace hana {
# 120 "/usr/include/boost/hana/fwd/pair.hpp" 3 4
template <typename First, typename Second>
struct pair;
struct pair_tag { };
# 150 "/usr/include/boost/hana/fwd/pair.hpp" 3 4
constexpr auto make_pair = make<pair_tag>;
}}
# 14 "/usr/include/boost/hana/pair.hpp" 2 3 4
# 1 "/usr/include/boost/hana/basic_tuple.hpp" 1 3 4
# 13 "/usr/include/boost/hana/basic_tuple.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/basic_tuple.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/basic_tuple.hpp" 3 4
namespace boost { namespace hana {
# 29 "/usr/include/boost/hana/fwd/basic_tuple.hpp" 3 4
template <typename ...Xs>
struct basic_tuple;
struct basic_tuple_tag { };
# 62 "/usr/include/boost/hana/fwd/basic_tuple.hpp" 3 4
constexpr auto make_basic_tuple = make<basic_tuple_tag>;
}}
# 14 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/decay.hpp" 1 3 4
# 19 "/usr/include/boost/hana/detail/decay.hpp" 3 4
namespace boost { namespace hana { namespace detail {
# 32 "/usr/include/boost/hana/detail/decay.hpp" 3 4
template <typename T, typename U = typename std::remove_reference<T>::type>
struct decay {
using type = typename std::remove_cv<U>::type;
};
template <typename T, typename U>
struct decay<T, U[]> { using type = U*; };
template <typename T, typename U, std::size_t N>
struct decay<T, U[N]> { using type = U*; };
template <typename T, typename R, typename ...A>
struct decay<T, R(A...)> { using type = R(*)(A...); };
template <typename T, typename R, typename ...A>
struct decay<T, R(A..., ...)> { using type = R(*)(A..., ...); };
} }}
# 17 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/intrinsics.hpp" 1 3 4
# 18 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/at.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/at.hpp" 3 4
namespace boost { namespace hana {
# 54 "/usr/include/boost/hana/fwd/at.hpp" 3 4
template <typename It, typename = void>
struct at_impl : at_impl<It, when<true>> { };
struct at_t {
template <typename Xs, typename N>
constexpr decltype(auto) operator()(Xs&& xs, N const& n) const;
};
constexpr at_t at{};
# 84 "/usr/include/boost/hana/fwd/at.hpp" 3 4
template <std::size_t n, typename Xs>
constexpr decltype(auto) at_c(Xs&& xs);
}}
# 19 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/bool.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fwd/bool.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/integral_constant.hpp" 1 3 4
# 14 "/usr/include/boost/hana/fwd/integral_constant.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/operators/adl.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/operators/adl.hpp" 3 4
namespace boost { namespace hana { namespace detail { namespace operators {
# 30 "/usr/include/boost/hana/detail/operators/adl.hpp" 3 4
template <typename ...>
struct adl { };
}} }}
# 15 "/usr/include/boost/hana/fwd/integral_constant.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T>
struct integral_constant_tag {
using value_type = T;
};
namespace ic_detail {
template <typename T, T v>
struct with_index_t {
template <typename F>
constexpr void operator()(F&& f) const;
};
template <typename T, T v>
struct times_t {
static constexpr with_index_t<T, v> with_index{};
template <typename F>
constexpr void operator()(F&& f) const;
};
}
# 233 "/usr/include/boost/hana/fwd/integral_constant.hpp" 3 4
template <typename T, T v>
struct integral_constant
: std::integral_constant<T, v>
, detail::operators::adl<integral_constant<T, v>>
{
using type = integral_constant;
static constexpr ic_detail::times_t<T, v> times{};
using hana_tag = integral_constant_tag<T>;
};
# 262 "/usr/include/boost/hana/fwd/integral_constant.hpp" 3 4
template <typename T, T v>
constexpr integral_constant<T, v> integral_c{};
template <bool b>
using bool_ = integral_constant<bool, b>;
template <bool b>
constexpr bool_<b> bool_c{};
using true_ = bool_<true>;
constexpr auto true_c = bool_c<true>;
using false_ = bool_<false>;
constexpr auto false_c = bool_c<false>;
template <char c>
using char_ = integral_constant<char, c>;
template <char c>
constexpr char_<c> char_c{};
template <short i>
using short_ = integral_constant<short, i>;
template <short i>
constexpr short_<i> short_c{};
template <unsigned short i>
using ushort_ = integral_constant<unsigned short, i>;
template <unsigned short i>
constexpr ushort_<i> ushort_c{};
template <int i>
using int_ = integral_constant<int, i>;
template <int i>
constexpr int_<i> int_c{};
template <unsigned int i>
using uint = integral_constant<unsigned int, i>;
template <unsigned int i>
constexpr uint<i> uint_c{};
template <long i>
using long_ = integral_constant<long, i>;
template <long i>
constexpr long_<i> long_c{};
template <unsigned long i>
using ulong = integral_constant<unsigned long, i>;
template <unsigned long i>
constexpr ulong<i> ulong_c{};
template <long long i>
using llong = integral_constant<long long, i>;
template <long long i>
constexpr llong<i> llong_c{};
template <unsigned long long i>
using ullong = integral_constant<unsigned long long, i>;
template <unsigned long long i>
constexpr ullong<i> ullong_c{};
template <std::size_t i>
using size_t = integral_constant<std::size_t, i>;
template <std::size_t i>
constexpr size_t<i> size_c{};
namespace literals {
# 394 "/usr/include/boost/hana/fwd/integral_constant.hpp" 3 4
template <char ...c>
constexpr auto operator"" _c();
}
}}
# 14 "/usr/include/boost/hana/fwd/bool.hpp" 2 3 4
# 20 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/concept/sequence.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/concept/sequence.hpp" 3 4
namespace boost { namespace hana {
# 160 "/usr/include/boost/hana/fwd/concept/sequence.hpp" 3 4
template <typename S, typename = void>
struct Sequence : Sequence<S, when<true>> { };
}}
# 21 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/drop_front.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/drop_front.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/drop_front.hpp" 3 4
template <typename It, typename = void>
struct drop_front_impl : drop_front_impl<It, when<true>> { };
struct drop_front_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr drop_front_t drop_front{};
}}
# 24 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/is_empty.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/is_empty.hpp" 3 4
namespace boost { namespace hana {
# 37 "/usr/include/boost/hana/fwd/is_empty.hpp" 3 4
template <typename It, typename = void>
struct is_empty_impl : is_empty_impl<It, when<true>> { };
struct is_empty_t {
template <typename Xs>
constexpr auto operator()(Xs const& xs) const;
};
constexpr is_empty_t is_empty{};
}}
# 25 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/transform.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/transform.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/transform.hpp" 3 4
template <typename Xs, typename = void>
struct transform_impl : transform_impl<Xs, when<true>> { };
struct transform_t {
template <typename Xs, typename F>
constexpr auto operator()(Xs&& xs, F&& f) const;
};
constexpr transform_t transform{};
}}
# 26 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/unpack.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/unpack.hpp" 3 4
namespace boost { namespace hana {
# 83 "/usr/include/boost/hana/fwd/unpack.hpp" 3 4
template <typename T, typename = void>
struct unpack_impl : unpack_impl<T, when<true>> { };
struct unpack_t {
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const;
};
constexpr unpack_t unpack{};
}}
# 27 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
# 35 "/usr/include/boost/hana/basic_tuple.hpp" 3 4
# 1 "/usr/include/c++/6/utility" 1 3 4
# 58 "/usr/include/c++/6/utility" 3 4
# 59 "/usr/include/c++/6/utility" 3
# 69 "/usr/include/c++/6/utility" 3
# 1 "/usr/include/c++/6/bits/stl_relops.h" 1 3
# 67 "/usr/include/c++/6/bits/stl_relops.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
namespace rel_ops
{
# 85 "/usr/include/c++/6/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator!=(const _Tp& __x, const _Tp& __y)
{ return !(__x == __y); }
# 98 "/usr/include/c++/6/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator>(const _Tp& __x, const _Tp& __y)
{ return __y < __x; }
# 111 "/usr/include/c++/6/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator<=(const _Tp& __x, const _Tp& __y)
{ return !(__y < __x); }
# 124 "/usr/include/c++/6/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator>=(const _Tp& __x, const _Tp& __y)
{ return !(__x < __y); }
}
}
# 70 "/usr/include/c++/6/utility" 2 3
# 1 "/usr/include/c++/6/bits/stl_pair.h" 1 3
# 59 "/usr/include/c++/6/bits/stl_pair.h" 3
# 1 "/usr/include/c++/6/bits/move.h" 1 3
# 34 "/usr/include/c++/6/bits/move.h" 3
# 1 "/usr/include/c++/6/bits/concept_check.h" 1 3
# 33 "/usr/include/c++/6/bits/concept_check.h" 3
# 34 "/usr/include/c++/6/bits/concept_check.h" 3
# 35 "/usr/include/c++/6/bits/move.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<typename _Tp>
inline _Tp*
__addressof(_Tp& __r) noexcept
{
return reinterpret_cast<_Tp*>
(&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
}
}
namespace std __attribute__ ((__visibility__ ("default")))
{
# 74 "/usr/include/c++/6/bits/move.h" 3
template<typename _Tp>
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type& __t) noexcept
{ return static_cast<_Tp&&>(__t); }
template<typename _Tp>
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
{
static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"
" substituting _Tp is an lvalue reference type");
return static_cast<_Tp&&>(__t);
}
template<typename _Tp>
constexpr typename std::remove_reference<_Tp>::type&&
move(_Tp&& __t) noexcept
{ return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
template<typename _Tp>
struct __move_if_noexcept_cond
: public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
is_copy_constructible<_Tp>>::type { };
# 118 "/usr/include/c++/6/bits/move.h" 3
template<typename _Tp>
constexpr typename
conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type
move_if_noexcept(_Tp& __x) noexcept
{ return std::move(__x); }
# 133 "/usr/include/c++/6/bits/move.h" 3
template<typename _Tp>
inline _Tp*
addressof(_Tp& __r) noexcept
{ return std::__addressof(__r); }
template <typename _Tp, typename _Up = _Tp>
inline _Tp
__exchange(_Tp& __obj, _Up&& __new_val)
{
_Tp __old_val = std::move(__obj);
__obj = std::forward<_Up>(__new_val);
return __old_val;
}
}
# 159 "/usr/include/c++/6/bits/move.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 174 "/usr/include/c++/6/bits/move.h" 3
template<typename _Tp>
inline
typename enable_if<__and_<is_move_constructible<_Tp>,
is_move_assignable<_Tp>>::value>::type
swap(_Tp& __a, _Tp& __b)
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
{
_Tp __tmp = std::move(__a);
__a = std::move(__b);
__b = std::move(__tmp);
}
template<typename _Tp, size_t _Nm>
inline
typename enable_if<__is_swappable<_Tp>::value>::type
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
noexcept(__is_nothrow_swappable<_Tp>::value)
{
for (size_t __n = 0; __n < _Nm; ++__n)
swap(__a[__n], __b[__n]);
}
}
# 60 "/usr/include/c++/6/bits/stl_pair.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 76 "/usr/include/c++/6/bits/stl_pair.h" 3
struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
template<typename...>
class tuple;
template<std::size_t...>
struct _Index_tuple;
template <bool, typename _T1, typename _T2>
struct _PCC
{
template <typename _U1, typename _U2>
static constexpr bool _ConstructiblePair()
{
return __and_<is_constructible<_T1, const _U1&>,
is_constructible<_T2, const _U2&>>::value;
}
template <typename _U1, typename _U2>
static constexpr bool _ImplicitlyConvertiblePair()
{
return __and_<is_convertible<const _U1&, _T1>,
is_convertible<const _U2&, _T2>>::value;
}
template <typename _U1, typename _U2>
static constexpr bool _MoveConstructiblePair()
{
return __and_<is_constructible<_T1, _U1&&>,
is_constructible<_T2, _U2&&>>::value;
}
template <typename _U1, typename _U2>
static constexpr bool _ImplicitlyMoveConvertiblePair()
{
return __and_<is_convertible<_U1&&, _T1>,
is_convertible<_U2&&, _T2>>::value;
}
template <bool __implicit, typename _U1, typename _U2>
static constexpr bool _CopyMovePair()
{
using __do_converts = __and_<is_convertible<const _U1&, _T1>,
is_convertible<_U2&&, _T2>>;
using __converts = typename conditional<__implicit,
__do_converts,
__not_<__do_converts>>::type;
return __and_<is_constructible<_T1, const _U1&>,
is_constructible<_T2, _U2&&>,
__converts
>::value;
}
template <bool __implicit, typename _U1, typename _U2>
static constexpr bool _MoveCopyPair()
{
using __do_converts = __and_<is_convertible<_U1&&, _T1>,
is_convertible<const _U2&, _T2>>;
using __converts = typename conditional<__implicit,
__do_converts,
__not_<__do_converts>>::type;
return __and_<is_constructible<_T1, _U1&&>,
is_constructible<_T2, const _U2&&>,
__converts
>::value;
}
};
template <typename _T1, typename _T2>
struct _PCC<false, _T1, _T2>
{
template <typename _U1, typename _U2>
static constexpr bool _ConstructiblePair()
{
return false;
}
template <typename _U1, typename _U2>
static constexpr bool _ImplicitlyConvertiblePair()
{
return false;
}
template <typename _U1, typename _U2>
static constexpr bool _MoveConstructiblePair()
{
return false;
}
template <typename _U1, typename _U2>
static constexpr bool _ImplicitlyMoveConvertiblePair()
{
return false;
}
};
struct __wrap_nonesuch : std::__nonesuch {
explicit __wrap_nonesuch(const __nonesuch&) = delete;
};
# 193 "/usr/include/c++/6/bits/stl_pair.h" 3
template<typename _T1, typename _T2>
struct pair
{
typedef _T1 first_type;
typedef _T2 second_type;
_T1 first;
_T2 second;
template <typename _U1 = _T1,
typename _U2 = _T2,
typename enable_if<__and_<
__is_implicitly_default_constructible<_U1>,
__is_implicitly_default_constructible<_U2>>
::value, bool>::type = true>
constexpr pair()
: first(), second() { }
template <typename _U1 = _T1,
typename _U2 = _T2,
typename enable_if<__and_<
is_default_constructible<_U1>,
is_default_constructible<_U2>,
__not_<
__and_<__is_implicitly_default_constructible<_U1>,
__is_implicitly_default_constructible<_U2>>>>
::value, bool>::type = false>
explicit constexpr pair()
: first(), second() { }
# 237 "/usr/include/c++/6/bits/stl_pair.h" 3
using _PCCP = _PCC<true, _T1, _T2>;
template<typename _U1 = _T1, typename _U2=_T2, typename
enable_if<_PCCP::template
_ConstructiblePair<_U1, _U2>()
&& _PCCP::template
_ImplicitlyConvertiblePair<_U1, _U2>(),
bool>::type=true>
constexpr pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
template<typename _U1 = _T1, typename _U2=_T2, typename
enable_if<_PCCP::template
_ConstructiblePair<_U1, _U2>()
&& !_PCCP::template
_ImplicitlyConvertiblePair<_U1, _U2>(),
bool>::type=false>
explicit constexpr pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
# 265 "/usr/include/c++/6/bits/stl_pair.h" 3
template <typename _U1, typename _U2>
using _PCCFP = _PCC<!is_same<_T1, _U1>::value
|| !is_same<_T2, _U2>::value,
_T1, _T2>;
template<typename _U1, typename _U2, typename
enable_if<_PCCFP<_U1, _U2>::template
_ConstructiblePair<_U1, _U2>()
&& _PCCFP<_U1, _U2>::template
_ImplicitlyConvertiblePair<_U1, _U2>(),
bool>::type=true>
constexpr pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
template<typename _U1, typename _U2, typename
enable_if<_PCCFP<_U1, _U2>::template
_ConstructiblePair<_U1, _U2>()
&& !_PCCFP<_U1, _U2>::template
_ImplicitlyConvertiblePair<_U1, _U2>(),
bool>::type=false>
explicit constexpr pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
constexpr pair(const pair&) = default;
constexpr pair(pair&&) = default;
template<typename _U1, typename
enable_if<_PCCP::template
_MoveCopyPair<true, _U1, _T2>(),
bool>::type=true>
constexpr pair(_U1&& __x, const _T2& __y)
: first(std::forward<_U1>(__x)), second(__y) { }
template<typename _U1, typename
enable_if<_PCCP::template
_MoveCopyPair<false, _U1, _T2>(),
bool>::type=false>
explicit constexpr pair(_U1&& __x, const _T2& __y)
: first(std::forward<_U1>(__x)), second(__y) { }
template<typename _U2, typename
enable_if<_PCCP::template
_CopyMovePair<true, _T1, _U2>(),
bool>::type=true>
constexpr pair(const _T1& __x, _U2&& __y)
: first(__x), second(std::forward<_U2>(__y)) { }
template<typename _U2, typename
enable_if<_PCCP::template
_CopyMovePair<false, _T1, _U2>(),
bool>::type=false>
explicit pair(const _T1& __x, _U2&& __y)
: first(__x), second(std::forward<_U2>(__y)) { }
template<typename _U1, typename _U2, typename
enable_if<_PCCP::template
_MoveConstructiblePair<_U1, _U2>()
&& _PCCP::template
_ImplicitlyMoveConvertiblePair<_U1, _U2>(),
bool>::type=true>
constexpr pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
template<typename _U1, typename _U2, typename
enable_if<_PCCP::template
_MoveConstructiblePair<_U1, _U2>()
&& !_PCCP::template
_ImplicitlyMoveConvertiblePair<_U1, _U2>(),
bool>::type=false>
explicit constexpr pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
template<typename _U1, typename _U2, typename
enable_if<_PCCFP<_U1, _U2>::template
_MoveConstructiblePair<_U1, _U2>()
&& _PCCFP<_U1, _U2>::template
_ImplicitlyMoveConvertiblePair<_U1, _U2>(),
bool>::type=true>
constexpr pair(pair<_U1, _U2>&& __p)
: first(std::forward<_U1>(__p.first)),
second(std::forward<_U2>(__p.second)) { }
template<typename _U1, typename _U2, typename
enable_if<_PCCFP<_U1, _U2>::template
_MoveConstructiblePair<_U1, _U2>()
&& !_PCCFP<_U1, _U2>::template
_ImplicitlyMoveConvertiblePair<_U1, _U2>(),
bool>::type=false>
explicit constexpr pair(pair<_U1, _U2>&& __p)
: first(std::forward<_U1>(__p.first)),
second(std::forward<_U2>(__p.second)) { }
template<typename... _Args1, typename... _Args2>
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
pair&
operator=(typename conditional<
__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>::value,
const pair&, const __wrap_nonesuch&>::type __p)
{
first = __p.first;
second = __p.second;
return *this;
}
pair&
operator=(typename conditional<
__not_<__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>>::value,
const pair&, const __wrap_nonesuch&>::type __p) = delete;
pair&
operator=(typename conditional<
__and_<is_move_assignable<_T1>,
is_move_assignable<_T2>>::value,
pair&&, __wrap_nonesuch&&>::type __p)
noexcept(__and_<is_nothrow_move_assignable<_T1>,
is_nothrow_move_assignable<_T2>>::value)
{
first = std::forward<first_type>(__p.first);
second = std::forward<second_type>(__p.second);
return *this;
}
template<typename _U1, typename _U2>
typename enable_if<__and_<is_assignable<_T1&, const _U1&>,
is_assignable<_T2&, const _U2&>>::value,
pair&>::type
operator=(const pair<_U1, _U2>& __p)
{
first = __p.first;
second = __p.second;
return *this;
}
template<typename _U1, typename _U2>
typename enable_if<__and_<is_assignable<_T1&, _U1&&>,
is_assignable<_T2&, _U2&&>>::value,
pair&>::type
operator=(pair<_U1, _U2>&& __p)
{
first = std::forward<_U1>(__p.first);
second = std::forward<_U2>(__p.second);
return *this;
}
void
swap(pair& __p)
noexcept(__is_nothrow_swappable<_T1>::value
&& __is_nothrow_swappable<_T2>::value)
{
using std::swap;
swap(first, __p.first);
swap(second, __p.second);
}
private:
template<typename... _Args1, std::size_t... _Indexes1,
typename... _Args2, std::size_t... _Indexes2>
pair(tuple<_Args1...>&, tuple<_Args2...>&,
_Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
};
template<typename _T1, typename _T2>
inline constexpr bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
template<typename _T1, typename _T2>
inline constexpr bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
template<typename _T1, typename _T2>
inline constexpr bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
template<typename _T1, typename _T2>
inline constexpr bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
template<typename _T1, typename _T2>
inline constexpr bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
template<typename _T1, typename _T2>
inline constexpr bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
template<typename _T1, typename _T2>
inline void
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
# 494 "/usr/include/c++/6/bits/stl_pair.h" 3
template<typename _T1, typename _T2>
constexpr pair<typename __decay_and_strip<_T1>::__type,
typename __decay_and_strip<_T2>::__type>
make_pair(_T1&& __x, _T2&& __y)
{
typedef typename __decay_and_strip<_T1>::__type __ds_type1;
typedef typename __decay_and_strip<_T2>::__type __ds_type2;
typedef pair<__ds_type1, __ds_type2> __pair_type;
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
}
# 513 "/usr/include/c++/6/bits/stl_pair.h" 3
}
# 71 "/usr/include/c++/6/utility" 2 3
# 1 "/usr/include/c++/6/initializer_list" 1 3
# 33 "/usr/include/c++/6/initializer_list" 3
# 34 "/usr/include/c++/6/initializer_list" 3
#pragma GCC visibility push(default)
namespace std
{
template<class _E>
class initializer_list
{
public:
typedef _E value_type;
typedef const _E& reference;
typedef const _E& const_reference;
typedef size_t size_type;
typedef const _E* iterator;
typedef const _E* const_iterator;
private:
iterator _M_array;
size_type _M_len;
constexpr initializer_list(const_iterator __a, size_type __l)
: _M_array(__a), _M_len(__l) { }
public:
constexpr initializer_list() noexcept
: _M_array(0), _M_len(0) { }
constexpr size_type
size() const noexcept { return _M_len; }
constexpr const_iterator
begin() const noexcept { return _M_array; }
constexpr const_iterator
end() const noexcept { return begin() + size(); }
};
template<class _Tp>
constexpr const _Tp*
begin(initializer_list<_Tp> __ils) noexcept
{ return __ils.begin(); }
template<class _Tp>
constexpr const _Tp*
end(initializer_list<_Tp> __ils) noexcept
{ return __ils.end(); }
}
#pragma GCC visibility pop
# 77 "/usr/include/c++/6/utility" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<typename _Tp>
struct tuple_size;
template<typename _Tp>
struct tuple_size<const _Tp>
: integral_constant<size_t, tuple_size<_Tp>::value> { };
template<typename _Tp>
struct tuple_size<volatile _Tp>
: integral_constant<size_t, tuple_size<_Tp>::value> { };
template<typename _Tp>
struct tuple_size<const volatile _Tp>
: integral_constant<size_t, tuple_size<_Tp>::value> { };
template<std::size_t __i, typename _Tp>
struct tuple_element;
template<std::size_t __i, typename _Tp>
using __tuple_element_t = typename tuple_element<__i, _Tp>::type;
template<std::size_t __i, typename _Tp>
struct tuple_element<__i, const _Tp>
{
typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type;
};
template<std::size_t __i, typename _Tp>
struct tuple_element<__i, volatile _Tp>
{
typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type;
};
template<std::size_t __i, typename _Tp>
struct tuple_element<__i, const volatile _Tp>
{
typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type;
};
template<std::size_t __i, typename _Tp>
using tuple_element_t = typename tuple_element<__i, _Tp>::type;
template<typename>
struct __is_tuple_like_impl : false_type
{ };
template<typename _T1, typename _T2>
struct __is_tuple_like_impl<std::pair<_T1, _T2>> : true_type
{ };
template<class _Tp1, class _Tp2>
struct tuple_size<std::pair<_Tp1, _Tp2>>
: public integral_constant<std::size_t, 2> { };
template<class _Tp1, class _Tp2>
struct tuple_element<0, std::pair<_Tp1, _Tp2>>
{ typedef _Tp1 type; };
template<class _Tp1, class _Tp2>
struct tuple_element<1, std::pair<_Tp1, _Tp2>>
{ typedef _Tp2 type; };
template<std::size_t _Int>
struct __pair_get;
template<>
struct __pair_get<0>
{
template<typename _Tp1, typename _Tp2>
static constexpr _Tp1&
__get(std::pair<_Tp1, _Tp2>& __pair) noexcept
{ return __pair.first; }
template<typename _Tp1, typename _Tp2>
static constexpr _Tp1&&
__move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept
{ return std::forward<_Tp1>(__pair.first); }
template<typename _Tp1, typename _Tp2>
static constexpr const _Tp1&
__const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept
{ return __pair.first; }
};
template<>
struct __pair_get<1>
{
template<typename _Tp1, typename _Tp2>
static constexpr _Tp2&
__get(std::pair<_Tp1, _Tp2>& __pair) noexcept
{ return __pair.second; }
template<typename _Tp1, typename _Tp2>
static constexpr _Tp2&&
__move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept
{ return std::forward<_Tp2>(__pair.second); }
template<typename _Tp1, typename _Tp2>
static constexpr const _Tp2&
__const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept
{ return __pair.second; }
};
template<std::size_t _Int, class _Tp1, class _Tp2>
constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&
get(std::pair<_Tp1, _Tp2>& __in) noexcept
{ return __pair_get<_Int>::__get(__in); }
template<std::size_t _Int, class _Tp1, class _Tp2>
constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&&
get(std::pair<_Tp1, _Tp2>&& __in) noexcept
{ return __pair_get<_Int>::__move_get(std::move(__in)); }
template<std::size_t _Int, class _Tp1, class _Tp2>
constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&
get(const std::pair<_Tp1, _Tp2>& __in) noexcept
{ return __pair_get<_Int>::__const_get(__in); }
template <typename _Tp, typename _Up>
constexpr _Tp&
get(pair<_Tp, _Up>& __p) noexcept
{ return __p.first; }
template <typename _Tp, typename _Up>
constexpr const _Tp&
get(const pair<_Tp, _Up>& __p) noexcept
{ return __p.first; }
template <typename _Tp, typename _Up>
constexpr _Tp&&
get(pair<_Tp, _Up>&& __p) noexcept
{ return std::move(__p.first); }
template <typename _Tp, typename _Up>
constexpr _Tp&
get(pair<_Up, _Tp>& __p) noexcept
{ return __p.second; }
template <typename _Tp, typename _Up>
constexpr const _Tp&
get(const pair<_Up, _Tp>& __p) noexcept
{ return __p.second; }
template <typename _Tp, typename _Up>
constexpr _Tp&&
get(pair<_Up, _Tp>&& __p) noexcept
{ return std::move(__p.second); }
template <typename _Tp, typename _Up = _Tp>
inline _Tp
exchange(_Tp& __obj, _Up&& __new_val)
{ return std::__exchange(__obj, std::forward<_Up>(__new_val)); }
template<size_t... _Indexes> struct _Index_tuple { };
template<typename _Itup1, typename _Itup2> struct _Itup_cat;
template<size_t... _Ind1, size_t... _Ind2>
struct _Itup_cat<_Index_tuple<_Ind1...>, _Index_tuple<_Ind2...>>
{
using __type = _Index_tuple<_Ind1..., (_Ind2 + sizeof...(_Ind1))...>;
};
template<size_t _Num>
struct _Build_index_tuple
: _Itup_cat<typename _Build_index_tuple<_Num / 2>::__type,
typename _Build_index_tuple<_Num - _Num / 2>::__type>
{ };
template<>
struct _Build_index_tuple<1>
{
typedef _Index_tuple<0> __type;
};
template<>
struct _Build_index_tuple<0>
{
typedef _Index_tuple<> __type;
};
template<typename _Tp, _Tp... _Idx>
struct integer_sequence
{
typedef _Tp value_type;
static constexpr size_t size() { return sizeof...(_Idx); }
};
template<typename _Tp, _Tp _Num,
typename _ISeq = typename _Build_index_tuple<_Num>::__type>
struct _Make_integer_sequence;
template<typename _Tp, _Tp _Num, size_t... _Idx>
struct _Make_integer_sequence<_Tp, _Num, _Index_tuple<_Idx...>>
{
static_assert( _Num >= 0,
"Cannot make integer sequence of negative length" );
typedef integer_sequence<_Tp, static_cast<_Tp>(_Idx)...> __type;
};
template<typename _Tp, _Tp _Num>
using make_integer_sequence
= typename _Make_integer_sequence<_Tp, _Num>::__type;
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... _Types>
using index_sequence_for = make_index_sequence<sizeof...(_Types)>;
}
# 36 "/usr/include/boost/hana/basic_tuple.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
# 52 "/usr/include/boost/hana/basic_tuple.hpp" 3 4
template <std::size_t n, typename Xn, bool =
::std::is_empty<Xn>::value && !::std::is_final<Xn>::value
>
struct elt;
template <std::size_t n, typename Xn>
struct elt<n, Xn, true> : Xn {
constexpr elt() = default;
template <typename Yn>
explicit constexpr elt(Yn&& yn)
: Xn(static_cast<Yn&&>(yn))
{ }
};
template <std::size_t n, typename Xn>
struct elt<n, Xn, false> {
constexpr elt() = default;
template <typename Yn>
explicit constexpr elt(Yn&& yn)
: data_(static_cast<Yn&&>(yn))
{ }
Xn data_;
};
}
template <std::size_t n, typename Xn>
constexpr Xn const& get_impl(detail::elt<n, Xn, true> const& xn)
{ return xn; }
template <std::size_t n, typename Xn>
constexpr Xn& get_impl(detail::elt<n, Xn, true>& xn)
{ return xn; }
template <std::size_t n, typename Xn>
constexpr Xn&& get_impl(detail::elt<n, Xn, true>&& xn)
{ return static_cast<Xn&&>(xn); }
template <std::size_t n, typename Xn>
constexpr Xn const& get_impl(detail::elt<n, Xn, false> const& xn)
{ return xn.data_; }
template <std::size_t n, typename Xn>
constexpr Xn& get_impl(detail::elt<n, Xn, false>& xn)
{ return xn.data_; }
template <std::size_t n, typename Xn>
constexpr Xn&& get_impl(detail::elt<n, Xn, false>&& xn)
{ return static_cast<Xn&&>(xn.data_); }
namespace detail {
struct from_other { };
template <typename Indices, typename ...Xn>
struct basic_tuple_impl;
template <std::size_t ...n, typename ...Xn>
struct basic_tuple_impl<std::index_sequence<n...>, Xn...>
: detail::elt<n, Xn>...
{
static constexpr std::size_t size_ = sizeof...(Xn);
constexpr basic_tuple_impl() = default;
template <typename Other>
explicit constexpr basic_tuple_impl(detail::from_other, Other&& other)
: detail::elt<n, Xn>(get_impl<n>(static_cast<Other&&>(other)))...
{ }
template <typename ...Yn>
explicit constexpr basic_tuple_impl(Yn&& ...yn)
: detail::elt<n, Xn>(static_cast<Yn&&>(yn))...
{ }
};
}
template <typename ...Xn>
struct basic_tuple final
: detail::basic_tuple_impl<std::make_index_sequence<sizeof...(Xn)>, Xn...>
{
using Base = detail::basic_tuple_impl<std::make_index_sequence<sizeof...(Xn)>, Xn...>;
constexpr basic_tuple() = default;
template <typename Other, typename = typename std::enable_if<
std::is_same<typename detail::decay<Other>::type, basic_tuple>::value
>::type>
constexpr basic_tuple(Other&& other)
: Base(detail::from_other{}, static_cast<Other&&>(other))
{ }
template <typename ...Yn>
explicit constexpr basic_tuple(Yn&& ...yn)
: Base(static_cast<Yn&&>(yn)...)
{ }
};
template <typename ...Xn>
struct tag_of<basic_tuple<Xn...>> {
using type = basic_tuple_tag;
};
template <>
struct unpack_impl<basic_tuple_tag> {
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr decltype(auto)
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...> const& xs, F&& f) {
return static_cast<F&&>(f)(
get_impl<i>(static_cast<detail::elt<i, Xn> const&>(xs))...
);
}
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr decltype(auto)
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...>& xs, F&& f) {
return static_cast<F&&>(f)(
get_impl<i>(static_cast<detail::elt<i, Xn>&>(xs))...
);
}
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr decltype(auto)
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...>&& xs, F&& f) {
return static_cast<F&&>(f)(
get_impl<i>(static_cast<detail::elt<i, Xn>&&>(xs))...
);
}
};
template <>
struct transform_impl<basic_tuple_tag> {
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr auto
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...> const& xs, F const& f) {
return hana::make_basic_tuple(
f(get_impl<i>(static_cast<detail::elt<i, Xn> const&>(xs)))...
);
}
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr auto
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...>& xs, F const& f) {
return hana::make_basic_tuple(
f(get_impl<i>(static_cast<detail::elt<i, Xn>&>(xs)))...
);
}
template <std::size_t ...i, typename ...Xn, typename F>
static constexpr auto
apply(detail::basic_tuple_impl<std::index_sequence<i...>, Xn...>&& xs, F const& f) {
return hana::make_basic_tuple(
f(get_impl<i>(static_cast<detail::elt<i, Xn>&&>(xs)))...
);
}
};
template <>
struct at_impl<basic_tuple_tag> {
template <typename Xs, typename N>
static constexpr decltype(auto) apply(Xs&& xs, N const&) {
constexpr std::size_t index = N::value;
return hana::get_impl<index>(static_cast<Xs&&>(xs));
}
};
template <>
struct drop_front_impl<basic_tuple_tag> {
template <std::size_t N, typename Xs, std::size_t ...i>
static constexpr auto drop_front_helper(Xs&& xs, std::index_sequence<i...>) {
return hana::make_basic_tuple(hana::get_impl<i+N>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t len = detail::decay<Xs>::type::size_;
return drop_front_helper<N::value>(static_cast<Xs&&>(xs), std::make_index_sequence<
N::value < len ? len - N::value : 0
>{});
}
};
template <>
struct is_empty_impl<basic_tuple_tag> {
template <typename ...Xs>
static constexpr auto apply(basic_tuple<Xs...> const&)
{ return hana::bool_c<sizeof...(Xs) == 0>; }
};
template <>
struct Sequence<basic_tuple_tag> {
static constexpr bool value = true;
};
template <>
struct make_impl<basic_tuple_tag> {
template <typename ...Xn>
static constexpr basic_tuple<typename detail::decay<Xn>::type...>
apply(Xn&& ...xn) {
return basic_tuple<typename detail::decay<Xn>::type...>{
static_cast<Xn&&>(xn)...
};
}
};
# 297 "/usr/include/boost/hana/basic_tuple.hpp" 3 4
}}
# 16 "/usr/include/boost/hana/pair.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/comparable.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/operators/comparable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/equal.hpp" 1 3 4
# 15 "/usr/include/boost/hana/fwd/equal.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/nested_to_fwd.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/nested_to_fwd.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
struct nested_to_t {
template <typename X>
constexpr decltype(auto) operator()(X&& x) const;
};
# 40 "/usr/include/boost/hana/detail/nested_to_fwd.hpp" 3 4
template <typename Algorithm>
struct nested_to { static constexpr nested_to_t<Algorithm> to{}; };
template <typename Algorithm>
constexpr nested_to_t<Algorithm> nested_to<Algorithm>::to;
} }}
# 16 "/usr/include/boost/hana/fwd/equal.hpp" 2 3 4
namespace boost { namespace hana {
# 68 "/usr/include/boost/hana/fwd/equal.hpp" 3 4
template <typename T, typename U, typename = void>
struct equal_impl : equal_impl<T, U, when<true>> { };
struct equal_t : detail::nested_to<equal_t> {
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) const;
};
constexpr equal_t equal{};
}}
# 16 "/usr/include/boost/hana/detail/operators/comparable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/not_equal.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/not_equal.hpp" 3 4
namespace boost { namespace hana {
# 58 "/usr/include/boost/hana/fwd/not_equal.hpp" 3 4
template <typename T, typename U, typename = void>
struct not_equal_impl : not_equal_impl<T, U, when<true>> { };
struct not_equal_t : detail::nested_to<not_equal_t> {
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) const;
};
constexpr not_equal_t not_equal{};
}}
# 17 "/usr/include/boost/hana/detail/operators/comparable.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename Tag>
struct comparable_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::comparable_operators<typename hana::tag_of<X>::type>::value ||
detail::comparable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator==(X&& x, Y&& y)
{ return hana::equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::comparable_operators<typename hana::tag_of<X>::type>::value ||
detail::comparable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator!=(X&& x, Y&& y)
{ return hana::not_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
}
} }}
# 21 "/usr/include/boost/hana/pair.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/orderable.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/operators/orderable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/greater.hpp" 1 3 4
# 15 "/usr/include/boost/hana/fwd/greater.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/nested_than_fwd.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/nested_than_fwd.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
struct nested_than_t {
template <typename X>
constexpr decltype(auto) operator()(X&& x) const;
};
# 40 "/usr/include/boost/hana/detail/nested_than_fwd.hpp" 3 4
template <typename Algorithm>
struct nested_than { static constexpr nested_than_t<Algorithm> than{}; };
template <typename Algorithm>
constexpr nested_than_t<Algorithm> nested_than<Algorithm>::than;
} }}
# 16 "/usr/include/boost/hana/fwd/greater.hpp" 2 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/fwd/greater.hpp" 3 4
template <typename T, typename U, typename = void>
struct greater_impl : greater_impl<T, U, when<true>> { };
struct greater_t : detail::nested_than<greater_t> {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr greater_t greater{};
}}
# 16 "/usr/include/boost/hana/detail/operators/orderable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/greater_equal.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/greater_equal.hpp" 3 4
namespace boost { namespace hana {
# 42 "/usr/include/boost/hana/fwd/greater_equal.hpp" 3 4
template <typename T, typename U, typename = void>
struct greater_equal_impl : greater_equal_impl<T, U, when<true>> { };
struct greater_equal_t : detail::nested_than<greater_equal_t> {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr greater_equal_t greater_equal{};
}}
# 17 "/usr/include/boost/hana/detail/operators/orderable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/less.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/less.hpp" 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/fwd/less.hpp" 3 4
template <typename T, typename U, typename = void>
struct less_impl : less_impl<T, U, when<true>> { };
struct less_t : detail::nested_than<less_t> {
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) const;
};
constexpr less_t less{};
}}
# 18 "/usr/include/boost/hana/detail/operators/orderable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/less_equal.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/less_equal.hpp" 3 4
namespace boost { namespace hana {
# 42 "/usr/include/boost/hana/fwd/less_equal.hpp" 3 4
template <typename T, typename U, typename = void>
struct less_equal_impl : less_equal_impl<T, U, when<true>> { };
struct less_equal_t : detail::nested_than<less_equal_t> {
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) const;
};
constexpr less_equal_t less_equal{};
}}
# 19 "/usr/include/boost/hana/detail/operators/orderable.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename Tag>
struct orderable_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator<(X&& x, Y&& y)
{ return hana::less(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator>(X&& x, Y&& y)
{ return hana::greater(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator<=(X&& x, Y&& y)
{ return hana::less_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator>=(X&& x, Y&& y)
{ return hana::greater_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
}
} }}
# 22 "/usr/include/boost/hana/pair.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/first.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/first.hpp" 3 4
namespace boost { namespace hana {
# 37 "/usr/include/boost/hana/fwd/first.hpp" 3 4
template <typename P, typename = void>
struct first_impl : first_impl<P, when<true>> { };
struct first_t {
template <typename Pair>
constexpr decltype(auto) operator()(Pair&& pair) const;
};
constexpr first_t first{};
}}
# 24 "/usr/include/boost/hana/pair.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/second.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/second.hpp" 3 4
namespace boost { namespace hana {
# 36 "/usr/include/boost/hana/fwd/second.hpp" 3 4
template <typename P, typename = void>
struct second_impl : second_impl<P, when<true>> { };
struct second_t {
template <typename Pair>
constexpr decltype(auto) operator()(Pair&& pair) const;
};
constexpr second_t second{};
}}
# 25 "/usr/include/boost/hana/pair.hpp" 2 3 4
namespace boost { namespace hana {
template <typename First, typename Second>
struct pair : detail::operators::adl<pair<First, Second>> {
template <typename ...dummy, typename = typename std::enable_if<
::std::is_constructible<First, dummy...>::value &&
::std::is_constructible<Second, dummy...>::value
>::type>
constexpr pair()
: storage_()
{ }
template <typename ...dummy, typename = typename std::enable_if<
::std::is_constructible<First, First const&, dummy...>::value &&
::std::is_constructible<Second, Second const&, dummy...>::value
>::type>
constexpr pair(First const& first, Second const& second)
: storage_{first, second}
{ }
template <typename T, typename U, typename = typename std::enable_if<
::std::is_convertible<T&&, First>::value &&
::std::is_convertible<U&&, Second>::value
>::type>
constexpr pair(T&& t, U&& u)
: storage_{static_cast<T&&>(t), static_cast<U&&>(u)}
{ }
template <typename T, typename U, typename = typename std::enable_if<
::std::is_convertible<T const&, First>::value &&
::std::is_convertible<U const&, Second>::value
>::type>
constexpr pair(pair<T, U> const& other)
: storage_{hana::get_impl<0>(other.storage_),
hana::get_impl<1>(other.storage_)}
{ }
template <typename T, typename U, typename = typename std::enable_if<
::std::is_convertible<T&&, First>::value &&
::std::is_convertible<U&&, Second>::value
>::type>
constexpr pair(pair<T, U>&& other)
: storage_{static_cast<T&&>(hana::get_impl<0>(other.storage_)),
static_cast<U&&>(hana::get_impl<1>(other.storage_))}
{ }
template <typename T, typename U, typename = typename std::enable_if<
::std::is_assignable<First&, T const&>::value &&
::std::is_assignable<Second&, U const&>::value
>::type>
constexpr pair& operator=(pair<T, U> const& other) {
hana::get_impl<0>(storage_) = hana::get_impl<0>(other.storage_);
hana::get_impl<1>(storage_) = hana::get_impl<1>(other.storage_);
return *this;
}
template <typename T, typename U, typename = typename std::enable_if<
::std::is_assignable<First&, T&&>::value &&
::std::is_assignable<Second&, U&&>::value
>::type>
constexpr pair& operator=(pair<T, U>&& other) {
hana::get_impl<0>(storage_) = static_cast<T&&>(hana::get_impl<0>(other.storage_));
hana::get_impl<1>(storage_) = static_cast<U&&>(hana::get_impl<1>(other.storage_));
return *this;
}
using hana_tag = pair_tag;
basic_tuple<First, Second> storage_;
};
namespace detail {
template <>
struct comparable_operators<pair_tag> {
static constexpr bool value = true;
};
template <>
struct orderable_operators<pair_tag> {
static constexpr bool value = true;
};
}
template <>
struct make_impl<pair_tag> {
template <typename F, typename S>
static constexpr pair<
typename detail::decay<F>::type,
typename detail::decay<S>::type
> apply(F&& f, S&& s) {
return {static_cast<F&&>(f), static_cast<S&&>(s)};
}
};
template <>
struct first_impl<pair_tag> {
template <typename P>
static constexpr decltype(auto) apply(P&& p)
{ return hana::get_impl<0>(static_cast<P&&>(p).storage_); }
};
template <>
struct second_impl<pair_tag> {
template <typename P>
static constexpr decltype(auto) apply(P&& p)
{ return hana::get_impl<1>(static_cast<P&&>(p).storage_); }
};
}}
# 28 "/usr/include/boost/hana/detail/struct_macros.hpp" 2 3 4
# 1 "/usr/include/boost/hana/string.hpp" 1 3 4
# 13 "/usr/include/boost/hana/string.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/string.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/string.hpp" 3 4
namespace boost { namespace hana {
# 132 "/usr/include/boost/hana/fwd/string.hpp" 3 4
template <char ...s>
struct string;
struct string_tag { };
# 162 "/usr/include/boost/hana/fwd/string.hpp" 3 4
constexpr auto make_string = make<string_tag>;
# 175 "/usr/include/boost/hana/fwd/string.hpp" 3 4
template <char ...s>
constexpr string<s...> string_c{};
# 238 "/usr/include/boost/hana/fwd/string.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/bool.hpp" 1 3 4
# 15 "/usr/include/boost/hana/bool.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/integral_constant.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/integral_constant.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/integral_constant.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/integral_constant.hpp" 3 4
namespace boost { namespace hana {
# 69 "/usr/include/boost/hana/fwd/concept/integral_constant.hpp" 3 4
template <typename C>
struct IntegralConstant;
}}
# 14 "/usr/include/boost/hana/concept/integral_constant.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
template <typename C, typename Tag = typename tag_of<C>::type>
struct integral_constant_dispatch {
static constexpr bool value = hana::IntegralConstant<Tag>::value;
};
template <typename C>
struct integral_constant_dispatch<C, C> {
static constexpr bool value = false;
};
}
template <typename C>
struct IntegralConstant
: detail::integral_constant_dispatch<C>
{ };
}}
# 16 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/to.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/to.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/to.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/to.hpp" 3 4
namespace boost { namespace hana {
# 101 "/usr/include/boost/hana/fwd/core/to.hpp" 3 4
template <typename To, typename From, typename = void>
struct to_impl;
template <typename To>
struct to_t {
template <typename X>
constexpr decltype(auto) operator()(X&& x) const;
};
template <typename To>
constexpr to_t<To> to{};
# 129 "/usr/include/boost/hana/fwd/core/to.hpp" 3 4
template <typename From, typename To, typename = void>
struct is_convertible;
# 151 "/usr/include/boost/hana/fwd/core/to.hpp" 3 4
template <bool = true>
struct embedding { };
# 169 "/usr/include/boost/hana/fwd/core/to.hpp" 3 4
template <typename From, typename To, typename = void>
struct is_embedded;
}}
# 14 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/constant.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/constant.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/constant.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/constant.hpp" 3 4
namespace boost { namespace hana {
# 206 "/usr/include/boost/hana/fwd/concept/constant.hpp" 3 4
template <typename C>
struct Constant;
}}
# 14 "/usr/include/boost/hana/concept/constant.hpp" 2 3 4
# 1 "/usr/include/boost/hana/value.hpp" 1 3 4
# 13 "/usr/include/boost/hana/value.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/value.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/value.hpp" 3 4
namespace boost { namespace hana {
# 58 "/usr/include/boost/hana/fwd/value.hpp" 3 4
template <typename C, typename = void>
struct value_impl : value_impl<C, when<true>> { };
template <typename T>
constexpr decltype(auto) value();
template <typename T>
constexpr decltype(auto) value(T const&)
{ return hana::value<T>(); }
# 90 "/usr/include/boost/hana/fwd/value.hpp" 3 4
struct value_of_t {
template <typename T>
constexpr decltype(auto) operator()(T const&) const
{ return hana::value<T>(); }
};
constexpr value_of_t value_of{};
}}
# 14 "/usr/include/boost/hana/value.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/constant.hpp" 1 3 4
# 16 "/usr/include/boost/hana/value.hpp" 2 3 4
namespace boost { namespace hana {
template <typename C, bool condition>
struct value_impl<C, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...args) = delete;
};
template <typename T>
constexpr decltype(auto) value() {
using RawT = typename std::remove_cv<
typename std::remove_reference<T>::type
>::type;
using C = typename hana::tag_of<RawT>::type;
using Value = ::std::conditional_t< (hana::Constant<C>::value), value_impl<C>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Constant<C>::value,
"hana::value<T>() requires 'T' to be a Constant");
return Value::template apply<RawT>();
}
template <typename I>
struct value_impl<I, when<hana::IntegralConstant<I>::value>> {
template <typename C>
static constexpr auto apply()
{ return C::value; }
};
}}
# 19 "/usr/include/boost/hana/concept/constant.hpp" 2 3 4
namespace boost { namespace hana {
template <typename C>
struct Constant {
using Tag = typename tag_of<C>::type;
static constexpr bool value = !is_default<value_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/foldable.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/foldable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/foldable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/foldable.hpp" 3 4
namespace boost { namespace hana {
# 137 "/usr/include/boost/hana/fwd/concept/foldable.hpp" 3 4
template <typename T>
struct Foldable;
}}
# 14 "/usr/include/boost/hana/concept/foldable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fold_left.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fold_left.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/fold_left.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/fold_left.hpp" 3 4
namespace boost { namespace hana {
# 73 "/usr/include/boost/hana/fwd/fold_left.hpp" 3 4
template <typename T, typename = void>
struct fold_left_impl : fold_left_impl<T, when<true>> { };
struct fold_left_t {
template <typename Xs, typename State, typename F>
constexpr decltype(auto) operator()(Xs&& xs, State&& state, F&& f) const;
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const;
};
constexpr fold_left_t fold_left{};
}}
# 14 "/usr/include/boost/hana/fold_left.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/foldable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fold_left.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/variadic/foldl1.hpp" 1 3 4
# 17 "/usr/include/boost/hana/detail/variadic/foldl1.hpp" 3 4
namespace boost { namespace hana { namespace detail { namespace variadic {
template <unsigned int n, typename = when<true>>
struct foldl1_impl;
template <>
struct foldl1_impl<1> {
template <typename F, typename X1>
static constexpr X1 apply(F&&, X1&& x1)
{ return static_cast<X1&&>(x1); }
};
template <>
struct foldl1_impl<2> {
template <typename F, typename X1, typename X2>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2) {
return static_cast<F&&>(f)(static_cast<X1&&>(x1),
static_cast<X2&&>(x2));
}
};
template <>
struct foldl1_impl<3> {
template <typename F, typename X1, typename X2, typename X3>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3) {
return f(f(static_cast<X1&&>(x1),
static_cast<X2&&>(x2)),
static_cast<X3&&>(x3));
}
};
template <>
struct foldl1_impl<4> {
template <typename F, typename X1, typename X2, typename X3, typename X4>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4) {
return f(f(f(static_cast<X1&&>(x1),
static_cast<X2&&>(x2)),
static_cast<X3&&>(x3)),
static_cast<X4&&>(x4));
}
};
template <>
struct foldl1_impl<5> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5) {
return f(f(f(f(static_cast<X1&&>(x1),
static_cast<X2&&>(x2)),
static_cast<X3&&>(x3)),
static_cast<X4&&>(x4)),
static_cast<X5&&>(x5));
}
};
template <>
struct foldl1_impl<6> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6) {
return f(f(f(f(f(static_cast<X1&&>(x1),
static_cast<X2&&>(x2)),
static_cast<X3&&>(x3)),
static_cast<X4&&>(x4)),
static_cast<X5&&>(x5)),
static_cast<X6&&>(x6));
}
};
template <unsigned int n>
struct foldl1_impl<n, when<(n >= 7) && (n < 14)>> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7, typename ...Xn>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, Xn&& ...xn)
{
return foldl1_impl<sizeof...(xn) + 1>::apply(
f,
f(f(f(f(f(f(static_cast<X1&&>(x1),
static_cast<X2&&>(x2)),
static_cast<X3&&>(x3)),
static_cast<X4&&>(x4)),
static_cast<X5&&>(x5)),
static_cast<X6&&>(x6)),
static_cast<X7&&>(x7)),
static_cast<Xn&&>(xn)...
);
}
};
template <unsigned int n>
struct foldl1_impl<n, when<(n >= 14) && (n < 28)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, Xn&& ...xn)
{
return foldl1_impl<sizeof...(xn) + 1>::apply(
f,
f(f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X1&&>(x1), static_cast<X2&&>(x2)), static_cast<X3&&>(x3)), static_cast<X4&&>(x4)), static_cast<X5&&>(x5)), static_cast<X6&&>(x6)), static_cast<X7&&>(x7)),
static_cast<X8&&>(x8)), static_cast<X9&&>(x9)), static_cast<X10&&>(x10)), static_cast<X11&&>(x11)), static_cast<X12&&>(x12)), static_cast<X13&&>(x13)), static_cast<X14&&>(x14))
, static_cast<Xn&&>(xn)...);
}
};
template <unsigned int n>
struct foldl1_impl<n, when<(n >= 28) && (n < 56)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename X15, typename X16, typename X17, typename X18, typename X19, typename X20, typename X21
, typename X22, typename X23, typename X24, typename X25, typename X26, typename X27, typename X28
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, X15&& x15, X16&& x16, X17&& x17, X18&& x18, X19&& x19, X20&& x20, X21&& x21
, X22&& x22, X23&& x23, X24&& x24, X25&& x25, X26&& x26, X27&& x27, X28&& x28
, Xn&& ...xn)
{
return foldl1_impl<sizeof...(xn) + 1>::apply(
f,
f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X1&&>(x1), static_cast<X2&&>(x2)), static_cast<X3&&>(x3)), static_cast<X4&&>(x4)), static_cast<X5&&>(x5)), static_cast<X6&&>(x6)), static_cast<X7&&>(x7)),
static_cast<X8&&>(x8)), static_cast<X9&&>(x9)), static_cast<X10&&>(x10)), static_cast<X11&&>(x11)), static_cast<X12&&>(x12)), static_cast<X13&&>(x13)), static_cast<X14&&>(x14)),
static_cast<X15&&>(x15)), static_cast<X16&&>(x16)), static_cast<X17&&>(x17)), static_cast<X18&&>(x18)), static_cast<X19&&>(x19)), static_cast<X20&&>(x20)), static_cast<X21&&>(x21)),
static_cast<X22&&>(x22)), static_cast<X23&&>(x23)), static_cast<X24&&>(x24)), static_cast<X25&&>(x25)), static_cast<X26&&>(x26)), static_cast<X27&&>(x27)), static_cast<X28&&>(x28))
, static_cast<Xn&&>(xn)...);
}
};
template <unsigned int n>
struct foldl1_impl<n, when<(n >= 56)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename X15, typename X16, typename X17, typename X18, typename X19, typename X20, typename X21
, typename X22, typename X23, typename X24, typename X25, typename X26, typename X27, typename X28
, typename X29, typename X30, typename X31, typename X32, typename X33, typename X34, typename X35
, typename X36, typename X37, typename X38, typename X39, typename X40, typename X41, typename X42
, typename X43, typename X44, typename X45, typename X46, typename X47, typename X48, typename X49
, typename X50, typename X51, typename X52, typename X53, typename X54, typename X55, typename X56
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, X15&& x15, X16&& x16, X17&& x17, X18&& x18, X19&& x19, X20&& x20, X21&& x21
, X22&& x22, X23&& x23, X24&& x24, X25&& x25, X26&& x26, X27&& x27, X28&& x28
, X29&& x29, X30&& x30, X31&& x31, X32&& x32, X33&& x33, X34&& x34, X35&& x35
, X36&& x36, X37&& x37, X38&& x38, X39&& x39, X40&& x40, X41&& x41, X42&& x42
, X43&& x43, X44&& x44, X45&& x45, X46&& x46, X47&& x47, X48&& x48, X49&& x49
, X50&& x50, X51&& x51, X52&& x52, X53&& x53, X54&& x54, X55&& x55, X56&& x56
, Xn&& ...xn)
{
return foldl1_impl<sizeof...(xn) + 1>::apply(
f,
f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X1&&>(x1), static_cast<X2&&>(x2)), static_cast<X3&&>(x3)), static_cast<X4&&>(x4)), static_cast<X5&&>(x5)), static_cast<X6&&>(x6)), static_cast<X7&&>(x7)),
static_cast<X8&&>(x8)), static_cast<X9&&>(x9)), static_cast<X10&&>(x10)), static_cast<X11&&>(x11)), static_cast<X12&&>(x12)), static_cast<X13&&>(x13)), static_cast<X14&&>(x14)),
static_cast<X15&&>(x15)), static_cast<X16&&>(x16)), static_cast<X17&&>(x17)), static_cast<X18&&>(x18)), static_cast<X19&&>(x19)), static_cast<X20&&>(x20)), static_cast<X21&&>(x21)),
static_cast<X22&&>(x22)), static_cast<X23&&>(x23)), static_cast<X24&&>(x24)), static_cast<X25&&>(x25)), static_cast<X26&&>(x26)), static_cast<X27&&>(x27)), static_cast<X28&&>(x28)),
static_cast<X29&&>(x29)), static_cast<X30&&>(x30)), static_cast<X31&&>(x31)), static_cast<X32&&>(x32)), static_cast<X33&&>(x33)), static_cast<X34&&>(x34)), static_cast<X35&&>(x35)),
static_cast<X36&&>(x36)), static_cast<X37&&>(x37)), static_cast<X38&&>(x38)), static_cast<X39&&>(x39)), static_cast<X40&&>(x40)), static_cast<X41&&>(x41)), static_cast<X42&&>(x42)),
static_cast<X43&&>(x43)), static_cast<X44&&>(x44)), static_cast<X45&&>(x45)), static_cast<X46&&>(x46)), static_cast<X47&&>(x47)), static_cast<X48&&>(x48)), static_cast<X49&&>(x49)),
static_cast<X50&&>(x50)), static_cast<X51&&>(x51)), static_cast<X52&&>(x52)), static_cast<X53&&>(x53)), static_cast<X54&&>(x54)), static_cast<X55&&>(x55)), static_cast<X56&&>(x56))
, static_cast<Xn&&>(xn)...);
}
};
struct foldl1_t {
template <typename F, typename X1, typename ...Xn>
constexpr decltype(auto) operator()(F&& f, X1&& x1, Xn&& ...xn) const {
return foldl1_impl<sizeof...(xn) + 1>::apply(
static_cast<F&&>(f), static_cast<X1&&>(x1), static_cast<Xn&&>(xn)...
);
}
};
constexpr foldl1_t foldl1{};
constexpr auto foldl = foldl1;
}} }}
# 19 "/usr/include/boost/hana/fold_left.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/partial.hpp" 1 3 4
# 21 "/usr/include/boost/hana/functional/partial.hpp" 3 4
namespace boost { namespace hana {
# 49 "/usr/include/boost/hana/functional/partial.hpp" 3 4
template <typename Indices, typename F, typename ...X>
struct partial_t;
struct make_partial_t {
struct secret { };
template <typename F, typename ...X>
constexpr partial_t<
std::make_index_sequence<sizeof...(X)>,
typename detail::decay<F>::type,
typename detail::decay<X>::type...
>
operator()(F&& f, X&& ...x) const {
return {secret{}, static_cast<F&&>(f), static_cast<X&&>(x)...};
}
};
template <std::size_t ...n, typename F, typename ...X>
struct partial_t<std::index_sequence<n...>, F, X...> {
partial_t() = default;
template <typename ...T>
constexpr partial_t(make_partial_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, X...> storage_;
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) const& {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)...,
static_cast<Y&&>(y)...
);
}
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) & {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)...,
static_cast<Y&&>(y)...
);
}
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) && {
return static_cast<F&&>(hana::get_impl<0>(storage_))(
static_cast<X&&>(hana::get_impl<n+1>(storage_))...,
static_cast<Y&&>(y)...
);
}
};
constexpr make_partial_t partial{};
}}
# 20 "/usr/include/boost/hana/fold_left.hpp" 2 3 4
# 1 "/usr/include/boost/hana/unpack.hpp" 1 3 4
# 16 "/usr/include/boost/hana/unpack.hpp" 3 4
# 1 "/usr/include/boost/hana/at.hpp" 1 3 4
# 16 "/usr/include/boost/hana/at.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/iterable.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/iterable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/iterable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/iterable.hpp" 3 4
namespace boost { namespace hana {
# 145 "/usr/include/boost/hana/fwd/concept/iterable.hpp" 3 4
template <typename It>
struct Iterable;
}}
# 14 "/usr/include/boost/hana/concept/iterable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/at.hpp" 1 3 4
# 17 "/usr/include/boost/hana/concept/iterable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/drop_front.hpp" 1 3 4
# 16 "/usr/include/boost/hana/drop_front.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/iterable.hpp" 1 3 4
# 17 "/usr/include/boost/hana/drop_front.hpp" 2 3 4
# 1 "/usr/include/boost/hana/integral_constant.hpp" 1 3 4
# 13 "/usr/include/boost/hana/integral_constant.hpp" 3 4
# 1 "/usr/include/boost/hana/bool.hpp" 1 3 4
# 14 "/usr/include/boost/hana/integral_constant.hpp" 2 3 4
# 21 "/usr/include/boost/hana/drop_front.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto drop_front_t::operator()(Xs&& xs, N const& n) const {
using It = typename hana::tag_of<Xs>::type;
using DropFront = ::std::conditional_t< (hana::Iterable<It>::value && hana::IntegralConstant<N>::value), drop_front_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::drop_front(xs, n) requires 'xs' to be an Iterable");
static_assert(hana::IntegralConstant<N>::value,
"hana::drop_front(xs, n) requires 'n' to be an IntegralConstant");
return DropFront::apply(static_cast<Xs&&>(xs), n);
}
template <typename Xs>
constexpr auto drop_front_t::operator()(Xs&& xs) const {
return (*this)(static_cast<Xs&&>(xs), hana::size_c<1>);
}
template <typename It, bool condition>
struct drop_front_impl<It, when<condition>> : default_ {
template <typename Xs, typename N>
static constexpr auto apply(Xs&&, N const&) = delete;
};
}}
# 20 "/usr/include/boost/hana/concept/iterable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/is_empty.hpp" 1 3 4
# 20 "/usr/include/boost/hana/is_empty.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto is_empty_t::operator()(Xs const& xs) const {
using It = typename hana::tag_of<Xs>::type;
using IsEmpty = ::std::conditional_t< (hana::Iterable<It>::value), is_empty_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::is_empty(xs) requires 'xs' to be an Iterable");
return IsEmpty::apply(xs);
}
template <typename It, bool condition>
struct is_empty_impl<It, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 21 "/usr/include/boost/hana/concept/iterable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename It>
struct Iterable {
using Tag = typename tag_of<It>::type;
static constexpr bool value = !is_default<at_impl<Tag>>::value &&
!is_default<drop_front_impl<Tag>>::value &&
!is_default<is_empty_impl<Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/at.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr decltype(auto) at_t::operator()(Xs&& xs, N const& n) const {
using It = typename hana::tag_of<Xs>::type;
using At = ::std::conditional_t< (hana::Iterable<It>::value), at_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::at(xs, n) requires 'xs' to be an Iterable");
static_assert(hana::IntegralConstant<N>::value,
"hana::at(xs, n) requires 'n' to be an IntegralConstant");
return At::apply(static_cast<Xs&&>(xs), n);
}
template <typename It, bool condition>
struct at_impl<It, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <std::size_t n, typename Xs>
constexpr decltype(auto) at_c(Xs&& xs) {
return hana::at(static_cast<Xs&&>(xs), hana::size_c<n>);
}
}}
# 17 "/usr/include/boost/hana/unpack.hpp" 2 3 4
# 1 "/usr/include/boost/hana/first.hpp" 1 3 4
# 15 "/usr/include/boost/hana/first.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/product.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/product.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/product.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/product.hpp" 3 4
namespace boost { namespace hana {
# 99 "/usr/include/boost/hana/fwd/concept/product.hpp" 3 4
template <typename P>
struct Product;
}}
# 14 "/usr/include/boost/hana/concept/product.hpp" 2 3 4
# 1 "/usr/include/boost/hana/first.hpp" 1 3 4
# 19 "/usr/include/boost/hana/concept/product.hpp" 2 3 4
# 1 "/usr/include/boost/hana/second.hpp" 1 3 4
# 15 "/usr/include/boost/hana/second.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/product.hpp" 1 3 4
# 16 "/usr/include/boost/hana/second.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Pair>
constexpr decltype(auto) second_t::operator()(Pair&& pair) const {
using P = typename hana::tag_of<Pair>::type;
using Second = ::std::conditional_t< (hana::Product<P>::value), second_impl<P>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Product<P>::value,
"hana::second(pair) requires 'pair' to be a Product");
return Second::apply(static_cast<Pair&&>(pair));
}
template <typename P, bool condition>
struct second_impl<P, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 20 "/usr/include/boost/hana/concept/product.hpp" 2 3 4
namespace boost { namespace hana {
template <typename P>
struct Product {
using Tag = typename tag_of<P>::type;
static constexpr bool value = !is_default<first_impl<Tag>>::value &&
!is_default<second_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/first.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Pair>
constexpr decltype(auto) first_t::operator()(Pair&& pair) const {
using P = typename hana::tag_of<Pair>::type;
using First = ::std::conditional_t< (hana::Product<P>::value), first_impl<P>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Product<P>::value,
"hana::first(pair) requires 'pair' to be a Product");
return First::apply(static_cast<Pair&&>(pair));
}
template <typename P, bool condition>
struct first_impl<P, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 23 "/usr/include/boost/hana/unpack.hpp" 2 3 4
# 1 "/usr/include/boost/hana/length.hpp" 1 3 4
# 13 "/usr/include/boost/hana/length.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/length.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/length.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/length.hpp" 3 4
template <typename T, typename = void>
struct length_impl : length_impl<T, when<true>> { };
struct length_t {
template <typename Xs>
constexpr auto operator()(Xs const& xs) const;
};
constexpr length_t length{};
}}
# 14 "/usr/include/boost/hana/length.hpp" 2 3 4
# 1 "/usr/include/boost/hana/unpack.hpp" 1 3 4
# 20 "/usr/include/boost/hana/length.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto length_t::operator()(Xs const& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Length = ::std::conditional_t< (hana::Foldable<S>::value), length_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::length(xs) requires 'xs' to be Foldable");
return Length::apply(xs);
}
namespace detail {
struct argn {
template <typename ...Xs>
constexpr auto operator()(Xs const& ...) const
{ return hana::size_c<sizeof...(Xs)>; }
};
}
template <typename T, bool condition>
struct length_impl<T, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs const& xs) {
return hana::unpack(xs, detail::argn{});
}
};
}}
# 26 "/usr/include/boost/hana/unpack.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr decltype(auto) unpack_t::operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using Unpack = ::std::conditional_t< (hana::Foldable<S>::value), unpack_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::unpack(xs, f) requires 'xs' to be Foldable");
return Unpack::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
template <typename T, bool condition>
struct unpack_impl<T, when<condition>> : default_ {
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
return hana::fold_left(static_cast<Xs&&>(xs),
static_cast<F&&>(f),
hana::partial)();
}
};
template <typename It>
struct unpack_impl<It, when<
hana::Iterable<It>::value && !is_default<length_impl<It>>::value
>> {
template <typename Xs, typename F, std::size_t ...i>
static constexpr decltype(auto)
unpack_helper(Xs&& xs, F&& f, std::index_sequence<i...>) {
return static_cast<F&&>(f)(hana::at_c<i>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
return unpack_helper(static_cast<Xs&&>(xs), static_cast<F&&>(f),
std::make_index_sequence<N>{});
}
};
template <typename T, std::size_t N>
struct unpack_impl<T[N]> {
template <typename Xs, typename F, std::size_t ...i>
static constexpr decltype(auto)
unpack_helper(Xs&& xs, F&& f, std::index_sequence<i...>) {
return static_cast<F&&>(f)(static_cast<Xs&&>(xs)[i]...);
}
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
return unpack_impl::unpack_helper(static_cast<Xs&&>(xs),
static_cast<F&&>(f),
std::make_index_sequence<N>{});
}
};
template <typename T>
struct unpack_impl<T, when<hana::Product<T>::value>> {
template <typename P, typename F>
static constexpr decltype(auto) apply(P&& p, F&& f) {
return static_cast<F&&>(f)(
hana::first(static_cast<P&&>(p)),
hana::second(static_cast<P&&>(p))
);
}
};
namespace struct_detail {
struct almost_demux {
template <typename F, typename Udt, typename ...Members>
constexpr decltype(auto)
operator()(F&& f, Udt&& udt, Members&& ...g) const {
return static_cast<F&&>(f)(hana::make_pair(
hana::first(static_cast<Members&&>(g)),
hana::second(static_cast<Members&&>(g))
(static_cast<Udt&&>(udt))
)...);
}
};
}
template <typename S>
struct unpack_impl<S, when<hana::Struct<S>::value>> {
template <typename Udt, typename F>
static constexpr decltype(auto) apply(Udt&& udt, F&& f) {
return hana::unpack(hana::accessors<S>(),
hana::partial(struct_detail::almost_demux{},
static_cast<F&&>(f),
static_cast<Udt&&>(udt)));
}
};
}}
# 21 "/usr/include/boost/hana/fold_left.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename State, typename F>
constexpr decltype(auto) fold_left_t::operator()(Xs&& xs, State&& state, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using FoldLeft = ::std::conditional_t< (hana::Foldable<S>::value), fold_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::fold_left(xs, state, f) requires 'xs' to be Foldable");
return FoldLeft::apply(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
template <typename Xs, typename F>
constexpr decltype(auto) fold_left_t::operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using FoldLeft = ::std::conditional_t< (hana::Foldable<S>::value), fold_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::fold_left(xs, f) requires 'xs' to be Foldable");
return FoldLeft::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
namespace detail {
template <typename F, typename State>
struct variadic_foldl1 {
F& f;
State& state;
template <typename ...T>
constexpr decltype(auto) operator()(T&& ...t) const {
return detail::variadic::foldl1(
static_cast<F&&>(f),
static_cast<State&&>(state),
static_cast<T&&>(t)...
);
}
};
}
template <typename T, bool condition>
struct fold_left_impl<T, when<condition>> : default_ {
template <typename Xs, typename S, typename F>
static constexpr decltype(auto) apply(Xs&& xs, S&& s, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs),
detail::variadic_foldl1<F, S>{f, s}
);
}
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs),
hana::partial(
detail::variadic::foldl1,
static_cast<F&&>(f)
)
);
}
};
}}
# 19 "/usr/include/boost/hana/concept/foldable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T>
struct Foldable {
using Tag = typename tag_of<T>::type;
static constexpr bool value = !is_default<fold_left_impl<Tag>>::value ||
!is_default<unpack_impl<Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/sequence.hpp" 1 3 4
# 20 "/usr/include/boost/hana/concept/sequence.hpp" 3 4
namespace boost { namespace hana {
namespace detail {
template <typename S, typename Tag = typename hana::tag_of<S>::type>
struct sequence_dispatch {
static constexpr bool value = hana::Sequence<Tag>::value;
};
template <typename S>
struct sequence_dispatch<S, S> {
static constexpr bool value = false;
};
}
template <typename S, bool condition>
struct Sequence<S, when<condition>>
: detail::sequence_dispatch<S>
{ };
}}
# 18 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/common.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/common.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/common.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/common.hpp" 3 4
namespace boost { namespace hana {
# 70 "/usr/include/boost/hana/fwd/core/common.hpp" 3 4
template <typename T, typename U, typename = void>
struct common;
# 88 "/usr/include/boost/hana/fwd/core/common.hpp" 3 4
template <typename T, typename U, typename = void>
struct has_common;
# 99 "/usr/include/boost/hana/fwd/core/common.hpp" 3 4
template <typename T, typename U>
using common_t = typename common<T, U>::type;
}}
# 14 "/usr/include/boost/hana/core/common.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/canonical_constant.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/canonical_constant.hpp" 3 4
namespace boost { namespace hana { namespace detail {
# 25 "/usr/include/boost/hana/detail/canonical_constant.hpp" 3 4
template <typename T>
struct CanonicalConstant {
using value_type = T;
};
} }}
# 1 "/usr/include/boost/hana/core/to.hpp" 1 3 4
# 35 "/usr/include/boost/hana/detail/canonical_constant.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T>
struct value_impl<detail::CanonicalConstant<T>> {
template <typename X>
static constexpr decltype(auto) apply()
{ return X::value; }
};
namespace detail {
template <typename T, typename X>
struct canonical_constant {
static constexpr auto value = hana::to<T>(hana::value<X>());
using hana_tag = detail::CanonicalConstant<T>;
};
}
template <typename T, typename C>
struct to_impl<detail::CanonicalConstant<T>, C, when<
hana::Constant<C>::value &&
is_convertible<typename C::value_type, T>::value
>>
: embedding<is_embedded<typename C::value_type, T>::value>
{
template <typename X>
static constexpr detail::canonical_constant<T, X> apply(X const&)
{ return {}; }
};
template <typename T>
struct IntegralConstant<detail::CanonicalConstant<T>> {
static constexpr bool value = std::is_integral<T>::value;
};
}}
# 19 "/usr/include/boost/hana/core/common.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/std_common_type.hpp" 1 3 4
# 19 "/usr/include/boost/hana/detail/std_common_type.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename T, typename U, typename = void>
struct std_common_type { };
template <typename T, typename U>
struct std_common_type<T, U, decltype((void)(
true ? std::declval<T>() : std::declval<U>()
))> {
using type = typename detail::decay<
decltype(true ? std::declval<T>() : std::declval<U>())
>::type;
};
} }}
# 20 "/usr/include/boost/hana/core/common.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/void_t.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/void_t.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename ...>
using void_t = void;
} }}
# 21 "/usr/include/boost/hana/core/common.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T, typename U, typename>
struct common : common<T, U, when<true>> { };
template <typename T, typename U, bool condition>
struct common<T, U, when<condition>>
: detail::std_common_type<T, U>
{ };
template <typename T>
struct common<T, T> {
using type = T;
};
template <typename T, typename U, typename>
struct has_common : std::false_type { };
template <typename T, typename U>
struct has_common<T, U, detail::void_t<typename common<T, U>::type>>
: std::true_type
{ };
namespace constant_detail {
template <typename A, typename B, typename C>
struct which {
using type = detail::CanonicalConstant<C>;
};
template <template <typename ...> class A, typename T, typename U, typename C>
struct which<A<T>, A<U>, C> {
using type = A<C>;
};
}
template <typename A, typename B>
struct common<A, B, when<
hana::Constant<A>::value &&
hana::Constant<B>::value &&
has_common<typename A::value_type, typename B::value_type>::value
>> {
using type = typename constant_detail::which<
A, B,
typename common<typename A::value_type,
typename B::value_type>::type
>::type;
};
template <typename A, typename B>
struct common<A, B, when<
hana::Constant<A>::value &&
!hana::Constant<B>::value &&
has_common<typename A::value_type, B>::value
>> {
using type = typename common<typename A::value_type, B>::type;
};
template <typename A, typename B>
struct common<A, B, when<
!hana::Constant<A>::value &&
hana::Constant<B>::value &&
has_common<A, typename B::value_type>::value
>> {
using type = typename common<A, typename B::value_type>::type;
};
}}
# 20 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core/make.hpp" 1 3 4
# 20 "/usr/include/boost/hana/core/make.hpp" 3 4
namespace boost { namespace hana {
template <typename Datatype, typename>
struct make_impl : make_impl<Datatype, when<true>> { };
template <typename Datatype, bool condition>
struct make_impl<Datatype, when<condition>> : default_ {
template <typename ...X>
static constexpr auto make_helper(int, X&& ...x)
-> decltype(Datatype(static_cast<X&&>(x)...))
{ return Datatype(static_cast<X&&>(x)...); }
template <typename ...X>
static constexpr auto make_helper(long, X&& ...) {
static_assert((sizeof...(X), false),
"there exists no constructor for the given data type");
}
template <typename ...X>
static constexpr decltype(auto) apply(X&& ...x)
{ return make_helper(int{}, static_cast<X&&>(x)...); }
};
}}
# 22 "/usr/include/boost/hana/core/to.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/wrong.hpp" 1 3 4
# 18 "/usr/include/boost/hana/detail/wrong.hpp" 3 4
namespace boost { namespace hana { namespace detail {
# 29 "/usr/include/boost/hana/detail/wrong.hpp" 3 4
template <typename ...>
struct wrong : std::false_type { };
} }}
# 23 "/usr/include/boost/hana/core/to.hpp" 2 3 4
namespace boost { namespace hana {
template <typename To, typename From, typename>
struct to_impl : to_impl<To, From, when<true>> { };
namespace convert_detail {
struct no_conversion { };
template <typename ...>
struct is_valid { static constexpr bool value = true; };
}
template <typename To, typename From, bool condition>
struct to_impl<To, From, when<condition>> : convert_detail::no_conversion {
template <typename X>
static constexpr auto apply(X const&) {
static_assert(detail::wrong<to_impl<To, From>, X>{},
"no conversion is available between the provided types");
}
};
template <typename To, typename From>
struct to_impl<To, From, when<convert_detail::is_valid<
decltype(static_cast<To>(std::declval<From>()))
>::value>> {
template <typename X>
static constexpr To apply(X&& x)
{ return static_cast<To>(static_cast<X&&>(x)); }
};
template <typename To>
struct to_impl<To, To> : embedding<> {
template <typename X>
static constexpr X apply(X&& x)
{ return static_cast<X&&>(x); }
};
template <typename To>
template <typename X>
constexpr decltype(auto) to_t<To>::operator()(X&& x) const {
using From = typename hana::tag_of<X>::type;
return to_impl<To, From>::apply(static_cast<X&&>(x));
}
template <> struct to_impl<long double, double> : embedding<> { static constexpr long double apply(double x) { return x; } };
template <> struct to_impl<long double, float> : embedding<> { static constexpr long double apply(float x) { return x; } };
template <> struct to_impl<double, float> : embedding<> { static constexpr double apply(float x) { return x; } };
template <> struct to_impl<signed long long, signed long> : embedding<> { static constexpr signed long long apply(signed long x) { return x; } };
template <> struct to_impl<signed long long, signed int> : embedding<> { static constexpr signed long long apply(signed int x) { return x; } };
template <> struct to_impl<signed long long, signed short> : embedding<> { static constexpr signed long long apply(signed short x) { return x; } };
template <> struct to_impl<signed long long, signed char> : embedding<> { static constexpr signed long long apply(signed char x) { return x; } };
template <> struct to_impl<signed long, signed int> : embedding<> { static constexpr signed long apply(signed int x) { return x; } };
template <> struct to_impl<signed long, signed short> : embedding<> { static constexpr signed long apply(signed short x) { return x; } };
template <> struct to_impl<signed long, signed char> : embedding<> { static constexpr signed long apply(signed char x) { return x; } };
template <> struct to_impl<signed int, signed short> : embedding<> { static constexpr signed int apply(signed short x) { return x; } };
template <> struct to_impl<signed int, signed char> : embedding<> { static constexpr signed int apply(signed char x) { return x; } };
template <> struct to_impl<signed short, signed char> : embedding<> { static constexpr signed short apply(signed char x) { return x; } };
template <> struct to_impl<unsigned long long, unsigned long> : embedding<> { static constexpr unsigned long long apply(unsigned long x) { return x; } };
template <> struct to_impl<unsigned long long, unsigned int> : embedding<> { static constexpr unsigned long long apply(unsigned int x) { return x; } };
template <> struct to_impl<unsigned long long, unsigned short> : embedding<> { static constexpr unsigned long long apply(unsigned short x) { return x; } };
template <> struct to_impl<unsigned long long, unsigned char> : embedding<> { static constexpr unsigned long long apply(unsigned char x) { return x; } };
template <> struct to_impl<unsigned long, unsigned int> : embedding<> { static constexpr unsigned long apply(unsigned int x) { return x; } };
template <> struct to_impl<unsigned long, unsigned short> : embedding<> { static constexpr unsigned long apply(unsigned short x) { return x; } };
template <> struct to_impl<unsigned long, unsigned char> : embedding<> { static constexpr unsigned long apply(unsigned char x) { return x; } };
template <> struct to_impl<unsigned int, unsigned short> : embedding<> { static constexpr unsigned int apply(unsigned short x) { return x; } };
template <> struct to_impl<unsigned int, unsigned char> : embedding<> { static constexpr unsigned int apply(unsigned char x) { return x; } };
template <> struct to_impl<unsigned short, unsigned char> : embedding<> { static constexpr unsigned short apply(unsigned char x) { return x; } };
namespace detail {
template <typename T>
struct copy_char_signedness {
using type = typename std::conditional<std::is_signed<char>::value,
std::make_signed<T>, std::make_unsigned<T>
>::type::type;
};
}
# 134 "/usr/include/boost/hana/core/to.hpp" 3 4
template <> struct to_impl<detail::copy_char_signedness<long long>::type, char> : embedding<> { static constexpr detail::copy_char_signedness<long long>::type apply(char x) { return x; } };
template <> struct to_impl<detail::copy_char_signedness<long>::type, char> : embedding<> { static constexpr detail::copy_char_signedness<long>::type apply(char x) { return x; } };
template <> struct to_impl<detail::copy_char_signedness<int>::type, char> : embedding<> { static constexpr detail::copy_char_signedness<int>::type apply(char x) { return x; } };
template <> struct to_impl<detail::copy_char_signedness<short>::type, char> : embedding<> { static constexpr detail::copy_char_signedness<short>::type apply(char x) { return x; } };
template <typename T>
struct to_impl<T*, decltype(nullptr)> : embedding<> {
static constexpr T* apply(decltype(nullptr)) { return nullptr; }
};
template <typename From, typename To, typename>
struct is_convertible : std::true_type { };
template <typename From, typename To>
struct is_convertible<From, To, decltype((void)
static_cast<convert_detail::no_conversion>(*(to_impl<To, From>*)0)
)> : std::false_type { };
template <typename From, typename To, typename>
struct is_embedded : std::false_type { };
template <typename From, typename To>
struct is_embedded<From, To, decltype((void)
static_cast<embedding<true>>(*(to_impl<To, From>*)0)
)> : std::true_type { };
template <typename To, typename From>
struct to_impl<To, From, when<
hana::Constant<From>::value &&
is_convertible<typename From::value_type, To>::value
>> : embedding<is_embedded<typename From::value_type, To>::value> {
template <typename X>
static constexpr decltype(auto) apply(X const&)
{ return hana::to<To>(hana::value<X>()); }
};
template <typename S, typename F>
struct to_impl<S, F, when<
hana::Sequence<S>::value &&
hana::Foldable<F>::value
>> : embedding<Sequence<F>::value> {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs)
{ return hana::unpack(static_cast<Xs&&>(xs), hana::make<S>); }
};
}}
# 18 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/div.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/div.hpp" 3 4
namespace boost { namespace hana {
# 47 "/usr/include/boost/hana/fwd/div.hpp" 3 4
template <typename T, typename U, typename = void>
struct div_impl : div_impl<T, U, when<true>> { };
struct div_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr div_t div{};
}}
# 16 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/minus.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/minus.hpp" 3 4
namespace boost { namespace hana {
# 55 "/usr/include/boost/hana/fwd/minus.hpp" 3 4
template <typename T, typename U, typename = void>
struct minus_impl : minus_impl<T, U, when<true>> { };
struct minus_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr minus_t minus{};
}}
# 17 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/mod.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/mod.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/mod.hpp" 3 4
template <typename T, typename U, typename = void>
struct mod_impl : mod_impl<T, U, when<true>> { };
struct mod_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr mod_t mod{};
}}
# 18 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/mult.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/mult.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/mult.hpp" 3 4
template <typename T, typename U, typename = void>
struct mult_impl : mult_impl<T, U, when<true>> { };
struct mult_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr mult_t mult{};
}}
# 19 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/negate.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/negate.hpp" 3 4
namespace boost { namespace hana {
# 30 "/usr/include/boost/hana/fwd/negate.hpp" 3 4
template <typename G, typename = void>
struct negate_impl : negate_impl<G, when<true>> { };
struct negate_t {
template <typename X>
constexpr decltype(auto) operator()(X&& x) const;
};
constexpr negate_t negate{};
}}
# 20 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/plus.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/plus.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/plus.hpp" 3 4
template <typename T, typename U, typename = void>
struct plus_impl : plus_impl<T, U, when<true>> { };
struct plus_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr plus_t plus{};
}}
# 21 "/usr/include/boost/hana/detail/operators/arithmetic.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename Tag>
struct arithmetic_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator+(X&& x, Y&& y)
{ return hana::plus(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator-(X&& x, Y&& y)
{ return hana::minus(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value
>::type>
constexpr auto operator-(X&& x)
{ return hana::negate(static_cast<X&&>(x)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator*(X&& x, Y&& y)
{ return hana::mult(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator/(X&& x, Y&& y)
{ return hana::div(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator%(X&& x, Y&& y)
{ return hana::mod(static_cast<X&&>(x), static_cast<Y&&>(y)); }
}
} }}
# 20 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/logical.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/operators/logical.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/and.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/and.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/and.hpp" 3 4
template <typename L, typename = void>
struct and_impl : and_impl<L, when<true>> { };
struct and_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
template <typename X, typename ...Y>
constexpr decltype(auto) operator()(X&& x, Y&& ...y) const;
};
constexpr and_t and_{};
}}
# 16 "/usr/include/boost/hana/detail/operators/logical.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/not.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/not.hpp" 3 4
namespace boost { namespace hana {
# 35 "/usr/include/boost/hana/fwd/not.hpp" 3 4
template <typename L, typename = void>
struct not_impl : not_impl<L, when<true>> { };
struct not_t {
template <typename X>
constexpr decltype(auto) operator()(X&& x) const;
};
constexpr not_t not_{};
}}
# 17 "/usr/include/boost/hana/detail/operators/logical.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/or.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/or.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/or.hpp" 3 4
template <typename L, typename = void>
struct or_impl : or_impl<L, when<true>> { };
struct or_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
template <typename X, typename ...Y>
constexpr decltype(auto) operator()(X&& x, Y&& ...y) const;
};
constexpr or_t or_{};
}}
# 18 "/usr/include/boost/hana/detail/operators/logical.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename Tag>
struct logical_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value ||
detail::logical_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator||(X&& x, Y&& y)
{ return hana::or_(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value ||
detail::logical_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator&&(X&& x, Y&& y)
{ return hana::and_(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value
>::type>
constexpr auto operator!(X&& x)
{ return hana::not_(static_cast<X&&>(x)); }
}
} }}
# 22 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/eval.hpp" 1 3 4
# 13 "/usr/include/boost/hana/eval.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/eval.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/eval.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/eval.hpp" 3 4
template <typename T, typename = void>
struct eval_impl : eval_impl<T, when<true>> { };
struct eval_t {
template <typename Expr>
constexpr decltype(auto) operator()(Expr&& expr) const;
};
constexpr eval_t eval{};
}}
# 14 "/usr/include/boost/hana/eval.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/id.hpp" 1 3 4
# 16 "/usr/include/boost/hana/functional/id.hpp" 3 4
namespace boost { namespace hana {
# 27 "/usr/include/boost/hana/functional/id.hpp" 3 4
struct id_t {
template <typename T>
constexpr T operator()(T&& t) const {
return static_cast<T&&>(t);
}
};
constexpr id_t id{};
}}
# 19 "/usr/include/boost/hana/eval.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Expr>
constexpr decltype(auto) eval_t::operator()(Expr&& expr) const {
return eval_impl<typename hana::tag_of<Expr>::type>::apply(
static_cast<Expr&&>(expr)
);
}
template <typename T, bool condition>
struct eval_impl<T, when<condition>> : default_ {
template <typename Expr>
static constexpr auto eval_helper(Expr&& expr, int)
-> decltype(static_cast<Expr&&>(expr)())
{ return static_cast<Expr&&>(expr)(); }
template <typename Expr>
static constexpr auto eval_helper(Expr&& expr, long)
-> decltype(static_cast<Expr&&>(expr)(hana::id))
{ return static_cast<Expr&&>(expr)(hana::id); }
template <typename Expr>
static constexpr auto eval_helper(Expr&&, ...) {
static_assert(detail::wrong<Expr>{},
"hana::eval(expr) requires the expression to be a hana::lazy, "
"a nullary Callable or a unary Callable that may be "
"called with hana::id");
}
template <typename Expr>
static constexpr decltype(auto) apply(Expr&& expr)
{ return eval_helper(static_cast<Expr&&>(expr), int{}); }
};
}}
# 24 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/eval_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/eval_if.hpp" 3 4
namespace boost { namespace hana {
# 143 "/usr/include/boost/hana/fwd/eval_if.hpp" 3 4
template <typename L, typename = void>
struct eval_if_impl : eval_if_impl<L, when<true>> { };
struct eval_if_t {
template <typename Cond, typename Then, typename Else>
constexpr decltype(auto) operator()(Cond&& cond, Then&& then, Else&& else_) const;
};
constexpr eval_if_t eval_if{};
}}
# 26 "/usr/include/boost/hana/bool.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/if.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/if.hpp" 3 4
template <typename L, typename = void>
struct if_impl : if_impl<L, when<true>> { };
struct if_t {
template <typename Cond, typename Then, typename Else>
constexpr decltype(auto) operator()(Cond&& cond, Then&& then, Else&& else_) const;
};
constexpr if_t if_{};
}}
# 27 "/usr/include/boost/hana/bool.hpp" 2 3 4
namespace boost { namespace hana {
namespace ic_detail {
template <typename T, T N, typename = std::make_integer_sequence<T, N>>
struct go;
template <typename T, T N, T ...i>
struct go<T, N, std::integer_sequence<T, i...>> {
using swallow = T[];
template <typename F>
static constexpr void with_index(F&& f)
{ (void)swallow{T{}, ((void)f(integral_constant<T, i>{}), i)...}; }
template <typename F>
static constexpr void without_index(F&& f)
{ (void)swallow{T{}, ((void)f(), i)...}; }
};
template <typename T, T v>
template <typename F>
constexpr void with_index_t<T, v>::operator()(F&& f) const
{ go<T, ((void)sizeof(&f), v)>::with_index(static_cast<F&&>(f)); }
template <typename T, T v>
template <typename F>
constexpr void times_t<T, v>::operator()(F&& f) const
{ go<T, ((void)sizeof(&f), v)>::without_index(static_cast<F&&>(f)); }
template <typename T, T v>
constexpr with_index_t<T, v> times_t<T, v>::with_index;
}
template <typename T, T v>
constexpr ic_detail::times_t<T, v> integral_constant<T, v>::times;
template <typename T, T v>
struct tag_of<integral_constant<T, v>> {
using type = integral_constant_tag<T>;
};
namespace detail {
template <typename T>
struct comparable_operators<integral_constant_tag<T>> {
static constexpr bool value = true;
};
template <typename T>
struct orderable_operators<integral_constant_tag<T>> {
static constexpr bool value = true;
};
template <typename T>
struct arithmetic_operators<integral_constant_tag<T>> {
static constexpr bool value = true;
};
template <typename T>
struct logical_operators<integral_constant_tag<T>> {
static constexpr bool value = true;
};
}
# 118 "/usr/include/boost/hana/bool.hpp" 3 4
template <typename U, U u> constexpr integral_constant<decltype(+ u), (+ u)> operator +(integral_constant<U, u>) { return {}; }
template <typename U, U u> constexpr integral_constant<decltype(~ u), (~ u)> operator ~(integral_constant<U, u>) { return {}; }
template <typename U, U u, typename V, V v> constexpr integral_constant<decltype(u & v), (u & v)> operator &(integral_constant<U, u>, integral_constant<V, v>) { return {}; }
template <typename U, U u, typename V, V v> constexpr integral_constant<decltype(u | v), (u | v)> operator |(integral_constant<U, u>, integral_constant<V, v>) { return {}; }
template <typename U, U u, typename V, V v> constexpr integral_constant<decltype(u ^ v), (u ^ v)> operator ^(integral_constant<U, u>, integral_constant<V, v>) { return {}; }
template <typename U, U u, typename V, V v> constexpr integral_constant<decltype(u << v), (u << v)> operator <<(integral_constant<U, u>, integral_constant<V, v>) { return {}; }
template <typename U, U u, typename V, V v> constexpr integral_constant<decltype(u >> v), (u >> v)> operator >>(integral_constant<U, u>, integral_constant<V, v>) { return {}; }
# 135 "/usr/include/boost/hana/bool.hpp" 3 4
namespace ic_detail {
constexpr int to_int(char c) {
int result = 0;
if (c >= 'A' && c <= 'F') {
result = static_cast<int>(c) - static_cast<int>('A') + 10;
}
else if (c >= 'a' && c <= 'f') {
result = static_cast<int>(c) - static_cast<int>('a') + 10;
}
else {
result = static_cast<int>(c) - static_cast<int>('0');
}
return result;
}
template<std::size_t N>
constexpr long long parse(const char (&arr)[N]) {
long long base = 10;
std::size_t offset = 0;
if (N > 2) {
bool starts_with_zero = arr[0] == '0';
bool is_hex = starts_with_zero && arr[1] == 'x';
bool is_binary = starts_with_zero && arr[1] == 'b';
if (is_hex) {
base = 16;
offset = 2;
}
else if (is_binary) {
base = 2;
offset = 2;
}
else if (starts_with_zero) {
base = 8;
offset = 1;
}
}
long long number = 0;
long long multiplier = 1;
for (std::size_t i = 0; i < N - offset; ++i) {
char c = arr[N - 1 - i];
number += to_int(c) * multiplier;
multiplier *= base;
}
return number;
}
}
namespace literals {
template <char ...c>
constexpr auto operator"" _c()
{ return llong_c<ic_detail::parse<sizeof...(c)>({c...})>; }
}
template <typename T>
struct IntegralConstant<integral_constant_tag<T>> {
static constexpr bool value = true;
};
template <typename T, typename C>
struct to_impl<integral_constant_tag<T>, C, when<hana::IntegralConstant<C>::value>>
: embedding<is_embedded<typename C::value_type, T>::value>
{
template <typename N>
static constexpr auto apply(N const&)
{ return integral_constant<T, N::value>{}; }
};
template <typename T>
struct eval_if_impl<integral_constant_tag<T>> {
template <typename Cond, typename Then, typename Else>
static constexpr decltype(auto)
apply(Cond const&, Then&& t, Else&& e) {
return eval_if_impl::apply(hana::bool_c<static_cast<bool>(Cond::value)>,
static_cast<Then&&>(t), static_cast<Else&&>(e));
}
template <typename Then, typename Else>
static constexpr decltype(auto)
apply(hana::true_ const&, Then&& t, Else&&)
{ return hana::eval(static_cast<Then&&>(t)); }
template <typename Then, typename Else>
static constexpr decltype(auto)
apply(hana::false_ const&, Then&&, Else&& e)
{ return hana::eval(static_cast<Else&&>(e)); }
};
template <typename T>
struct if_impl<integral_constant_tag<T>> {
template <typename Cond, typename Then, typename Else>
static constexpr decltype(auto)
apply(Cond const&, Then&& t, Else&& e) {
return if_impl::apply(hana::bool_c<static_cast<bool>(Cond::value)>,
static_cast<Then&&>(t), static_cast<Else&&>(e));
}
template <typename Then, typename Else>
static constexpr auto
apply(hana::true_ const&, Then&& t, Else&&)
{ return static_cast<Then&&>(t); }
template <typename Then, typename Else>
static constexpr auto
apply(hana::false_ const&, Then&&, Else&& e)
{ return static_cast<Else&&>(e); }
};
}}
# 16 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/algorithm.hpp" 1 3 4
# 13 "/usr/include/boost/hana/detail/algorithm.hpp" 3 4
# 1 "/usr/include/boost/hana/functional/placeholder.hpp" 1 3 4
# 15 "/usr/include/boost/hana/functional/placeholder.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/create.hpp" 1 3 4
# 17 "/usr/include/boost/hana/detail/create.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <template <typename ...> class T>
struct create {
template <typename ...X>
constexpr T<typename detail::decay<X>::type...>
operator()(X&& ...x) const {
return T<typename detail::decay<X>::type...>{
static_cast<X&&>(x)...
};
}
};
} }}
# 16 "/usr/include/boost/hana/functional/placeholder.hpp" 2 3 4
namespace boost { namespace hana {
# 72 "/usr/include/boost/hana/functional/placeholder.hpp" 3 4
namespace placeholder_detail {
template <typename I>
struct subscript {
I i;
template <typename Xs, typename ...Z>
constexpr auto operator()(Xs&& xs, Z const& ...) const&
-> decltype(static_cast<Xs&&>(xs)[i])
{ return static_cast<Xs&&>(xs)[i]; }
template <typename Xs, typename ...Z>
constexpr auto operator()(Xs&& xs, Z const& ...) &
-> decltype(static_cast<Xs&&>(xs)[i])
{ return static_cast<Xs&&>(xs)[i]; }
template <typename Xs, typename ...Z>
constexpr auto operator()(Xs&& xs, Z const& ...) &&
-> decltype(static_cast<Xs&&>(xs)[std::declval<I>()])
{ return static_cast<Xs&&>(xs)[std::move(i)]; }
};
template <typename F, typename Xs, std::size_t ...i>
constexpr decltype(auto) invoke_impl(F&& f, Xs&& xs, std::index_sequence<i...>) {
return static_cast<F&&>(f)(hana::get_impl<i>(static_cast<Xs&&>(xs).storage_)...);
}
template <typename ...X>
struct invoke;
struct placeholder {
struct secret { };
template <typename X>
constexpr decltype(auto) operator[](X&& x) const
{ return detail::create<subscript>{}(static_cast<X&&>(x)); }
template <typename ...X>
constexpr invoke<typename detail::decay<X>::type...>
operator()(X&& ...x) const {
return {secret{}, static_cast<X&&>(x)...};
}
};
template <typename ...X>
struct invoke {
template <typename ...Y>
constexpr invoke(placeholder::secret, Y&& ...y)
: storage_{static_cast<Y&&>(y)...}
{ }
basic_tuple<X...> storage_;
template <typename F, typename ...Z>
constexpr auto operator()(F&& f, Z const& ...) const& -> decltype(
static_cast<F&&>(f)(std::declval<X const&>()...)
) {
return invoke_impl(static_cast<F&&>(f), *this,
std::make_index_sequence<sizeof...(X)>{});
}
template <typename F, typename ...Z>
constexpr auto operator()(F&& f, Z const& ...) & -> decltype(
static_cast<F&&>(f)(std::declval<X&>()...)
) {
return invoke_impl(static_cast<F&&>(f), *this,
std::make_index_sequence<sizeof...(X)>{});
}
template <typename F, typename ...Z>
constexpr auto operator()(F&& f, Z const& ...) && -> decltype(
static_cast<F&&>(f)(std::declval<X&&>()...)
) {
return invoke_impl(static_cast<F&&>(f), static_cast<invoke&&>(*this),
std::make_index_sequence<sizeof...(X)>{});
}
};
# 221 "/usr/include/boost/hana/functional/placeholder.hpp" 3 4
struct unary_plus { template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const -> decltype(+ static_cast<X&&>(x)) { return + static_cast<X&&>(x); } }; inline constexpr decltype(auto) operator + (placeholder) { return unary_plus{}; }
struct unary_minus { template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const -> decltype(- static_cast<X&&>(x)) { return - static_cast<X&&>(x); } }; inline constexpr decltype(auto) operator - (placeholder) { return unary_minus{}; }
template <typename X> struct plus_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() + static_cast<Y&&>(y)) { return x + static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() + static_cast<Y&&>(y)) { return x + static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() + static_cast<Y&&>(y)) { return std::move(x) + static_cast<Y&&>(y); } }; template <typename Y> struct plus_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) + std::declval<Y const&>()) { return static_cast<X&&>(x) + y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) + std::declval<Y&>()) { return static_cast<X&&>(x) + y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) + std::declval<Y>()) { return static_cast<X&&>(x) + std::move(y); } }; struct plus { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) + static_cast<Y&&>(y)) { return static_cast<X&&>(x) + static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator + (X&& x, placeholder) { return detail::create<plus_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator + (placeholder, Y&& y) { return detail::create<plus_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator + (placeholder, placeholder) { return plus{}; }
template <typename X> struct minus_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() - static_cast<Y&&>(y)) { return x - static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() - static_cast<Y&&>(y)) { return x - static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() - static_cast<Y&&>(y)) { return std::move(x) - static_cast<Y&&>(y); } }; template <typename Y> struct minus_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) - std::declval<Y const&>()) { return static_cast<X&&>(x) - y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) - std::declval<Y&>()) { return static_cast<X&&>(x) - y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) - std::declval<Y>()) { return static_cast<X&&>(x) - std::move(y); } }; struct minus { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) - static_cast<Y&&>(y)) { return static_cast<X&&>(x) - static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator - (X&& x, placeholder) { return detail::create<minus_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator - (placeholder, Y&& y) { return detail::create<minus_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator - (placeholder, placeholder) { return minus{}; }
template <typename X> struct times_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() * static_cast<Y&&>(y)) { return x * static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() * static_cast<Y&&>(y)) { return x * static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() * static_cast<Y&&>(y)) { return std::move(x) * static_cast<Y&&>(y); } }; template <typename Y> struct times_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) * std::declval<Y const&>()) { return static_cast<X&&>(x) * y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) * std::declval<Y&>()) { return static_cast<X&&>(x) * y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) * std::declval<Y>()) { return static_cast<X&&>(x) * std::move(y); } }; struct times { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) * static_cast<Y&&>(y)) { return static_cast<X&&>(x) * static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator * (X&& x, placeholder) { return detail::create<times_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator * (placeholder, Y&& y) { return detail::create<times_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator * (placeholder, placeholder) { return times{}; }
template <typename X> struct divide_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() / static_cast<Y&&>(y)) { return x / static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() / static_cast<Y&&>(y)) { return x / static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() / static_cast<Y&&>(y)) { return std::move(x) / static_cast<Y&&>(y); } }; template <typename Y> struct divide_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) / std::declval<Y const&>()) { return static_cast<X&&>(x) / y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) / std::declval<Y&>()) { return static_cast<X&&>(x) / y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) / std::declval<Y>()) { return static_cast<X&&>(x) / std::move(y); } }; struct divide { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) / static_cast<Y&&>(y)) { return static_cast<X&&>(x) / static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator / (X&& x, placeholder) { return detail::create<divide_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator / (placeholder, Y&& y) { return detail::create<divide_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator / (placeholder, placeholder) { return divide{}; }
template <typename X> struct modulo_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() % static_cast<Y&&>(y)) { return x % static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() % static_cast<Y&&>(y)) { return x % static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() % static_cast<Y&&>(y)) { return std::move(x) % static_cast<Y&&>(y); } }; template <typename Y> struct modulo_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) % std::declval<Y const&>()) { return static_cast<X&&>(x) % y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) % std::declval<Y&>()) { return static_cast<X&&>(x) % y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) % std::declval<Y>()) { return static_cast<X&&>(x) % std::move(y); } }; struct modulo { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) % static_cast<Y&&>(y)) { return static_cast<X&&>(x) % static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator % (X&& x, placeholder) { return detail::create<modulo_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator % (placeholder, Y&& y) { return detail::create<modulo_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator % (placeholder, placeholder) { return modulo{}; }
struct bitwise_not { template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const -> decltype(~ static_cast<X&&>(x)) { return ~ static_cast<X&&>(x); } }; inline constexpr decltype(auto) operator ~ (placeholder) { return bitwise_not{}; }
template <typename X> struct bitwise_and_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() & static_cast<Y&&>(y)) { return x & static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() & static_cast<Y&&>(y)) { return x & static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() & static_cast<Y&&>(y)) { return std::move(x) & static_cast<Y&&>(y); } }; template <typename Y> struct bitwise_and_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) & std::declval<Y const&>()) { return static_cast<X&&>(x) & y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) & std::declval<Y&>()) { return static_cast<X&&>(x) & y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) & std::declval<Y>()) { return static_cast<X&&>(x) & std::move(y); } }; struct bitwise_and { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) & static_cast<Y&&>(y)) { return static_cast<X&&>(x) & static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator & (X&& x, placeholder) { return detail::create<bitwise_and_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator & (placeholder, Y&& y) { return detail::create<bitwise_and_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator & (placeholder, placeholder) { return bitwise_and{}; }
template <typename X> struct bitwise_or_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() | static_cast<Y&&>(y)) { return x | static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() | static_cast<Y&&>(y)) { return x | static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() | static_cast<Y&&>(y)) { return std::move(x) | static_cast<Y&&>(y); } }; template <typename Y> struct bitwise_or_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) | std::declval<Y const&>()) { return static_cast<X&&>(x) | y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) | std::declval<Y&>()) { return static_cast<X&&>(x) | y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) | std::declval<Y>()) { return static_cast<X&&>(x) | std::move(y); } }; struct bitwise_or { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) | static_cast<Y&&>(y)) { return static_cast<X&&>(x) | static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator | (X&& x, placeholder) { return detail::create<bitwise_or_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator | (placeholder, Y&& y) { return detail::create<bitwise_or_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator | (placeholder, placeholder) { return bitwise_or{}; }
template <typename X> struct bitwise_xor_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() ^ static_cast<Y&&>(y)) { return x ^ static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() ^ static_cast<Y&&>(y)) { return x ^ static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() ^ static_cast<Y&&>(y)) { return std::move(x) ^ static_cast<Y&&>(y); } }; template <typename Y> struct bitwise_xor_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) ^ std::declval<Y const&>()) { return static_cast<X&&>(x) ^ y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) ^ std::declval<Y&>()) { return static_cast<X&&>(x) ^ y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) ^ std::declval<Y>()) { return static_cast<X&&>(x) ^ std::move(y); } }; struct bitwise_xor { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) ^ static_cast<Y&&>(y)) { return static_cast<X&&>(x) ^ static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator ^ (X&& x, placeholder) { return detail::create<bitwise_xor_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator ^ (placeholder, Y&& y) { return detail::create<bitwise_xor_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator ^ (placeholder, placeholder) { return bitwise_xor{}; }
template <typename X> struct left_shift_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() << static_cast<Y&&>(y)) { return x << static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() << static_cast<Y&&>(y)) { return x << static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() << static_cast<Y&&>(y)) { return std::move(x) << static_cast<Y&&>(y); } }; template <typename Y> struct left_shift_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) << std::declval<Y const&>()) { return static_cast<X&&>(x) << y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) << std::declval<Y&>()) { return static_cast<X&&>(x) << y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) << std::declval<Y>()) { return static_cast<X&&>(x) << std::move(y); } }; struct left_shift { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) << static_cast<Y&&>(y)) { return static_cast<X&&>(x) << static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator << (X&& x, placeholder) { return detail::create<left_shift_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator << (placeholder, Y&& y) { return detail::create<left_shift_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator << (placeholder, placeholder) { return left_shift{}; }
template <typename X> struct right_shift_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() >> static_cast<Y&&>(y)) { return x >> static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() >> static_cast<Y&&>(y)) { return x >> static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() >> static_cast<Y&&>(y)) { return std::move(x) >> static_cast<Y&&>(y); } }; template <typename Y> struct right_shift_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) >> std::declval<Y const&>()) { return static_cast<X&&>(x) >> y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) >> std::declval<Y&>()) { return static_cast<X&&>(x) >> y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) >> std::declval<Y>()) { return static_cast<X&&>(x) >> std::move(y); } }; struct right_shift { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) >> static_cast<Y&&>(y)) { return static_cast<X&&>(x) >> static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator >> (X&& x, placeholder) { return detail::create<right_shift_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator >> (placeholder, Y&& y) { return detail::create<right_shift_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator >> (placeholder, placeholder) { return right_shift{}; }
template <typename X> struct equal_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() == static_cast<Y&&>(y)) { return x == static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() == static_cast<Y&&>(y)) { return x == static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() == static_cast<Y&&>(y)) { return std::move(x) == static_cast<Y&&>(y); } }; template <typename Y> struct equal_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) == std::declval<Y const&>()) { return static_cast<X&&>(x) == y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) == std::declval<Y&>()) { return static_cast<X&&>(x) == y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) == std::declval<Y>()) { return static_cast<X&&>(x) == std::move(y); } }; struct equal { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) == static_cast<Y&&>(y)) { return static_cast<X&&>(x) == static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator == (X&& x, placeholder) { return detail::create<equal_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator == (placeholder, Y&& y) { return detail::create<equal_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator == (placeholder, placeholder) { return equal{}; }
template <typename X> struct not_equal_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() != static_cast<Y&&>(y)) { return x != static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() != static_cast<Y&&>(y)) { return x != static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() != static_cast<Y&&>(y)) { return std::move(x) != static_cast<Y&&>(y); } }; template <typename Y> struct not_equal_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) != std::declval<Y const&>()) { return static_cast<X&&>(x) != y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) != std::declval<Y&>()) { return static_cast<X&&>(x) != y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) != std::declval<Y>()) { return static_cast<X&&>(x) != std::move(y); } }; struct not_equal { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) != static_cast<Y&&>(y)) { return static_cast<X&&>(x) != static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator != (X&& x, placeholder) { return detail::create<not_equal_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator != (placeholder, Y&& y) { return detail::create<not_equal_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator != (placeholder, placeholder) { return not_equal{}; }
template <typename X> struct less_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() < static_cast<Y&&>(y)) { return x < static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() < static_cast<Y&&>(y)) { return x < static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() < static_cast<Y&&>(y)) { return std::move(x) < static_cast<Y&&>(y); } }; template <typename Y> struct less_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) < std::declval<Y const&>()) { return static_cast<X&&>(x) < y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) < std::declval<Y&>()) { return static_cast<X&&>(x) < y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) < std::declval<Y>()) { return static_cast<X&&>(x) < std::move(y); } }; struct less { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) < static_cast<Y&&>(y)) { return static_cast<X&&>(x) < static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator < (X&& x, placeholder) { return detail::create<less_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator < (placeholder, Y&& y) { return detail::create<less_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator < (placeholder, placeholder) { return less{}; }
template <typename X> struct less_equal_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() <= static_cast<Y&&>(y)) { return x <= static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() <= static_cast<Y&&>(y)) { return x <= static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() <= static_cast<Y&&>(y)) { return std::move(x) <= static_cast<Y&&>(y); } }; template <typename Y> struct less_equal_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) <= std::declval<Y const&>()) { return static_cast<X&&>(x) <= y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) <= std::declval<Y&>()) { return static_cast<X&&>(x) <= y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) <= std::declval<Y>()) { return static_cast<X&&>(x) <= std::move(y); } }; struct less_equal { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) <= static_cast<Y&&>(y)) { return static_cast<X&&>(x) <= static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator <= (X&& x, placeholder) { return detail::create<less_equal_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator <= (placeholder, Y&& y) { return detail::create<less_equal_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator <= (placeholder, placeholder) { return less_equal{}; }
template <typename X> struct greater_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() > static_cast<Y&&>(y)) { return x > static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() > static_cast<Y&&>(y)) { return x > static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() > static_cast<Y&&>(y)) { return std::move(x) > static_cast<Y&&>(y); } }; template <typename Y> struct greater_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) > std::declval<Y const&>()) { return static_cast<X&&>(x) > y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) > std::declval<Y&>()) { return static_cast<X&&>(x) > y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) > std::declval<Y>()) { return static_cast<X&&>(x) > std::move(y); } }; struct greater { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) > static_cast<Y&&>(y)) { return static_cast<X&&>(x) > static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator > (X&& x, placeholder) { return detail::create<greater_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator > (placeholder, Y&& y) { return detail::create<greater_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator > (placeholder, placeholder) { return greater{}; }
template <typename X> struct greater_equal_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() >= static_cast<Y&&>(y)) { return x >= static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() >= static_cast<Y&&>(y)) { return x >= static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() >= static_cast<Y&&>(y)) { return std::move(x) >= static_cast<Y&&>(y); } }; template <typename Y> struct greater_equal_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) >= std::declval<Y const&>()) { return static_cast<X&&>(x) >= y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) >= std::declval<Y&>()) { return static_cast<X&&>(x) >= y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) >= std::declval<Y>()) { return static_cast<X&&>(x) >= std::move(y); } }; struct greater_equal { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) >= static_cast<Y&&>(y)) { return static_cast<X&&>(x) >= static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator >= (X&& x, placeholder) { return detail::create<greater_equal_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator >= (placeholder, Y&& y) { return detail::create<greater_equal_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator >= (placeholder, placeholder) { return greater_equal{}; }
template <typename X> struct logical_or_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() || static_cast<Y&&>(y)) { return x || static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() || static_cast<Y&&>(y)) { return x || static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() || static_cast<Y&&>(y)) { return std::move(x) || static_cast<Y&&>(y); } }; template <typename Y> struct logical_or_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) || std::declval<Y const&>()) { return static_cast<X&&>(x) || y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) || std::declval<Y&>()) { return static_cast<X&&>(x) || y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) || std::declval<Y>()) { return static_cast<X&&>(x) || std::move(y); } }; struct logical_or { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) || static_cast<Y&&>(y)) { return static_cast<X&&>(x) || static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator || (X&& x, placeholder) { return detail::create<logical_or_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator || (placeholder, Y&& y) { return detail::create<logical_or_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator || (placeholder, placeholder) { return logical_or{}; }
template <typename X> struct logical_and_left { X x; template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) const& -> decltype( std::declval<X const&>() && static_cast<Y&&>(y)) { return x && static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) & -> decltype( std::declval<X&>() && static_cast<Y&&>(y)) { return x && static_cast<Y&&>(y); } template <typename Y, typename ...Z> constexpr auto operator()(Y&& y, Z const& ...) && -> decltype( std::declval<X>() && static_cast<Y&&>(y)) { return std::move(x) && static_cast<Y&&>(y); } }; template <typename Y> struct logical_and_right { Y y; template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const& -> decltype( static_cast<X&&>(x) && std::declval<Y const&>()) { return static_cast<X&&>(x) && y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) & -> decltype( static_cast<X&&>(x) && std::declval<Y&>()) { return static_cast<X&&>(x) && y; } template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) && -> decltype( static_cast<X&&>(x) && std::declval<Y>()) { return static_cast<X&&>(x) && std::move(y); } }; struct logical_and { template <typename X, typename Y, typename ...Z> constexpr auto operator()(X&& x, Y&& y, Z const& ...) const -> decltype( static_cast<X&&>(x) && static_cast<Y&&>(y)) { return static_cast<X&&>(x) && static_cast<Y&&>(y); } }; template <typename X> constexpr decltype(auto) operator && (X&& x, placeholder) { return detail::create<logical_and_left>{}(static_cast<X&&>(x)); } template <typename Y> constexpr decltype(auto) operator && (placeholder, Y&& y) { return detail::create<logical_and_right>{}(static_cast<Y&&>(y)); } inline constexpr decltype(auto) operator && (placeholder, placeholder) { return logical_and{}; }
struct logical_not { template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const -> decltype(! static_cast<X&&>(x)) { return ! static_cast<X&&>(x); } }; inline constexpr decltype(auto) operator ! (placeholder) { return logical_not{}; }
struct dereference { template <typename X, typename ...Z> constexpr auto operator()(X&& x, Z const& ...) const -> decltype(* static_cast<X&&>(x)) { return * static_cast<X&&>(x); } }; inline constexpr decltype(auto) operator * (placeholder) { return dereference{}; }
}
constexpr placeholder_detail::placeholder _{};
}}
# 14 "/usr/include/boost/hana/detail/algorithm.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename T>
constexpr void constexpr_swap(T& x, T& y) {
auto tmp = x;
x = y;
y = std::move(tmp);
}
template <typename BidirIter>
constexpr void reverse(BidirIter first, BidirIter last) {
while (first != last) {
if (first == --last)
break;
detail::constexpr_swap(*first, *last);
++first;
}
}
template <typename BidirIter, typename BinaryPred>
constexpr bool next_permutation(BidirIter first, BidirIter last,
BinaryPred pred)
{
BidirIter i = last;
if (first == last || first == --i)
return false;
while (true) {
BidirIter ip1 = i;
if (pred(*--i, *ip1)) {
BidirIter j = last;
while (!pred(*i, *--j))
;
detail::constexpr_swap(*i, *j);
detail::reverse(ip1, last);
return true;
}
if (i == first) {
detail::reverse(first, last);
return false;
}
}
}
template <typename BidirIter>
constexpr bool next_permutation(BidirIter first, BidirIter last)
{ return detail::next_permutation(first, last, hana::_ < hana::_); }
template <typename InputIter1, typename InputIter2, typename BinaryPred>
constexpr bool lexicographical_compare(InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2,
BinaryPred pred)
{
for (; first2 != last2; ++first1, ++first2) {
if (first1 == last1 || pred(*first1, *first2))
return true;
else if (pred(*first2, *first1))
return false;
}
return false;
}
template <typename InputIter1, typename InputIter2>
constexpr bool lexicographical_compare(InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2)
{ return detail::lexicographical_compare(first1, last1, first2, last2, hana::_ < hana::_); }
template <typename InputIter1, typename InputIter2, typename BinaryPred>
constexpr bool equal(InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2,
BinaryPred pred)
{
for (; first1 != last1 && first2 != last2; ++first1, ++first2)
if (!pred(*first1, *first2))
return false;
return first1 == last1 && first2 == last2;
}
template <typename InputIter1, typename InputIter2>
constexpr bool equal(InputIter1 first1, InputIter1 last1,
InputIter2 first2, InputIter2 last2)
{ return detail::equal(first1, last1, first2, last2, hana::_ == hana::_); }
template <typename BidirIter, typename BinaryPred>
constexpr void sort(BidirIter first, BidirIter last, BinaryPred pred) {
if (first == last) return;
BidirIter i = first;
for (++i; i != last; ++i) {
BidirIter j = i;
auto t = *j;
for (BidirIter k = i; k != first && pred(t, *--k); --j)
*j = *k;
*j = t;
}
}
template <typename BidirIter>
constexpr void sort(BidirIter first, BidirIter last)
{ detail::sort(first, last, hana::_ < hana::_); }
template <typename InputIter, typename T>
constexpr InputIter find(InputIter first, InputIter last, T const& value) {
for (; first != last; ++first)
if (*first == value)
return first;
return last;
}
template <typename InputIter, typename UnaryPred>
constexpr InputIter find_if(InputIter first, InputIter last, UnaryPred pred) {
for (; first != last; ++first)
if (pred(*first))
return first;
return last;
}
template <typename ForwardIter, typename T>
constexpr void iota(ForwardIter first, ForwardIter last, T value) {
while (first != last) {
*first++ = value;
++value;
}
}
template <typename InputIt, typename T>
constexpr std::size_t
count(InputIt first, InputIt last, T const& value) {
std::size_t n = 0;
for (; first != last; ++first)
if (*first == value)
++n;
return n;
}
template <typename InputIt, typename T, typename F>
constexpr T accumulate(InputIt first, InputIt last, T init, F f) {
for (; first != last; ++first)
init = f(init, *first);
return init;
}
template <typename InputIt, typename T>
constexpr T accumulate(InputIt first, InputIt last, T init) {
return detail::accumulate(first, last, init, hana::_ + hana::_);
}
template <typename ForwardIt>
constexpr ForwardIt min_element(ForwardIt first, ForwardIt last) {
if (first == last)
return last;
ForwardIt smallest = first;
++first;
for (; first != last; ++first)
if (*first < *smallest)
smallest = first;
return smallest;
}
} }}
# 19 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/iterable.hpp" 1 3 4
# 17 "/usr/include/boost/hana/detail/operators/iterable.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Derived>
struct iterable_operators {
template <typename N>
constexpr decltype(auto) operator[](N&& n) & {
return hana::at(static_cast<Derived&>(*this),
static_cast<N&&>(n));
}
template <typename N>
constexpr decltype(auto) operator[](N&& n) const& {
return hana::at(static_cast<Derived const&>(*this),
static_cast<N&&>(n));
}
template <typename N>
constexpr decltype(auto) operator[](N&& n) && {
return hana::at(static_cast<Derived&&>(*this),
static_cast<N&&>(n));
}
};
} }}
# 22 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/contains.hpp" 1 3 4
# 15 "/usr/include/boost/hana/fwd/contains.hpp" 3 4
# 1 "/usr/include/boost/hana/functional/flip.hpp" 1 3 4
# 19 "/usr/include/boost/hana/functional/flip.hpp" 3 4
namespace boost { namespace hana {
# 37 "/usr/include/boost/hana/functional/flip.hpp" 3 4
template <typename F>
struct flip_t {
F f;
template <typename X, typename Y, typename ...Z>
constexpr decltype(auto) operator()(X&& x, Y&& y, Z&& ...z) const& {
return f(
static_cast<Y&&>(y),
static_cast<X&&>(x),
static_cast<Z&&>(z)...
);
}
template <typename X, typename Y, typename ...Z>
constexpr decltype(auto) operator()(X&& x, Y&& y, Z&& ...z) & {
return f(
static_cast<Y&&>(y),
static_cast<X&&>(x),
static_cast<Z&&>(z)...
);
}
template <typename X, typename Y, typename ...Z>
constexpr decltype(auto) operator()(X&& x, Y&& y, Z&& ...z) && {
return std::move(f)(
static_cast<Y&&>(y),
static_cast<X&&>(x),
static_cast<Z&&>(z)...
);
}
};
constexpr detail::create<flip_t> flip{};
}}
# 16 "/usr/include/boost/hana/fwd/contains.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/infix.hpp" 1 3 4
# 16 "/usr/include/boost/hana/functional/infix.hpp" 3 4
# 1 "/usr/include/boost/hana/functional/reverse_partial.hpp" 1 3 4
# 21 "/usr/include/boost/hana/functional/reverse_partial.hpp" 3 4
namespace boost { namespace hana {
# 48 "/usr/include/boost/hana/functional/reverse_partial.hpp" 3 4
template <typename Indices, typename F, typename ...X>
struct reverse_partial_t;
struct make_reverse_partial_t {
struct secret { };
template <typename F, typename ...X>
constexpr reverse_partial_t<
std::make_index_sequence<sizeof...(X)>,
typename detail::decay<F>::type,
typename detail::decay<X>::type...
> operator()(F&& f, X&& ...x) const {
return {secret{}, static_cast<F&&>(f), static_cast<X&&>(x)...};
}
};
template <std::size_t ...n, typename F, typename ...X>
struct reverse_partial_t<std::index_sequence<n...>, F, X...> {
reverse_partial_t() = default;
template <typename ...T>
constexpr reverse_partial_t(make_reverse_partial_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, X...> storage_;
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) const& {
return hana::get_impl<0>(storage_)(
static_cast<Y&&>(y)...,
hana::get_impl<n+1>(storage_)...
);
}
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) & {
return hana::get_impl<0>(storage_)(
static_cast<Y&&>(y)...,
hana::get_impl<n+1>(storage_)...
);
}
template <typename ...Y>
constexpr decltype(auto) operator()(Y&& ...y) && {
return static_cast<F&&>(hana::get_impl<0>(storage_))(
static_cast<Y&&>(y)...,
static_cast<X&&>(hana::get_impl<n+1>(storage_))...
);
}
};
constexpr make_reverse_partial_t reverse_partial{};
}}
# 17 "/usr/include/boost/hana/functional/infix.hpp" 2 3 4
namespace boost { namespace hana {
# 83 "/usr/include/boost/hana/functional/infix.hpp" 3 4
namespace infix_detail {
template <bool left, bool right, typename F>
struct infix_t {
F f;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const&
{ return f(static_cast<X&&>(x)...); }
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) &
{ return f(static_cast<X&&>(x)...); }
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) &&
{ return std::move(f)(static_cast<X&&>(x)...); }
};
template <bool left, bool right>
struct make_infix {
template <typename F>
constexpr infix_t<left, right, typename detail::decay<F>::type>
operator()(F&& f) const { return {static_cast<F&&>(f)}; }
};
template <bool left, bool right>
struct Infix;
struct Object;
template <typename T>
struct dispatch { using type = Object; };
template <bool left, bool right, typename F>
struct dispatch<infix_t<left, right, F>> {
using type = Infix<left, right>;
};
template <typename, typename>
struct bind_infix;
template <>
struct bind_infix<Infix<false, false>, Object> {
template <typename F, typename Y>
static constexpr decltype(auto) apply(F&& f, Y&& y) {
return make_infix<false, true>{}(
hana::reverse_partial(
static_cast<F&&>(f), static_cast<Y&&>(y)
)
);
}
};
template <>
struct bind_infix<Infix<true, false>, Object> {
template <typename F, typename Y>
static constexpr decltype(auto) apply(F&& f, Y&& y) {
return static_cast<F&&>(f)(static_cast<Y&&>(y));
}
};
template <>
struct bind_infix<Object, Infix<false, false>> {
template <typename X, typename F>
static constexpr decltype(auto) apply(X&& x, F&& f) {
return make_infix<true, false>{}(
hana::partial(static_cast<F&&>(f), static_cast<X&&>(x))
);
}
};
template <>
struct bind_infix<Object, Infix<false, true>> {
template <typename X, typename F>
static constexpr decltype(auto) apply(X&& x, F&& f) {
return static_cast<F&&>(f)(static_cast<X&&>(x));
}
};
template <typename T>
using strip = typename std::remove_cv<
typename std::remove_reference<T>::type
>::type;
template <typename X, typename Y>
constexpr decltype(auto) operator^(X&& x, Y&& y) {
return bind_infix<
typename dispatch<strip<X>>::type,
typename dispatch<strip<Y>>::type
>::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
}
constexpr infix_detail::make_infix<false, false> infix{};
}}
# 17 "/usr/include/boost/hana/fwd/contains.hpp" 2 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/contains.hpp" 3 4
template <typename S, typename = void>
struct contains_impl : contains_impl<S, when<true>> { };
struct contains_t {
template <typename Xs, typename Key>
constexpr auto operator()(Xs&& xs, Key&& key) const;
};
constexpr auto contains = hana::infix(contains_t{});
# 70 "/usr/include/boost/hana/fwd/contains.hpp" 3 4
constexpr auto in = hana::infix(hana::flip(hana::contains));
}}
# 25 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/find.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/find.hpp" 3 4
namespace boost { namespace hana {
# 48 "/usr/include/boost/hana/fwd/find.hpp" 3 4
template <typename S, typename = void>
struct find_impl : find_impl<S, when<true>> { };
struct find_t {
template <typename Xs, typename Key>
constexpr auto operator()(Xs&& xs, Key const& key) const;
};
constexpr find_t find{};
}}
# 30 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/front.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/front.hpp" 3 4
namespace boost { namespace hana {
# 36 "/usr/include/boost/hana/fwd/front.hpp" 3 4
template <typename It, typename = void>
struct front_impl : front_impl<It, when<true>> { };
struct front_t {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const;
};
constexpr front_t front{};
}}
# 31 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/hash.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/hash.hpp" 3 4
namespace boost { namespace hana {
# 56 "/usr/include/boost/hana/fwd/hash.hpp" 3 4
template <typename T, typename = void>
struct hash_impl : hash_impl<T, when<true>> { };
struct hash_t {
template <typename X>
constexpr auto operator()(X const& x) const;
};
constexpr hash_t hash{};
}}
# 32 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/if.hpp" 1 3 4
# 15 "/usr/include/boost/hana/if.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/logical.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/logical.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/logical.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/logical.hpp" 3 4
namespace boost { namespace hana {
# 162 "/usr/include/boost/hana/fwd/concept/logical.hpp" 3 4
template <typename L>
struct Logical;
}}
# 14 "/usr/include/boost/hana/concept/logical.hpp" 2 3 4
# 1 "/usr/include/boost/hana/eval_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/eval_if.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/logical.hpp" 1 3 4
# 18 "/usr/include/boost/hana/eval_if.hpp" 2 3 4
# 1 "/usr/include/boost/hana/if.hpp" 1 3 4
# 22 "/usr/include/boost/hana/eval_if.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Cond, typename Then, typename Else>
constexpr decltype(auto) eval_if_t::operator()(Cond&& cond, Then&& then, Else&& else_) const {
using Bool = typename hana::tag_of<Cond>::type;
using EvalIf = ::std::conditional_t< (hana::Logical<Bool>::value), eval_if_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::eval_if(cond, then, else) requires 'cond' to be a Logical");
return EvalIf::apply(static_cast<Cond&&>(cond),
static_cast<Then&&>(then),
static_cast<Else&&>(else_));
}
template <typename L, bool condition>
struct eval_if_impl<L, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename L>
struct eval_if_impl<L, when<std::is_arithmetic<L>::value>> {
template <typename Cond, typename T, typename E>
static constexpr auto apply(Cond const& cond, T&& t, E&& e) {
return cond ? hana::eval(static_cast<T&&>(t))
: hana::eval(static_cast<E&&>(e));
}
};
template <typename C>
struct eval_if_impl<C, when<
hana::Constant<C>::value &&
Logical<typename C::value_type>::value
>> {
template <typename Then, typename Else>
static constexpr decltype(auto)
eval_if_helper(hana::true_, Then&& t, Else&&)
{ return hana::eval(static_cast<Then&&>(t)); }
template <typename Then, typename Else>
static constexpr decltype(auto)
eval_if_helper(hana::false_, Then&&, Else&& e)
{ return hana::eval(static_cast<Else&&>(e)); }
template <typename Cond, typename Then, typename Else>
static constexpr decltype(auto) apply(Cond const&, Then&& t, Else&& e) {
constexpr auto cond = hana::value<Cond>();
constexpr bool truth_value = hana::if_(cond, true, false);
return eval_if_helper(hana::bool_c<truth_value>,
static_cast<Then&&>(t),
static_cast<Else&&>(e));
}
};
}}
# 19 "/usr/include/boost/hana/concept/logical.hpp" 2 3 4
# 1 "/usr/include/boost/hana/not.hpp" 1 3 4
# 25 "/usr/include/boost/hana/not.hpp" 3 4
namespace boost { namespace hana {
template <typename X>
constexpr decltype(auto) not_t::operator()(X&& x) const {
using Bool = typename hana::tag_of<X>::type;
using Not = ::std::conditional_t< (hana::Logical<Bool>::value), hana::not_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::not_(cond) requires 'cond' to be a Logical");
return Not::apply(static_cast<X&&>(x));
}
template <typename L, bool condition>
struct not_impl<L, when<condition>> : hana::default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename L>
struct not_impl<L, hana::when<std::is_arithmetic<L>::value>> {
template <typename Cond>
static constexpr Cond apply(Cond const& cond)
{ return static_cast<Cond>(cond ? false : true); }
};
namespace detail {
template <typename C, typename X>
struct constant_from_not {
static constexpr auto value = hana::not_(hana::value<X>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct not_impl<C, hana::when<
hana::Constant<C>::value &&
hana::Logical<typename C::value_type>::value
>> {
template <typename Cond>
static constexpr auto apply(Cond const&)
{ return hana::to<C>(detail::constant_from_not<C, Cond>{}); }
};
}}
# 20 "/usr/include/boost/hana/concept/logical.hpp" 2 3 4
# 1 "/usr/include/boost/hana/while.hpp" 1 3 4
# 13 "/usr/include/boost/hana/while.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/while.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/while.hpp" 3 4
namespace boost { namespace hana {
# 59 "/usr/include/boost/hana/fwd/while.hpp" 3 4
template <typename L, typename = void>
struct while_impl : while_impl<L, when<true>> { };
struct while_t {
template <typename Pred, typename State, typename F>
constexpr decltype(auto) operator()(Pred&& pred, State&& state, F&& f) const;
};
constexpr while_t while_{};
}}
# 14 "/usr/include/boost/hana/while.hpp" 2 3 4
# 27 "/usr/include/boost/hana/while.hpp" 3 4
namespace boost { namespace hana {
template <typename Pred, typename State, typename F>
constexpr decltype(auto) while_t::operator()(Pred&& pred, State&& state, F&& f) const {
using Cond = decltype(pred(state));
using Bool = typename hana::tag_of<Cond>::type;
using While = ::std::conditional_t< (hana::Logical<Bool>::value), while_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::while_(pred, state, f) requires 'pred(state)' to be a Logical");
return While::apply(static_cast<Pred&&>(pred),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
template <typename L, bool condition>
struct while_impl<L, hana::when<condition>> : hana::default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename L>
struct while_impl<L, hana::when<std::is_arithmetic<L>::value>> {
template <typename Pred, typename State, typename F>
static auto apply(Pred&& pred, State&& state, F&& f)
-> decltype(
true ? f(static_cast<State&&>(state))
: static_cast<State&&>(state)
)
{
if (pred(state)) {
decltype(auto) r = f(static_cast<State&&>(state));
return hana::while_(static_cast<Pred&&>(pred),
static_cast<decltype(r)&&>(r),
static_cast<F&&>(f));
}
else {
return static_cast<State&&>(state);
}
}
};
template <typename C>
struct while_impl<C, hana::when<
hana::Constant<C>::value &&
hana::Logical<typename C::value_type>::value
>> {
template <typename Pred, typename State, typename F>
static constexpr State
while_helper(hana::false_, Pred&&, State&& state, F&&) {
return static_cast<State&&>(state);
}
template <typename Pred, typename State, typename F>
static constexpr decltype(auto)
while_helper(hana::true_, Pred&& pred, State&& state, F&& f) {
decltype(auto) r = f(static_cast<State&&>(state));
return hana::while_(static_cast<Pred&&>(pred),
static_cast<decltype(r)&&>(r),
static_cast<F&&>(f));
}
template <typename Pred, typename State, typename F>
static constexpr decltype(auto)
apply(Pred&& pred, State&& state, F&& f) {
# 106 "/usr/include/boost/hana/while.hpp" 3 4
auto cond_ = pred(state);
constexpr auto cond = hana::value(cond_);
constexpr bool truth_value = hana::if_(cond, true, false);
return while_helper(hana::bool_c<truth_value>,
static_cast<Pred&&>(pred),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
};
}}
# 21 "/usr/include/boost/hana/concept/logical.hpp" 2 3 4
namespace boost { namespace hana {
template <typename L>
struct Logical {
using Tag = typename tag_of<L>::type;
static constexpr bool value = !is_default<eval_if_impl<Tag>>::value &&
!is_default<not_impl<Tag>>::value &&
!is_default<while_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/if.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Cond, typename Then, typename Else>
constexpr decltype(auto) if_t::operator()(Cond&& cond, Then&& then, Else&& else_) const {
using Bool = typename hana::tag_of<Cond>::type;
using If = ::std::conditional_t< (hana::Logical<Bool>::value), if_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::if_(cond, then, else) requires 'cond' to be a Logical");
return If::apply(static_cast<Cond&&>(cond),
static_cast<Then&&>(then),
static_cast<Else&&>(else_));
}
namespace detail {
template <typename T>
struct hold {
T value;
constexpr T&& operator()() && { return static_cast<T&&>(value); }
};
}
template <typename L, bool condition>
struct if_impl<L, when<condition>> : default_ {
template <typename C, typename T, typename E>
static constexpr auto apply(C&& c, T&& t, E&& e) {
return hana::eval_if(static_cast<C&&>(c),
detail::hold<T&&>{static_cast<T&&>(t)},
detail::hold<E&&>{static_cast<E&&>(e)}
);
}
};
}}
# 37 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/optional.hpp" 1 3 4
# 13 "/usr/include/boost/hana/optional.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/optional.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
namespace boost { namespace hana {
# 275 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
template <typename ...T>
struct optional;
struct optional_tag { };
# 308 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
constexpr auto make_optional = make<optional_tag>;
# 322 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
struct make_just_t {
template <typename T>
constexpr auto operator()(T&&) const;
};
constexpr make_just_t just{};
# 340 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
template <>
struct optional<> : detail::operators::adl<optional<>> {
constexpr optional() = default;
constexpr optional(optional const&) = default;
constexpr optional(optional&&) = default;
constexpr optional& operator=(optional const&) = default;
constexpr optional& operator=(optional&&) = default;
constexpr decltype(nullptr) operator->() const { return nullptr; }
template <typename ...dummy>
constexpr auto value() const;
template <typename ...dummy>
constexpr auto operator*() const;
template <typename U>
constexpr U&& value_or(U&& u) const;
};
constexpr optional<> nothing{};
# 401 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
struct maybe_t {
template <typename Def, typename F, typename T>
constexpr decltype(auto) operator()(Def&&, F&& f, optional<T> const& m) const
{ return static_cast<F&&>(f)(m.value_); }
template <typename Def, typename F, typename T>
constexpr decltype(auto) operator()(Def&&, F&& f, optional<T>& m) const
{ return static_cast<F&&>(f)(m.value_); }
template <typename Def, typename F, typename T>
constexpr decltype(auto) operator()(Def&&, F&& f, optional<T>&& m) const
{ return static_cast<F&&>(f)(static_cast<optional<T>&&>(m).value_); }
template <typename Def, typename F>
constexpr Def operator()(Def&& def, F&&, optional<> const&) const
{ return static_cast<Def&&>(def); }
};
constexpr maybe_t maybe{};
# 455 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
struct sfinae_t {
template <typename F>
constexpr decltype(auto) operator()(F&& f) const;
};
constexpr sfinae_t sfinae{};
# 478 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
struct is_just_t {
template <typename ...T>
constexpr auto operator()(optional<T...> const&) const;
};
constexpr is_just_t is_just{};
# 501 "/usr/include/boost/hana/fwd/optional.hpp" 3 4
struct is_nothing_t {
template <typename ...T>
constexpr auto operator()(optional<T...> const&) const;
};
constexpr is_nothing_t is_nothing{};
}}
# 14 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/monad.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/operators/monad.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/chain.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/chain.hpp" 3 4
namespace boost { namespace hana {
# 55 "/usr/include/boost/hana/fwd/chain.hpp" 3 4
template <typename M, typename = void>
struct chain_impl : chain_impl<M, when<true>> { };
struct chain_t {
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const;
};
constexpr chain_t chain{};
}}
# 16 "/usr/include/boost/hana/detail/operators/monad.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <typename Tag>
struct monad_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename Xs, typename F, typename = typename std::enable_if<
detail::monad_operators<typename hana::tag_of<Xs>::type>::value
>::type>
constexpr auto operator|(Xs&& xs, F&& f)
{ return hana::chain(static_cast<Xs&&>(xs), static_cast<F&&>(f)); }
}
} }}
# 22 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/any_of.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/any_of.hpp" 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/fwd/any_of.hpp" 3 4
template <typename S, typename = void>
struct any_of_impl : any_of_impl<S, when<true>> { };
struct any_of_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr any_of_t any_of{};
}}
# 26 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/ap.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/ap.hpp" 3 4
namespace boost { namespace hana {
# 67 "/usr/include/boost/hana/fwd/ap.hpp" 3 4
template <typename A, typename = void>
struct ap_impl : ap_impl<A, when<true>> { };
struct ap_t {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const;
template <typename F, typename ...Xs>
constexpr decltype(auto) operator()(F&& f, Xs&& ...xs) const;
};
constexpr ap_t ap{};
}}
# 27 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/concat.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/concat.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/concat.hpp" 3 4
template <typename M, typename = void>
struct concat_impl : concat_impl<M, when<true>> { };
struct concat_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr concat_t concat{};
}}
# 28 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/empty.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/empty.hpp" 3 4
namespace boost { namespace hana {
# 40 "/usr/include/boost/hana/fwd/empty.hpp" 3 4
template <typename M, typename = void>
struct empty_impl : empty_impl<M, when<true>> { };
template <typename M>
struct empty_t;
template <typename M>
constexpr empty_t<M> empty{};
}}
# 30 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/find_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/find_if.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/find_if.hpp" 3 4
template <typename S, typename = void>
struct find_if_impl : find_if_impl<S, when<true>> { };
struct find_if_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr find_if_t find_if{};
}}
# 32 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/flatten.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/flatten.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/flatten.hpp" 3 4
template <typename M, typename = void>
struct flatten_impl : flatten_impl<M, when<true>> { };
struct flatten_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr flatten_t flatten{};
}}
# 33 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/lift.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/lift.hpp" 3 4
namespace boost { namespace hana {
# 48 "/usr/include/boost/hana/fwd/lift.hpp" 3 4
template <typename A, typename = void>
struct lift_impl : lift_impl<A, when<true>> { };
template <typename A>
struct lift_t;
template <typename A>
constexpr lift_t<A> lift{};
}}
# 35 "/usr/include/boost/hana/optional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/type.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/type.hpp" 3 4
namespace boost { namespace hana {
template <typename T>
struct basic_type;
# 105 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <typename T>
struct type_impl;
template <typename T>
using type = typename type_impl<T>::_;
struct type_tag { };
template <typename T>
constexpr type<T> type_c{};
# 183 "/usr/include/boost/hana/fwd/type.hpp" 3 4
struct decltype_t {
template <typename T>
constexpr auto operator()(T&&) const;
};
constexpr decltype_t decltype_{};
# 226 "/usr/include/boost/hana/fwd/type.hpp" 3 4
struct typeid_t {
template <typename T>
constexpr auto operator()(T&&) const;
};
constexpr typeid_t typeid_{};
# 253 "/usr/include/boost/hana/fwd/type.hpp" 3 4
constexpr auto make_type = hana::make<type_tag>;
# 286 "/usr/include/boost/hana/fwd/type.hpp" 3 4
struct sizeof_t {
template <typename T>
constexpr auto operator()(T&&) const;
};
constexpr sizeof_t sizeof_{};
# 322 "/usr/include/boost/hana/fwd/type.hpp" 3 4
struct alignof_t {
template <typename T>
constexpr auto operator()(T&&) const;
};
constexpr alignof_t alignof_{};
# 366 "/usr/include/boost/hana/fwd/type.hpp" 3 4
struct is_valid_t {
template <typename F>
constexpr auto operator()(F&&) const;
template <typename F, typename ...Args>
constexpr auto operator()(F&&, Args&&...) const;
};
constexpr is_valid_t is_valid{};
# 403 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <template <typename ...> class F>
struct template_t;
template <template <typename ...> class F>
constexpr template_t<F> template_{};
# 430 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <template <typename ...> class f>
struct metafunction_t;
template <template <typename ...> class f>
constexpr metafunction_t<f> metafunction{};
# 457 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <typename F>
struct metafunction_class_t
: metafunction_t<F::template apply>
{ };
template <typename F>
constexpr metafunction_class_t<F> metafunction_class{};
# 503 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <typename F>
struct integral_t;
struct make_integral_t {
template <typename F>
constexpr integral_t<F> operator()(F const&) const
{ return {}; }
};
constexpr make_integral_t integral{};
# 522 "/usr/include/boost/hana/fwd/type.hpp" 3 4
template <template <typename ...> class F>
constexpr auto trait = hana::integral(hana::metafunction<F>);
}}
# 37 "/usr/include/boost/hana/optional.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
template <typename T, typename = typename hana::tag_of<T>::type>
struct nested_type { };
template <typename T>
struct nested_type<T, type_tag> { using type = typename T::type; };
}
template <typename T>
struct optional<T> : detail::operators::adl<>, detail::nested_type<T> {
constexpr optional() = default;
constexpr optional(optional const&) = default;
constexpr optional(optional&&) = default;
constexpr optional(T const& t)
: value_(t)
{ }
constexpr optional(T&& t)
: value_(static_cast<T&&>(t))
{ }
constexpr optional& operator=(optional const&) = default;
constexpr optional& operator=(optional&&) = default;
constexpr T const* operator->() const { return &value_; }
constexpr T* operator->() { return &value_; }
constexpr T& value() & { return value_; }
constexpr T const& value() const& { return value_; }
constexpr T&& value() && { return static_cast<T&&>(value_); }
constexpr T const&& value() const&& { return static_cast<T const&&>(value_); }
constexpr T& operator*() & { return value_; }
constexpr T const& operator*() const& { return value_; }
constexpr T&& operator*() && { return static_cast<T&&>(value_); }
constexpr T const&& operator*() const&& { return static_cast<T const&&>(value_); }
template <typename U> constexpr T& value_or(U&&) & { return value_; }
template <typename U> constexpr T const& value_or(U&&) const& { return value_; }
template <typename U> constexpr T&& value_or(U&&) && { return static_cast<T&&>(value_); }
template <typename U> constexpr T const&& value_or(U&&) const&& { return static_cast<T const&&>(value_); }
T value_;
};
template <typename ...dummy>
constexpr auto optional<>::value() const {
static_assert(detail::wrong<dummy...>{},
"hana::optional::value() requires a non-empty optional");
}
template <typename ...dummy>
constexpr auto optional<>::operator*() const {
static_assert(detail::wrong<dummy...>{},
"hana::optional::operator* requires a non-empty optional");
}
template <typename U>
constexpr U&& optional<>::value_or(U&& u) const {
return static_cast<U&&>(u);
}
template <typename T>
constexpr auto make_just_t::operator()(T&& t) const {
return hana::optional<typename detail::decay<T>::type>(static_cast<T&&>(t));
}
template <typename ...T>
struct tag_of<optional<T...>> {
using type = optional_tag;
};
template <>
struct make_impl<optional_tag> {
template <typename X>
static constexpr auto apply(X&& x)
{ return hana::just(static_cast<X&&>(x)); }
static constexpr auto apply()
{ return hana::nothing; }
};
namespace detail {
template <>
struct comparable_operators<optional_tag> {
static constexpr bool value = true;
};
template <>
struct orderable_operators<optional_tag> {
static constexpr bool value = true;
};
template <>
struct monad_operators<optional_tag> {
static constexpr bool value = true;
};
}
template <typename ...T>
constexpr auto is_just_t::operator()(optional<T...> const&) const
{ return hana::bool_c<sizeof...(T) != 0>; }
template <typename ...T>
constexpr auto is_nothing_t::operator()(optional<T...> const&) const
{ return hana::bool_c<sizeof...(T) == 0>; }
namespace detail {
struct sfinae_impl {
template <typename F, typename ...X, typename = decltype(
std::declval<F>()(std::declval<X>()...)
)>
constexpr decltype(auto) operator()(int, F&& f, X&& ...x) const {
using Return = decltype(static_cast<F&&>(f)(static_cast<X&&>(x)...));
static_assert(!std::is_same<Return, void>::value,
"hana::sfinae(f)(args...) requires f(args...) to be non-void");
return hana::just(static_cast<F&&>(f)(static_cast<X&&>(x)...));
}
template <typename F, typename ...X>
constexpr auto operator()(long, F&&, X&& ...) const
{ return hana::nothing; }
};
}
template <typename F>
constexpr decltype(auto) sfinae_t::operator()(F&& f) const {
return hana::partial(detail::sfinae_impl{}, int{},
static_cast<F&&>(f));
}
template <>
struct equal_impl<optional_tag, optional_tag> {
template <typename T, typename U>
static constexpr auto apply(hana::optional<T> const& t, hana::optional<U> const& u)
{ return hana::equal(t.value_, u.value_); }
static constexpr hana::true_ apply(hana::optional<> const&, hana::optional<> const&)
{ return {}; }
template <typename T, typename U>
static constexpr hana::false_ apply(T const&, U const&)
{ return {}; }
};
template <>
struct less_impl<optional_tag, optional_tag> {
template <typename T>
static constexpr hana::true_ apply(hana::optional<> const&, hana::optional<T> const&)
{ return {}; }
static constexpr hana::false_ apply(hana::optional<> const&, hana::optional<> const&)
{ return {}; }
template <typename T>
static constexpr hana::false_ apply(hana::optional<T> const&, hana::optional<> const&)
{ return {}; }
template <typename T, typename U>
static constexpr auto apply(hana::optional<T> const& x, hana::optional<U> const& y)
{ return hana::less(x.value_, y.value_); }
};
template <>
struct transform_impl<optional_tag> {
template <typename F>
static constexpr auto apply(optional<> const&, F&&)
{ return hana::nothing; }
template <typename T, typename F>
static constexpr auto apply(optional<T> const& opt, F&& f)
{ return hana::just(static_cast<F&&>(f)(opt.value_)); }
template <typename T, typename F>
static constexpr auto apply(optional<T>& opt, F&& f)
{ return hana::just(static_cast<F&&>(f)(opt.value_)); }
template <typename T, typename F>
static constexpr auto apply(optional<T>&& opt, F&& f)
{ return hana::just(static_cast<F&&>(f)(static_cast<T&&>(opt.value_))); }
};
template <>
struct lift_impl<optional_tag> {
template <typename X>
static constexpr auto apply(X&& x)
{ return hana::just(static_cast<X&&>(x)); }
};
template <>
struct ap_impl<optional_tag> {
template <typename F, typename X>
static constexpr auto ap_helper(F&&, X&&, ...)
{ return hana::nothing; }
template <typename F, typename X>
static constexpr auto ap_helper(F&& f, X&& x, hana::true_, hana::true_)
{ return hana::just(static_cast<F&&>(f).value_(static_cast<X&&>(x).value_)); }
template <typename F, typename X>
static constexpr auto apply(F&& f, X&& x) {
return ap_impl::ap_helper(static_cast<F&&>(f), static_cast<X&&>(x),
hana::is_just(f), hana::is_just(x));
}
};
template <>
struct flatten_impl<optional_tag> {
static constexpr auto apply(optional<> const&)
{ return hana::nothing; }
static constexpr auto apply(optional<optional<>> const&)
{ return hana::nothing; }
template <typename T>
static constexpr auto apply(optional<optional<T>> const& opt)
{ return hana::just(opt.value_.value_); }
template <typename T>
static constexpr auto apply(optional<optional<T>>&& opt)
{ return hana::just(static_cast<T&&>(opt.value_.value_)); }
};
template <>
struct concat_impl<optional_tag> {
template <typename Y>
static constexpr auto apply(hana::optional<>&, Y&& y)
{ return static_cast<Y&&>(y); }
template <typename Y>
static constexpr auto apply(hana::optional<>&&, Y&& y)
{ return static_cast<Y&&>(y); }
template <typename Y>
static constexpr auto apply(hana::optional<> const&, Y&& y)
{ return static_cast<Y&&>(y); }
template <typename X, typename Y>
static constexpr auto apply(X&& x, Y&&)
{ return static_cast<X&&>(x); }
};
template <>
struct empty_impl<optional_tag> {
static constexpr auto apply()
{ return hana::nothing; }
};
template <>
struct unpack_impl<optional_tag> {
template <typename T, typename F>
static constexpr decltype(auto) apply(optional<T>&& opt, F&& f)
{ return static_cast<F&&>(f)(static_cast<T&&>(opt.value_)); }
template <typename T, typename F>
static constexpr decltype(auto) apply(optional<T> const& opt, F&& f)
{ return static_cast<F&&>(f)(opt.value_); }
template <typename T, typename F>
static constexpr decltype(auto) apply(optional<T>& opt, F&& f)
{ return static_cast<F&&>(f)(opt.value_); }
template <typename F>
static constexpr decltype(auto) apply(optional<> const&, F&& f)
{ return static_cast<F&&>(f)(); }
};
namespace detail {
template <bool>
struct optional_find_if {
template <typename T>
static constexpr auto apply(T const&)
{ return hana::nothing; }
};
template <>
struct optional_find_if<true> {
template <typename T>
static constexpr auto apply(T&& t)
{ return hana::just(static_cast<T&&>(t)); }
};
}
template <>
struct find_if_impl<optional_tag> {
template <typename T, typename Pred>
static constexpr auto apply(hana::optional<T> const& opt, Pred&& pred) {
constexpr bool found = decltype(static_cast<Pred&&>(pred)(opt.value_))::value;
return detail::optional_find_if<found>::apply(opt.value_);
}
template <typename T, typename Pred>
static constexpr auto apply(hana::optional<T>& opt, Pred&& pred) {
constexpr bool found = decltype(static_cast<Pred&&>(pred)(opt.value_))::value;
return detail::optional_find_if<found>::apply(opt.value_);
}
template <typename T, typename Pred>
static constexpr auto apply(hana::optional<T>&& opt, Pred&& pred) {
constexpr bool found = decltype(
static_cast<Pred&&>(pred)(static_cast<T&&>(opt.value_))
)::value;
return detail::optional_find_if<found>::apply(static_cast<T&&>(opt.value_));
}
template <typename Pred>
static constexpr auto apply(hana::optional<> const&, Pred&&)
{ return hana::nothing; }
};
template <>
struct any_of_impl<optional_tag> {
template <typename T, typename Pred>
static constexpr auto apply(hana::optional<T> const& opt, Pred&& pred)
{ return static_cast<Pred&&>(pred)(opt.value_); }
template <typename Pred>
static constexpr hana::false_ apply(hana::optional<> const&, Pred&&)
{ return {}; }
};
}}
# 39 "/usr/include/boost/hana/string.hpp" 2 3 4
# 1 "/usr/include/boost/hana/type.hpp" 1 3 4
# 19 "/usr/include/boost/hana/type.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/metafunction.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/metafunction.hpp" 3 4
namespace boost { namespace hana {
# 95 "/usr/include/boost/hana/fwd/concept/metafunction.hpp" 3 4
template <typename F>
struct Metafunction;
}}
# 20 "/usr/include/boost/hana/type.hpp" 2 3 4
# 29 "/usr/include/boost/hana/type.hpp" 3 4
namespace boost { namespace hana {
template <typename T>
struct basic_type : detail::operators::adl<basic_type<T>> {
using hana_tag = type_tag;
using type = T;
constexpr auto operator+() const { return *this; }
};
template <typename T>
struct type_impl {
struct _ : basic_type<T> { };
};
namespace detail {
template <typename T, typename = type_tag>
struct decltype_t {
using type = typename std::remove_reference<T>::type;
};
template <typename T>
struct decltype_t<T, typename hana::tag_of<T>::type> {
using type = typename std::remove_reference<T>::type::type;
};
}
template <typename T>
constexpr auto decltype_t::operator()(T&&) const
{ return hana::type_c<typename detail::decltype_t<T>::type>; }
namespace detail {
template <typename T, typename = type_tag>
struct typeid_t {
using type = typename std::remove_cv<
typename std::remove_reference<T>::type
>::type;
};
template <typename T>
struct typeid_t<T, typename hana::tag_of<T>::type> {
using type = typename std::remove_reference<T>::type::type;
};
}
template <typename T>
constexpr auto typeid_t::operator()(T&&) const
{ return hana::type_c<typename detail::typeid_t<T>::type>; }
template <>
struct make_impl<type_tag> {
template <typename T>
static constexpr auto apply(T&& t)
{ return hana::typeid_(static_cast<T&&>(t)); }
};
template <typename T>
constexpr auto sizeof_t::operator()(T&&) const
{ return hana::size_c<sizeof(typename detail::decltype_t<T>::type)>; }
template <typename T>
constexpr auto alignof_t::operator()(T&&) const
{ return hana::size_c<alignof(typename detail::decltype_t<T>::type)>; }
namespace type_detail {
template <typename F, typename ...Args, typename = decltype(
std::declval<F&&>()(std::declval<Args&&>()...)
)>
constexpr auto is_valid_impl(int) { return hana::true_c; }
template <typename F, typename ...Args>
constexpr auto is_valid_impl(...) { return hana::false_c; }
template <typename F>
struct is_valid_fun {
template <typename ...Args>
constexpr auto operator()(Args&& ...) const
{ return is_valid_impl<F, Args&&...>(int{}); }
};
}
template <typename F>
constexpr auto is_valid_t::operator()(F&&) const
{ return type_detail::is_valid_fun<F&&>{}; }
template <typename F, typename ...Args>
constexpr auto is_valid_t::operator()(F&&, Args&& ...) const
{ return type_detail::is_valid_impl<F&&, Args&&...>(int{}); }
template <template <typename ...> class F>
struct template_t {
template <typename ...T>
struct apply {
using type = F<T...>;
};
template <typename ...T>
constexpr auto operator()(T const& ...) const
{ return hana::type<F<typename T::type...>>{}; }
};
template <template <typename ...> class F>
struct metafunction_t {
template <typename ...T>
using apply = F<T...>;
template <typename ...T>
constexpr hana::type<typename F<typename T::type...>::type>
operator()(T const& ...) const { return {}; }
};
template <template <typename ...> class F>
struct Metafunction<template_t<F>> {
static constexpr bool value = true;
};
template <template <typename ...> class F>
struct Metafunction<metafunction_t<F>> {
static constexpr bool value = true;
};
template <typename F>
struct Metafunction<metafunction_class_t<F>> {
static constexpr bool value = true;
};
template <typename F>
struct integral_t {
template <typename ...T>
constexpr auto operator()(T const& ...) const {
using Result = typename F::template apply<typename T::type...>::type;
return Result{};
}
};
namespace detail {
template <>
struct comparable_operators<type_tag> {
static constexpr bool value = true;
};
}
template <>
struct equal_impl<type_tag, type_tag> {
template <typename T, typename U>
static constexpr auto apply(basic_type<T> const&, basic_type<U> const&)
{ return hana::false_c; }
template <typename T>
static constexpr auto apply(basic_type<T> const&, basic_type<T> const&)
{ return hana::true_c; }
};
template <>
struct hash_impl<hana::type_tag> {
template <typename T>
static constexpr T apply(T const& t)
{ return t; }
};
}}
# 40 "/usr/include/boost/hana/string.hpp" 2 3 4
namespace boost { namespace hana {
template <char ...s>
struct string
: detail::operators::adl<string<s...>>
, detail::iterable_operators<string<s...>>
{ };
template <char ...s>
struct tag_of<string<s...>> {
using type = string_tag;
};
template <>
struct make_impl<string_tag> {
template <typename ...Chars>
static constexpr auto apply(Chars const& ...) {
return hana::string<hana::value<Chars>()...>{};
}
};
namespace string_detail {
template <typename S, std::size_t ...N>
constexpr string<S::get()[N]...>
prepare_impl(S, std::index_sequence<N...>)
{ return {}; }
template <typename S>
constexpr decltype(auto) prepare(S s) {
return prepare_impl(s,
std::make_index_sequence<sizeof(S::get()) - 1>{});
}
}
# 118 "/usr/include/boost/hana/string.hpp" 3 4
namespace detail {
template <>
struct comparable_operators<string_tag> {
static constexpr bool value = true;
};
template <>
struct orderable_operators<string_tag> {
static constexpr bool value = true;
};
}
template <>
struct to_impl<char const*, string_tag> {
template <char ...c>
static constexpr char const c_string[sizeof...(c) + 1] = {c..., '\0'};
template <char ...c>
static constexpr char const* apply(string<c...> const&)
{ return c_string<c...>; }
};
template <char ...c>
constexpr char const to_impl<char const*, string_tag>::c_string[sizeof...(c) + 1];
template <>
struct equal_impl<string_tag, string_tag> {
template <typename S>
static constexpr auto apply(S const&, S const&)
{ return hana::true_c; }
template <typename S1, typename S2>
static constexpr auto apply(S1 const&, S2 const&)
{ return hana::false_c; }
};
template <>
struct less_impl<string_tag, string_tag> {
template <char ...s1, char ...s2>
static constexpr auto
apply(string<s1...> const&, string<s2...> const&) {
constexpr char const c_str1[] = {s1..., '\0'};
constexpr char const c_str2[] = {s2..., '\0'};
return hana::bool_c<detail::lexicographical_compare(
c_str1, c_str1 + sizeof...(s1),
c_str2, c_str2 + sizeof...(s2)
)>;
}
};
template <>
struct unpack_impl<string_tag> {
template <char ...s, typename F>
static constexpr decltype(auto) apply(string<s...> const&, F&& f)
{ return static_cast<F&&>(f)(char_<s>{}...); }
};
template <>
struct length_impl<string_tag> {
template <char ...s>
static constexpr auto apply(string<s...> const&)
{ return hana::size_c<sizeof...(s)>; }
};
template <>
struct front_impl<string_tag> {
template <char x, char ...xs>
static constexpr auto apply(string<x, xs...> const&)
{ return hana::char_c<x>; }
};
template <>
struct drop_front_impl<string_tag> {
template <std::size_t N, char ...xs, std::size_t ...i>
static constexpr auto helper(string<xs...> const&, std::index_sequence<i...>) {
constexpr char s[] = {xs...};
return hana::string_c<s[i + N]...>;
}
template <char ...xs, typename N>
static constexpr auto apply(string<xs...> const& s, N const&) {
return helper<N::value>(s, std::make_index_sequence<
N::value < sizeof...(xs) ? sizeof...(xs) - N::value : 0
>{});
}
template <typename N>
static constexpr auto apply(string<> const& s, N const&)
{ return s; }
};
template <>
struct is_empty_impl<string_tag> {
template <char ...s>
static constexpr auto apply(string<s...> const&)
{ return hana::bool_c<sizeof...(s) == 0>; }
};
template <>
struct at_impl<string_tag> {
template <char ...s, typename N>
static constexpr auto apply(string<s...> const&, N const&) {
constexpr char characters[] = {s..., '\0'};
constexpr auto n = N::value;
return hana::char_c<characters[n]>;
}
};
template <>
struct contains_impl<string_tag> {
template <char ...s, typename C>
static constexpr auto
helper(string<s...> const&, C const&, hana::true_) {
constexpr char const characters[] = {s..., '\0'};
constexpr char c = hana::value<C>();
return hana::bool_c<
detail::find(characters, characters + sizeof...(s), c)
!= characters + sizeof...(s)
>;
}
template <typename S, typename C>
static constexpr auto helper(S const&, C const&, hana::false_)
{ return hana::false_c; }
template <typename S, typename C>
static constexpr auto apply(S const& s, C const& c)
{ return helper(s, c, hana::bool_c<hana::Constant<C>::value>); }
};
template <>
struct find_impl<string_tag> {
template <char ...s, typename Char>
static constexpr auto apply(string<s...> const& str, Char const& c) {
return hana::if_(contains_impl<string_tag>::apply(str, c),
hana::just(c),
hana::nothing
);
}
};
template <>
struct hash_impl<string_tag> {
template <typename String>
static constexpr auto apply(String const&) {
return hana::type_c<String>;
}
};
}}
# 29 "/usr/include/boost/hana/detail/struct_macros.hpp" 2 3 4
# 1 "/usr/include/boost/hana/tuple.hpp" 1 3 4
# 13 "/usr/include/boost/hana/tuple.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/tuple.hpp" 1 3 4
# 20 "/usr/include/boost/hana/fwd/tuple.hpp" 3 4
namespace boost { namespace hana {
# 148 "/usr/include/boost/hana/fwd/tuple.hpp" 3 4
template <typename ...Xn>
struct tuple;
struct tuple_tag { };
# 177 "/usr/include/boost/hana/fwd/tuple.hpp" 3 4
constexpr auto make_tuple = make<tuple_tag>;
constexpr auto to_tuple = to<tuple_tag>;
# 199 "/usr/include/boost/hana/fwd/tuple.hpp" 3 4
template <typename ...T>
constexpr hana::tuple<hana::type<T>...> tuple_t{};
# 219 "/usr/include/boost/hana/fwd/tuple.hpp" 3 4
template <typename T, T ...v>
constexpr hana::tuple<hana::integral_constant<T, v>...> tuple_c{};
}}
# 14 "/usr/include/boost/hana/tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/fast_and.hpp" 1 3 4
# 18 "/usr/include/boost/hana/detail/fast_and.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <bool ...b>
struct fast_and
: std::is_same<fast_and<b...>, fast_and<(b, true)...>>
{ };
} }}
# 20 "/usr/include/boost/hana/tuple.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/index_if.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/index_if.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename ...T>
struct pack {
static constexpr std::size_t length = sizeof...(T);
};
template <typename T>
struct make_pack;
template <template <typename...> class Template, typename ...T>
struct make_pack<Template<T...>> {
using type = pack<T...>;
};
template <typename T> struct make_pack<T const> : make_pack<T> { };
template <typename T> struct make_pack<T&> : make_pack<T> { };
template <typename T> struct make_pack<T&&> : make_pack<T> { };
# 46 "/usr/include/boost/hana/detail/index_if.hpp" 3 4
template <typename Pred, typename Ts, typename = when<true>>
struct index_if;
template <typename Pred, typename T, typename ...Ts>
struct index_if<Pred, pack<T, Ts...>, when<static_cast<bool>(decltype(
std::declval<Pred>()(std::declval<T>())
)::value)>> {
static constexpr std::size_t value = 0;
};
template <typename Pred, typename T, typename ...Ts>
struct index_if<Pred, pack<T, Ts...>, when<!static_cast<bool>(decltype(
std::declval<Pred>()(std::declval<T>())
)::value)>> {
static constexpr std::size_t value = 1 + index_if<Pred, pack<Ts...>>::value;
};
template <typename Pred>
struct index_if<Pred, pack<>> {
static constexpr std::size_t value = 0;
};
} }}
# 21 "/usr/include/boost/hana/tuple.hpp" 2 3 4
# 42 "/usr/include/boost/hana/tuple.hpp" 3 4
namespace boost { namespace hana {
namespace detail {
template <typename Xs, typename Ys, std::size_t ...n>
constexpr void assign(Xs& xs, Ys&& ys, std::index_sequence<n...>) {
int sequence[] = {int{}, ((void)(
hana::get_impl<n>(xs) = hana::get_impl<n>(static_cast<Ys&&>(ys))
), int{})...};
(void)sequence;
}
struct from_index_sequence_t { };
}
template <>
struct tuple<>
: detail::operators::adl<tuple<>>
, detail::iterable_operators<tuple<>>
{
constexpr tuple() { }
using hana_tag = tuple_tag;
};
template <typename ...Xn>
struct tuple
: detail::operators::adl<tuple<Xn...>>
, detail::iterable_operators<tuple<Xn...>>
{
basic_tuple<Xn...> storage_;
using hana_tag = tuple_tag;
private:
template <typename Other, std::size_t ...n>
explicit constexpr tuple(detail::from_index_sequence_t, std::index_sequence<n...>, Other&& other)
: storage_(hana::get_impl<n>(static_cast<Other&&>(other))...)
{ }
public:
template <typename ...dummy, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, dummy...>::value...>::value
>::type>
constexpr tuple()
: storage_()
{ }
template <typename ...dummy, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Xn const&, dummy...>::value...>::value
>::type>
constexpr tuple(Xn const& ...xn)
: storage_(xn...)
{ }
template <typename ...Yn, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Yn&&>::value...>::value
>::type>
constexpr tuple(Yn&& ...yn)
: storage_(static_cast<Yn&&>(yn)...)
{ }
template <typename ...Yn, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Yn const&>::value...>::value
>::type>
constexpr tuple(tuple<Yn...> const& other)
: tuple(detail::from_index_sequence_t{},
std::make_index_sequence<sizeof...(Xn)>{},
other.storage_)
{ }
template <typename ...Yn, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Yn&&>::value...>::value
>::type>
constexpr tuple(tuple<Yn...>&& other)
: tuple(detail::from_index_sequence_t{},
std::make_index_sequence<sizeof...(Xn)>{},
static_cast<tuple<Yn...>&&>(other).storage_)
{ }
template <typename ...dummy, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Xn const&, dummy...>::value...>::value
>::type>
constexpr tuple(tuple const& other)
: tuple(detail::from_index_sequence_t{},
std::make_index_sequence<sizeof...(Xn)>{},
other.storage_)
{ }
template <typename ...dummy, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Xn const&, dummy...>::value...>::value
>::type>
constexpr tuple(tuple& other)
: tuple(const_cast<tuple const&>(other))
{ }
template <typename ...dummy, typename = typename std::enable_if<
detail::fast_and< ::std::is_constructible<Xn, Xn&&, dummy...>::value...>::value
>::type>
constexpr tuple(tuple&& other)
: tuple(detail::from_index_sequence_t{},
std::make_index_sequence<sizeof...(Xn)>{},
static_cast<tuple&&>(other).storage_)
{ }
template <typename ...Yn, typename = typename std::enable_if<
detail::fast_and< ::std::is_assignable<Xn&, Yn const&>::value...>::value
>::type>
constexpr tuple& operator=(tuple<Yn...> const& other) {
detail::assign(this->storage_, other.storage_,
std::make_index_sequence<sizeof...(Xn)>{});
return *this;
}
template <typename ...Yn, typename = typename std::enable_if<
detail::fast_and< ::std::is_assignable<Xn&, Yn&&>::value...>::value
>::type>
constexpr tuple& operator=(tuple<Yn...>&& other) {
detail::assign(this->storage_, static_cast<tuple<Yn...>&&>(other).storage_,
std::make_index_sequence<sizeof...(Xn)>{});
return *this;
}
};
namespace detail {
template <>
struct comparable_operators<tuple_tag> {
static constexpr bool value = true;
};
template <>
struct orderable_operators<tuple_tag> {
static constexpr bool value = true;
};
template <>
struct monad_operators<tuple_tag> {
static constexpr bool value = true;
};
}
template <>
struct unpack_impl<tuple_tag> {
template <typename F>
static constexpr decltype(auto) apply(tuple<>&&, F&& f)
{ return static_cast<F&&>(f)(); }
template <typename F>
static constexpr decltype(auto) apply(tuple<>&, F&& f)
{ return static_cast<F&&>(f)(); }
template <typename F>
static constexpr decltype(auto) apply(tuple<> const&, F&& f)
{ return static_cast<F&&>(f)(); }
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs).storage_, static_cast<F&&>(f));
}
};
template <>
struct length_impl<tuple_tag> {
template <typename ...Xs>
static constexpr auto apply(tuple<Xs...> const&)
{ return hana::size_c<sizeof...(Xs)>; }
};
template <>
struct at_impl<tuple_tag> {
template <typename Xs, typename N>
static constexpr decltype(auto) apply(Xs&& xs, N const&) {
constexpr std::size_t index = N::value;
return hana::get_impl<index>(static_cast<Xs&&>(xs).storage_);
}
};
template <>
struct drop_front_impl<tuple_tag> {
template <std::size_t N, typename Xs, std::size_t ...i>
static constexpr auto helper(Xs&& xs, std::index_sequence<i...>) {
return hana::make<tuple_tag>(hana::at_c<i+N>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t len = decltype(hana::length(xs))::value;
return helper<N::value>(static_cast<Xs&&>(xs), std::make_index_sequence<
N::value < len ? len - N::value : 0
>{});
}
};
template <>
struct is_empty_impl<tuple_tag> {
template <typename ...Xs>
static constexpr auto apply(tuple<Xs...> const&)
{ return hana::bool_c<sizeof...(Xs) == 0>; }
};
template <std::size_t n, typename ...Xs>
constexpr decltype(auto) at_c(tuple<Xs...> const& xs) {
return hana::get_impl<n>(xs.storage_);
}
template <std::size_t n, typename ...Xs>
constexpr decltype(auto) at_c(tuple<Xs...>& xs) {
return hana::get_impl<n>(xs.storage_);
}
template <std::size_t n, typename ...Xs>
constexpr decltype(auto) at_c(tuple<Xs...>&& xs) {
return hana::get_impl<n>(static_cast<tuple<Xs...>&&>(xs).storage_);
}
template <>
struct Sequence<tuple_tag> {
static constexpr bool value = true;
};
template <>
struct make_impl<tuple_tag> {
template <typename ...Xs>
static constexpr
tuple<typename detail::decay<Xs>::type...> apply(Xs&& ...xs)
{ return {static_cast<Xs&&>(xs)...}; }
};
template <>
struct find_if_impl<tuple_tag> {
template <std::size_t index, typename Xs>
static constexpr auto helper(Xs&&, hana::true_) {
return hana::nothing;
}
template <std::size_t index, typename Xs>
static constexpr auto helper(Xs&& xs, hana::false_) {
return hana::just(hana::at_c<index>(static_cast<Xs&&>(xs)));
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
using Pack = typename detail::make_pack<Xs>::type;
constexpr std::size_t index = detail::index_if<Pred&&, Pack>::value;
constexpr std::size_t len = Pack::length;
return helper<index>(static_cast<Xs&&>(xs), hana::bool_c<index == len>);
}
};
}}
# 30 "/usr/include/boost/hana/detail/struct_macros.hpp" 2 3 4
namespace boost { namespace hana { namespace struct_detail {
template <typename Memptr, Memptr ptr>
struct member_ptr {
template <typename T>
constexpr decltype(auto) operator()(T&& t) const
{ return static_cast<T&&>(t).*ptr; }
};
constexpr std::size_t strlen(char const* s) {
std::size_t n = 0;
while (*s++ != '\0')
++n;
return n;
}
template <std::size_t n, typename Names, std::size_t ...i>
constexpr auto prepare_member_name_impl(std::index_sequence<i...>) {
return hana::string_c<hana::at_c<n>(Names::get())[i]...>;
}
template <std::size_t n, typename Names>
constexpr auto prepare_member_name() {
constexpr std::size_t len = strlen(hana::at_c<n>(Names::get()));
return prepare_member_name_impl<n, Names>(std::make_index_sequence<len>{});
}
} }}
template <typename ...>
struct BOOST_HANA_ADAPT_STRUCT_must_be_called_in_the_global_namespace;
# 1203 "/usr/include/boost/hana/detail/struct_macros.hpp" 3 4
template <typename ...>
struct BOOST_HANA_ADAPT_ADT_must_be_called_in_the_global_namespace;
# 16 "/usr/include/boost/hana/adapt_adt.hpp" 2 3 4
# 60 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/adapt_struct.hpp" 1 3 4
# 13 "/usr/include/boost/hana/adapt_struct.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/adapt_struct.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/adapt_struct.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/adapt_struct.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/adapt_struct.hpp" 2 3 4
# 61 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/adjust.hpp" 1 3 4
# 13 "/usr/include/boost/hana/adjust.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/adjust.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/adjust.hpp" 3 4
namespace boost { namespace hana {
# 52 "/usr/include/boost/hana/fwd/adjust.hpp" 3 4
template <typename Xs, typename = void>
struct adjust_impl : adjust_impl<Xs, when<true>> { };
struct adjust_t {
template <typename Xs, typename Value, typename F>
constexpr auto operator()(Xs&& xs, Value&& value, F&& f) const;
};
constexpr adjust_t adjust{};
}}
# 14 "/usr/include/boost/hana/adjust.hpp" 2 3 4
# 1 "/usr/include/boost/hana/adjust_if.hpp" 1 3 4
# 13 "/usr/include/boost/hana/adjust_if.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/adjust_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/adjust_if.hpp" 3 4
namespace boost { namespace hana {
# 57 "/usr/include/boost/hana/fwd/adjust_if.hpp" 3 4
template <typename Xs, typename = void>
struct adjust_if_impl : adjust_if_impl<Xs, when<true>> { };
struct adjust_if_t {
template <typename Xs, typename Pred, typename F>
constexpr auto operator()(Xs&& xs, Pred const& pred, F const& f) const;
};
constexpr adjust_if_t adjust_if{};
}}
# 14 "/usr/include/boost/hana/adjust_if.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/functor.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/functor.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/functor.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/functor.hpp" 3 4
namespace boost { namespace hana {
# 135 "/usr/include/boost/hana/fwd/concept/functor.hpp" 3 4
template <typename F>
struct Functor;
}}
# 14 "/usr/include/boost/hana/concept/functor.hpp" 2 3 4
# 1 "/usr/include/boost/hana/adjust_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/concept/functor.hpp" 2 3 4
# 1 "/usr/include/boost/hana/transform.hpp" 1 3 4
# 16 "/usr/include/boost/hana/transform.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/functor.hpp" 1 3 4
# 17 "/usr/include/boost/hana/transform.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/always.hpp" 1 3 4
# 19 "/usr/include/boost/hana/functional/always.hpp" 3 4
namespace boost { namespace hana {
# 43 "/usr/include/boost/hana/functional/always.hpp" 3 4
template <typename T>
struct _always {
T val_;
template <typename ...Args>
constexpr T const& operator()(Args const& ...) const&
{ return val_; }
template <typename ...Args>
constexpr T& operator()(Args const& ...) &
{ return val_; }
template <typename ...Args>
constexpr T operator()(Args const& ...) &&
{ return std::move(val_); }
};
constexpr detail::create<_always> always{};
}}
# 22 "/usr/include/boost/hana/transform.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr auto transform_t::operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using Transform = ::std::conditional_t< (hana::Functor<S>::value), transform_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::transform(xs, f) requires 'xs' to be a Functor");
return Transform::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
template <typename Fun, bool condition>
struct transform_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename F>
static constexpr auto apply(Xs&& xs, F&& f) {
return hana::adjust_if(static_cast<Xs&&>(xs),
hana::always(hana::true_c),
static_cast<F&&>(f));
}
};
template <typename S>
struct transform_impl<S, when<Sequence<S>::value>> {
template <typename F>
struct transformer {
F f;
template <typename ...Xs>
constexpr auto operator()(Xs&& ...xs) const {
return hana::make<S>((*f)(static_cast<Xs&&>(xs))...);
}
};
template <typename Xs, typename F>
static constexpr auto apply(Xs&& xs, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs),
transformer<decltype(&f)>{&f});
}
};
}}
# 20 "/usr/include/boost/hana/concept/functor.hpp" 2 3 4
namespace boost { namespace hana {
template <typename F>
struct Functor {
using Tag = typename tag_of<F>::type;
static constexpr bool value = !is_default<transform_impl<Tag>>::value ||
!is_default<adjust_if_impl<Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/adjust_if.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred, typename F>
constexpr auto adjust_if_t::operator()(Xs&& xs, Pred const& pred, F const& f) const {
using S = typename hana::tag_of<Xs>::type;
using AdjustIf = ::std::conditional_t< (hana::Functor<S>::value), adjust_if_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::adjust_if(xs, pred, f) requires 'xs' to be a Functor");
return AdjustIf::apply(static_cast<Xs&&>(xs), pred, f);
}
namespace detail {
template <typename Pred, typename F>
struct apply_if {
Pred const& pred;
F const& f;
template <typename X>
constexpr decltype(auto) helper(bool cond, X&& x) const
{ return cond ? f(static_cast<X&&>(x)) : static_cast<X&&>(x); }
template <typename X>
constexpr decltype(auto) helper(hana::true_, X&& x) const
{ return f(static_cast<X&&>(x)); }
template <typename X>
constexpr decltype(auto) helper(hana::false_, X&& x) const
{ return static_cast<X&&>(x); }
template <typename X>
constexpr decltype(auto) operator()(X&& x) const {
auto cond = hana::if_(pred(x), hana::true_c, hana::false_c);
return this->helper(cond, static_cast<X&&>(x));
}
};
}
template <typename Fun, bool condition>
struct adjust_if_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename Pred, typename F>
static constexpr auto apply(Xs&& xs, Pred const& pred, F const& f) {
return hana::transform(static_cast<Xs&&>(xs),
detail::apply_if<Pred, F>{pred, f});
}
};
}}
# 16 "/usr/include/boost/hana/adjust.hpp" 2 3 4
# 1 "/usr/include/boost/hana/equal.hpp" 1 3 4
# 16 "/usr/include/boost/hana/equal.hpp" 3 4
# 1 "/usr/include/boost/hana/all_of.hpp" 1 3 4
# 13 "/usr/include/boost/hana/all_of.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/all_of.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/all_of.hpp" 3 4
namespace boost { namespace hana {
# 42 "/usr/include/boost/hana/fwd/all_of.hpp" 3 4
template <typename S, typename = void>
struct all_of_impl : all_of_impl<S, when<true>> { };
struct all_of_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr all_of_t all_of{};
}}
# 14 "/usr/include/boost/hana/all_of.hpp" 2 3 4
# 1 "/usr/include/boost/hana/any_of.hpp" 1 3 4
# 18 "/usr/include/boost/hana/any_of.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/searchable.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/searchable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/searchable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/searchable.hpp" 3 4
namespace boost { namespace hana {
# 139 "/usr/include/boost/hana/fwd/concept/searchable.hpp" 3 4
template <typename S>
struct Searchable;
}}
# 14 "/usr/include/boost/hana/concept/searchable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/any_of.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concept/searchable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/find_if.hpp" 1 3 4
# 19 "/usr/include/boost/hana/find_if.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/searchable.hpp" 1 3 4
# 20 "/usr/include/boost/hana/find_if.hpp" 2 3 4
# 1 "/usr/include/boost/hana/drop_while.hpp" 1 3 4
# 13 "/usr/include/boost/hana/drop_while.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/drop_while.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/drop_while.hpp" 3 4
namespace boost { namespace hana {
# 48 "/usr/include/boost/hana/fwd/drop_while.hpp" 3 4
template <typename It, typename = void>
struct drop_while_impl : drop_while_impl<It, when<true>> { };
struct drop_while_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr drop_while_t drop_while{};
}}
# 14 "/usr/include/boost/hana/drop_while.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/first_unsatisfied_index.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/first_unsatisfied_index.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <bool, typename Pred, typename ...Xs>
struct find_tail_size;
template <typename Pred, typename X, typename ...Xs>
struct find_tail_size<true, Pred, X, Xs...> {
static constexpr int value = find_tail_size<
static_cast<bool>(hana::value<decltype(std::declval<Pred>()(std::declval<X>()))>()),
Pred, Xs...
>::value;
};
template <typename Pred>
struct find_tail_size<true, Pred> {
static constexpr int value = -1;
};
template <typename Pred, typename ...Xs>
struct find_tail_size<false, Pred, Xs...> {
static constexpr int value = sizeof...(Xs);
};
template <typename Pred>
struct first_unsatisfied_index {
template <typename ...Xs>
constexpr auto operator()(Xs&& ...) const {
return hana::size_c<
sizeof...(Xs) - 1 - find_tail_size<true, Pred, Xs&&...>::value
>;
}
};
} }}
# 20 "/usr/include/boost/hana/drop_while.hpp" 2 3 4
# 1 "/usr/include/boost/hana/front.hpp" 1 3 4
# 21 "/usr/include/boost/hana/front.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr decltype(auto) front_t::operator()(Xs&& xs) const {
using It = typename hana::tag_of<Xs>::type;
using Front = ::std::conditional_t< (hana::Iterable<It>::value), front_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::front(xs) requires 'xs' to be an Iterable");
return Front::apply(static_cast<Xs&&>(xs));
}
template <typename It, bool condition>
struct front_impl<It, when<condition>> : default_ {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs)
{ return hana::at_c<0>(static_cast<Xs&&>(xs)); }
};
}}
# 23 "/usr/include/boost/hana/drop_while.hpp" 2 3 4
# 1 "/usr/include/boost/hana/lazy.hpp" 1 3 4
# 13 "/usr/include/boost/hana/lazy.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/lazy.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/lazy.hpp" 3 4
namespace boost { namespace hana {
# 85 "/usr/include/boost/hana/fwd/lazy.hpp" 3 4
struct lazy_tag { };
# 121 "/usr/include/boost/hana/fwd/lazy.hpp" 3 4
constexpr auto make_lazy = make<lazy_tag>;
}}
# 14 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/apply.hpp" 1 3 4
# 16 "/usr/include/boost/hana/functional/apply.hpp" 3 4
namespace boost { namespace hana {
# 44 "/usr/include/boost/hana/functional/apply.hpp" 3 4
struct apply_t {
template <typename F, typename... Args>
constexpr auto operator()(F&& f, Args&&... args) const ->
decltype(static_cast<F&&>(f)(static_cast<Args&&>(args)...))
{
return static_cast<F&&>(f)(static_cast<Args&&>(args)...);
}
template <typename Base, typename T, typename Derived>
constexpr auto operator()(T Base::*pmd, Derived&& ref) const ->
decltype(static_cast<Derived&&>(ref).*pmd)
{
return static_cast<Derived&&>(ref).*pmd;
}
template <typename PMD, typename Pointer>
constexpr auto operator()(PMD pmd, Pointer&& ptr) const ->
decltype((*static_cast<Pointer&&>(ptr)).*pmd)
{
return (*static_cast<Pointer&&>(ptr)).*pmd;
}
template <typename Base, typename T, typename Derived, typename... Args>
constexpr auto operator()(T Base::*pmf, Derived&& ref, Args&&... args) const ->
decltype((static_cast<Derived&&>(ref).*pmf)(static_cast<Args&&>(args)...))
{
return (static_cast<Derived&&>(ref).*pmf)(static_cast<Args&&>(args)...);
}
template <typename PMF, typename Pointer, typename... Args>
constexpr auto operator()(PMF pmf, Pointer&& ptr, Args&& ...args) const ->
decltype(((*static_cast<Pointer&&>(ptr)).*pmf)(static_cast<Args&&>(args)...))
{
return ((*static_cast<Pointer&&>(ptr)).*pmf)(static_cast<Args&&>(args)...);
}
};
constexpr apply_t apply{};
}}
# 22 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/compose.hpp" 1 3 4
# 20 "/usr/include/boost/hana/functional/compose.hpp" 3 4
namespace boost { namespace hana {
# 64 "/usr/include/boost/hana/functional/compose.hpp" 3 4
template <typename F, typename G>
struct _compose {
F f; G g;
template <typename X, typename ...Xs>
constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) const& {
return f(
g(static_cast<X&&>(x)),
static_cast<Xs&&>(xs)...
);
}
template <typename X, typename ...Xs>
constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) & {
return f(
g(static_cast<X&&>(x)),
static_cast<Xs&&>(xs)...
);
}
template <typename X, typename ...Xs>
constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) && {
return std::move(f)(
std::move(g)(static_cast<X&&>(x)),
static_cast<Xs&&>(xs)...
);
}
};
struct _make_compose {
template <typename F, typename G, typename ...H>
constexpr decltype(auto) operator()(F&& f, G&& g, H&& ...h) const {
return detail::variadic::foldl1(detail::create<_compose>{},
static_cast<F&&>(f),
static_cast<G&&>(g),
static_cast<H&&>(h)...
);
}
};
constexpr _make_compose compose{};
}}
# 23 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/on.hpp" 1 3 4
# 20 "/usr/include/boost/hana/functional/on.hpp" 3 4
namespace boost { namespace hana {
# 60 "/usr/include/boost/hana/functional/on.hpp" 3 4
template <typename F, typename G>
struct on_t {
F f; G g;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const& {
return f(g(static_cast<X&&>(x))...);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) & {
return f(g(static_cast<X&&>(x))...);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) && {
return std::move(f)(g(static_cast<X&&>(x))...);
}
};
constexpr auto on = infix(detail::create<on_t>{});
}}
# 24 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/duplicate.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/duplicate.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/duplicate.hpp" 3 4
template <typename W, typename = void>
struct duplicate_impl : duplicate_impl<W, when<true>> { };
struct duplicate_t {
template <typename W_>
constexpr decltype(auto) operator()(W_&& w) const;
};
constexpr duplicate_t duplicate{};
}}
# 26 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/extend.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/extend.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/extend.hpp" 3 4
template <typename W, typename = void>
struct extend_impl : extend_impl<W, when<true>> { };
struct extend_t {
template <typename W_, typename F>
constexpr decltype(auto) operator()(W_&& w, F&& f) const;
};
constexpr extend_t extend{};
}}
# 28 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/extract.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/extract.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/extract.hpp" 3 4
template <typename W, typename = void>
struct extract_impl : extract_impl<W, when<true>> { };
struct extract_t {
template <typename W_>
constexpr decltype(auto) operator()(W_&& w) const;
};
constexpr extract_t extract{};
}}
# 29 "/usr/include/boost/hana/lazy.hpp" 2 3 4
# 38 "/usr/include/boost/hana/lazy.hpp" 3 4
namespace boost { namespace hana {
template <typename Indices, typename F, typename ...Args>
struct lazy_apply_t;
namespace detail { struct lazy_secret { }; }
template <std::size_t ...n, typename F, typename ...Args>
struct lazy_apply_t<std::index_sequence<n...>, F, Args...>
: detail::operators::adl<>
{
template <typename ...T>
constexpr lazy_apply_t(detail::lazy_secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, Args...> storage_;
using hana_tag = lazy_tag;
};
template <typename X>
struct lazy_value_t : detail::operators::adl<> {
template <typename Y>
constexpr lazy_value_t(detail::lazy_secret, Y&& y)
: storage_{static_cast<Y&&>(y)}
{ }
basic_tuple<X> storage_;
using hana_tag = lazy_tag;
template <typename ...Args>
constexpr lazy_apply_t<
std::make_index_sequence<sizeof...(Args)>,
X, typename detail::decay<Args>::type...
> operator()(Args&& ...args) const& {
return {detail::lazy_secret{},
hana::get_impl<0>(storage_), static_cast<Args&&>(args)...};
}
template <typename ...Args>
constexpr lazy_apply_t<
std::make_index_sequence<sizeof...(Args)>,
X, typename detail::decay<Args>::type...
> operator()(Args&& ...args) && {
return {detail::lazy_secret{},
static_cast<X&&>(hana::get_impl<0>(storage_)),
static_cast<Args&&>(args)...
};
}
};
template <>
struct make_impl<lazy_tag> {
template <typename X>
static constexpr lazy_value_t<typename detail::decay<X>::type> apply(X&& x) {
return {detail::lazy_secret{}, static_cast<X&&>(x)};
}
};
namespace detail {
template <>
struct monad_operators<lazy_tag> { static constexpr bool value = true; };
}
template <>
struct eval_impl<lazy_tag> {
template <std::size_t ...n, typename F, typename ...Args>
static constexpr decltype(auto)
apply(lazy_apply_t<std::index_sequence<n...>, F, Args...> const& expr) {
return hana::get_impl<0>(expr.storage_)(
hana::get_impl<n+1>(expr.storage_)...
);
}
template <std::size_t ...n, typename F, typename ...Args>
static constexpr decltype(auto)
apply(lazy_apply_t<std::index_sequence<n...>, F, Args...>& expr) {
return hana::get_impl<0>(expr.storage_)(
hana::get_impl<n+1>(expr.storage_)...
);
}
template <std::size_t ...n, typename F, typename ...Args>
static constexpr decltype(auto)
apply(lazy_apply_t<std::index_sequence<n...>, F, Args...>&& expr) {
return static_cast<F&&>(hana::get_impl<0>(expr.storage_))(
static_cast<Args&&>(hana::get_impl<n+1>(expr.storage_))...
);
}
template <typename X>
static constexpr X const& apply(lazy_value_t<X> const& expr)
{ return hana::get_impl<0>(expr.storage_); }
template <typename X>
static constexpr X& apply(lazy_value_t<X>& expr)
{ return hana::get_impl<0>(expr.storage_); }
template <typename X>
static constexpr X apply(lazy_value_t<X>&& expr)
{ return static_cast<X&&>(hana::get_impl<0>(expr.storage_)); }
};
template <>
struct transform_impl<lazy_tag> {
template <typename Expr, typename F>
static constexpr auto apply(Expr&& expr, F&& f) {
return hana::make_lazy(hana::compose(static_cast<F&&>(f), hana::eval))(
static_cast<Expr&&>(expr)
);
}
};
template <>
struct lift_impl<lazy_tag> {
template <typename X>
static constexpr lazy_value_t<typename detail::decay<X>::type>
apply(X&& x) {
return {detail::lazy_secret{}, static_cast<X&&>(x)};
}
};
template <>
struct ap_impl<lazy_tag> {
template <typename F, typename X>
static constexpr decltype(auto) apply(F&& f, X&& x) {
return hana::make_lazy(hana::on(hana::apply, hana::eval))(
static_cast<F&&>(f), static_cast<X&&>(x)
);
}
};
template <>
struct flatten_impl<lazy_tag> {
template <typename Expr>
static constexpr decltype(auto) apply(Expr&& expr) {
return hana::make_lazy(hana::compose(hana::eval, hana::eval))(
static_cast<Expr&&>(expr)
);
}
};
template <>
struct extract_impl<lazy_tag> {
template <typename Expr>
static constexpr decltype(auto) apply(Expr&& expr)
{ return hana::eval(static_cast<Expr&&>(expr)); }
};
template <>
struct duplicate_impl<lazy_tag> {
template <typename Expr>
static constexpr decltype(auto) apply(Expr&& expr)
{ return hana::make_lazy(static_cast<Expr&&>(expr)); }
};
template <>
struct extend_impl<lazy_tag> {
template <typename Expr, typename F>
static constexpr decltype(auto) apply(Expr&& expr, F&& f) {
return hana::make_lazy(static_cast<F&&>(f))(static_cast<Expr&&>(expr));
}
};
}}
# 25 "/usr/include/boost/hana/drop_while.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto drop_while_t::operator()(Xs&& xs, Pred&& pred) const {
using It = typename hana::tag_of<Xs>::type;
using DropWhile = ::std::conditional_t< (hana::Iterable<It>::value), drop_while_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::drop_while(xs, pred) requires 'xs' to be an Iterable");
return DropWhile::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
namespace iterable_detail {
struct drop_while_helper {
struct next {
template <typename Xs, typename Pred>
constexpr decltype(auto) operator()(Xs&& xs, Pred&& pred) const {
return hana::drop_while(
hana::drop_front(static_cast<Xs&&>(xs)),
static_cast<Pred&&>(pred)
);
}
};
template <typename Xs, typename Pred>
constexpr decltype(auto) operator()(Xs&& xs, Pred&& pred) const {
return hana::eval_if(pred(hana::front(xs)),
hana::make_lazy(next{})(xs, pred),
hana::make_lazy(xs)
);
}
};
}
template <typename It, bool condition>
struct drop_while_impl<It, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::eval_if(hana::is_empty(xs),
hana::make_lazy(xs),
hana::make_lazy(iterable_detail::drop_while_helper{})(
xs, static_cast<Pred&&>(pred))
);
}
};
template <typename S>
struct drop_while_impl<S, when<hana::Foldable<S>::value>> {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
using FirstUnsatisfied = decltype(
hana::unpack(static_cast<Xs&&>(xs),
detail::first_unsatisfied_index<Pred&&>{})
);
return hana::drop_front(static_cast<Xs&&>(xs),
FirstUnsatisfied{});
}
};
}}
# 26 "/usr/include/boost/hana/find_if.hpp" 2 3 4
# 40 "/usr/include/boost/hana/find_if.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto find_if_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using FindIf = ::std::conditional_t< (hana::Searchable<S>::value), find_if_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::find_if(xs, pred) requires 'xs' to be a Searchable");
return FindIf::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct find_if_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
namespace detail {
template <typename Xs, typename Pred, std::size_t i, std::size_t N, bool Done>
struct advance_until;
template <typename Xs, typename Pred, std::size_t i, std::size_t N>
struct advance_until<Xs, Pred, i, N, false>
: advance_until<Xs, Pred, i + 1, N, static_cast<bool>(detail::decay<decltype(
std::declval<Pred>()(hana::at_c<i>(std::declval<Xs>()))
)>::type::value)>
{ };
template <typename Xs, typename Pred, std::size_t N>
struct advance_until<Xs, Pred, N, N, false> {
template <typename Ys>
static constexpr auto apply(Ys&&) {
return hana::nothing;
}
};
template <typename Xs, typename Pred, std::size_t i, std::size_t N>
struct advance_until<Xs, Pred, i, N, true> {
template <typename Ys>
static constexpr auto apply(Ys&& ys) {
return hana::just(hana::at_c<i - 1>(static_cast<Ys&&>(ys)));
}
};
}
template <typename S>
struct find_if_impl<S, when<Sequence<S>::value>> {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
return detail::advance_until<Xs&&, Pred&&, 0, N, false>::apply(
static_cast<Xs&&>(xs)
);
}
};
template <typename It>
struct find_if_impl<It, when<hana::Iterable<It>::value && !Sequence<It>::value>> {
template <typename Xs, typename Pred>
static constexpr auto find_if_helper(Xs&& xs, Pred&& pred, hana::true_) {
return hana::just(hana::front(
hana::drop_while(static_cast<Xs&&>(xs),
hana::compose(hana::not_, static_cast<Pred&&>(pred)))
));
}
template <typename Xs, typename Pred>
static constexpr auto find_if_helper(Xs&&, Pred&&, hana::false_) {
return hana::nothing;
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
constexpr bool found = !decltype(
hana::is_empty(hana::drop_while(static_cast<Xs&&>(xs),
hana::compose(hana::not_, static_cast<Pred&&>(pred))))
)::value;
return find_if_impl::find_if_helper(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred),
hana::bool_<found>{});
}
};
template <typename T, std::size_t N>
struct find_if_impl<T[N]> {
template <typename Xs>
static constexpr auto find_if_helper(Xs&&, hana::false_)
{ return hana::nothing; }
template <typename Xs>
static constexpr auto find_if_helper(Xs&& xs, hana::true_)
{ return hana::just(static_cast<Xs&&>(xs)[0]); }
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return find_if_helper(static_cast<Xs&&>(xs),
hana::bool_c<decltype(
static_cast<Pred&&>(pred)(static_cast<Xs&&>(xs)[0])
)::value>
);
}
};
namespace struct_detail {
template <typename X>
struct get_member {
X x;
template <typename Member>
constexpr decltype(auto) operator()(Member&& member) && {
return hana::second(static_cast<Member&&>(member))(
static_cast<X&&>(x)
);
}
};
}
template <typename S>
struct find_if_impl<S, when<hana::Struct<S>::value>> {
template <typename X, typename Pred>
static constexpr decltype(auto) apply(X&& x, Pred&& pred) {
return hana::transform(
hana::find_if(hana::accessors<S>(),
hana::compose(static_cast<Pred&&>(pred), hana::first)
),
struct_detail::get_member<X>{static_cast<X&&>(x)}
);
}
};
}}
# 20 "/usr/include/boost/hana/concept/searchable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename S>
struct Searchable {
using Tag = typename tag_of<S>::type;
static constexpr bool value = !is_default<any_of_impl<Tag>>::value &&
!is_default<find_if_impl<Tag>>::value;
};
}}
# 19 "/usr/include/boost/hana/any_of.hpp" 2 3 4
# 34 "/usr/include/boost/hana/any_of.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto any_of_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using AnyOf = ::std::conditional_t< (hana::Searchable<S>::value), any_of_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::any_of(xs, pred) requires 'xs' to be a Searchable");
return AnyOf::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct any_of_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S>
struct any_of_impl<S, when<Sequence<S>::value>> {
template <std::size_t k, std::size_t Len>
struct any_of_helper {
template <typename Xs, typename Pred>
static constexpr auto apply(bool prev_cond, Xs&& xs, Pred&& pred) {
auto cond = hana::if_(pred(hana::at_c<k>(xs)), hana::true_c,
hana::false_c);
return prev_cond ? hana::true_c
: any_of_impl::any_of_helper<k + 1, Len>::apply(cond,
static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
template <typename Xs, typename Pred>
static constexpr auto apply(hana::true_, Xs&&, Pred&&)
{ return hana::true_c; }
template <typename Xs, typename Pred>
static constexpr auto apply(hana::false_, Xs&& xs, Pred&& pred) {
auto cond = hana::if_(pred(hana::at_c<k>(xs)), hana::true_c,
hana::false_c);
return any_of_impl::any_of_helper<k + 1, Len>::apply(cond,
static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
};
template <std::size_t Len>
struct any_of_helper<Len, Len> {
template <typename Cond, typename Xs, typename Pred>
static constexpr auto apply(Cond cond, Xs&&, Pred&&)
{ return cond; }
};
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
constexpr std::size_t len = decltype(hana::length(xs))::value;
return any_of_impl::any_of_helper<0, len>::apply(hana::false_c,
static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
};
template <typename It>
struct any_of_impl<It, when<
hana::Iterable<It>::value &&
!Sequence<It>::value
>> {
template <typename Xs, typename Pred>
static constexpr auto lazy_any_of_helper(hana::false_, bool prev_cond, Xs&& xs, Pred&& pred) {
auto cond = hana::if_(pred(hana::front(xs)), hana::true_c, hana::false_c);
decltype(auto) tail = hana::drop_front(static_cast<Xs&&>(xs));
constexpr bool done = decltype(hana::is_empty(tail))::value;
return prev_cond ? hana::true_c
: lazy_any_of_helper(hana::bool_c<done>, cond,
static_cast<decltype(tail)&&>(tail),
static_cast<Pred&&>(pred));
}
template <typename Xs, typename Pred>
static constexpr auto lazy_any_of_helper(hana::false_, hana::true_, Xs&&, Pred&&)
{ return hana::true_c; }
template <typename Xs, typename Pred>
static constexpr auto lazy_any_of_helper(hana::false_, hana::false_, Xs&& xs, Pred&& pred) {
auto cond = hana::if_(pred(hana::front(xs)), hana::true_c, hana::false_c);
constexpr bool done = decltype(hana::is_empty(hana::drop_front(xs)))::value;
return lazy_any_of_helper(hana::bool_c<done>, cond,
hana::drop_front(static_cast<Xs&&>(xs)),
static_cast<Pred&&>(pred));
}
template <typename Cond, typename Xs, typename Pred>
static constexpr auto lazy_any_of_helper(hana::true_, Cond cond, Xs&&, Pred&&)
{ return cond; }
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
constexpr bool done = decltype(hana::is_empty(xs))::value;
return lazy_any_of_helper(hana::bool_c<done>, hana::false_c,
static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
};
template <typename T, std::size_t N>
struct any_of_impl<T[N]> {
template <typename Xs, typename Pred>
static constexpr bool any_of_helper(bool cond, Xs&& xs, Pred&& pred) {
if (cond) return true;
for (std::size_t i = 1; i < N; ++i)
if (pred(static_cast<Xs&&>(xs)[i]))
return true;
return false;
}
template <typename Xs, typename Pred>
static constexpr auto
any_of_helper(hana::true_, Xs&& , Pred&&)
{ return hana::true_c; }
template <typename Xs, typename Pred>
static constexpr auto
any_of_helper(hana::false_, Xs&&, Pred&&)
{ return hana::false_c; }
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
auto cond = hana::if_(pred(static_cast<Xs&&>(xs)[0]), hana::true_c,
hana::false_c);
return any_of_helper(cond, static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
};
template <typename S>
struct any_of_impl<S, when<hana::Struct<S>::value>> {
template <typename X, typename Pred>
static constexpr decltype(auto) apply(X const&, Pred&& pred) {
return hana::any_of(hana::accessors<S>(),
hana::compose(static_cast<Pred&&>(pred), hana::first));
}
};
}}
# 16 "/usr/include/boost/hana/all_of.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto all_of_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using AllOf = ::std::conditional_t< (hana::Searchable<S>::value), all_of_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::all_of(xs, pred) requires 'xs' to be a Searchable");
return AllOf::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct all_of_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::not_(hana::any_of(static_cast<Xs&&>(xs),
hana::compose(hana::not_, static_cast<Pred&&>(pred))));
}
};
}}
# 17 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 1 "/usr/include/boost/hana/and.hpp" 1 3 4
# 22 "/usr/include/boost/hana/and.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) and_t::operator()(X&& x, Y&& y) const {
using Bool = typename hana::tag_of<X>::type;
using And = ::std::conditional_t< (hana::Logical<Bool>::value), and_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::and_(x, y) requires 'x' to be a Logical");
return And::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename X, typename ...Y>
constexpr decltype(auto) and_t::operator()(X&& x, Y&& ...y) const {
return detail::variadic::foldl1(
*this,
static_cast<X&&>(x),
static_cast<Y&&>(y)...
);
}
template <typename L, bool condition>
struct and_impl<L, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::if_(x, static_cast<Y&&>(y), x);
}
};
}}
# 18 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/comparable.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/comparable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/comparable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/comparable.hpp" 3 4
namespace boost { namespace hana {
# 157 "/usr/include/boost/hana/fwd/concept/comparable.hpp" 3 4
template <typename T>
struct Comparable;
}}
# 14 "/usr/include/boost/hana/concept/comparable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/equal.hpp" 1 3 4
# 19 "/usr/include/boost/hana/concept/comparable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T>
struct Comparable {
using Tag = typename tag_of<T>::type;
static constexpr bool value = !is_default<equal_impl<Tag, Tag>>::value;
};
}}
# 21 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 31 "/usr/include/boost/hana/equal.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/concepts.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/concepts.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename T, typename U = T, typename = void>
struct EqualityComparable : std::false_type { };
template <typename T>
struct EqualityComparable<T, T, detail::void_t<
decltype(static_cast<T&&>(*(T*)0) == static_cast<T&&>(*(T*)0) ? 0:0),
decltype(static_cast<T&&>(*(T*)0) != static_cast<T&&>(*(T*)0) ? 0:0)
>> : std::true_type { };
template <typename T, typename U>
struct EqualityComparable<T, U, typename std::enable_if<
!std::is_same<T, U>{}, detail::void_t<
decltype(static_cast<T&&>(*(T*)0) == static_cast<U&&>(*(U*)0) ? 0:0),
decltype(static_cast<U&&>(*(U*)0) == static_cast<T&&>(*(T*)0) ? 0:0),
decltype(static_cast<T&&>(*(T*)0) != static_cast<U&&>(*(U*)0) ? 0:0),
decltype(static_cast<U&&>(*(U*)0) != static_cast<T&&>(*(T*)0) ? 0:0),
typename detail::std_common_type<T, U>::type
>>::type> : std::integral_constant<bool,
EqualityComparable<T>::value &&
EqualityComparable<U>::value &&
EqualityComparable<typename detail::std_common_type<T, U>::type>::value
> { };
template <typename T, typename U = T, typename = void>
struct LessThanComparable : std::false_type { };
template <typename T>
struct LessThanComparable<T, T, detail::void_t<
decltype(static_cast<T&&>(*(T*)0) < static_cast<T&&>(*(T*)0) ? 0:0)
>> : std::true_type { };
template <typename T, typename U>
struct LessThanComparable<T, U, std::enable_if_t<
!std::is_same<T, U>::value,
detail::void_t<
decltype(static_cast<T&&>(*(T*)0) < static_cast<U&&>(*(U*)0) ? 0:0),
decltype(static_cast<U&&>(*(U*)0) < static_cast<T&&>(*(T*)0) ? 0:0),
typename detail::std_common_type<T, U>::type
>
>>
: std::integral_constant<bool,
LessThanComparable<T>::value &&
LessThanComparable<U>::value &&
LessThanComparable<typename detail::std_common_type<T, U>::type>::value
>
{ };
} }}
# 32 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/dependent_on.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/dependent_on.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <bool dummy, typename T>
struct dependent_on { using type = T; };
template <bool dummy, typename T>
using dependent_on_t = typename dependent_on<dummy, T>::type;
} }}
# 33 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/has_common_embedding.hpp" 1 3 4
# 21 "/usr/include/boost/hana/detail/has_common_embedding.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <template <typename...> class Concept, typename T, typename U, typename = void>
struct has_common_embedding_impl : std::false_type { };
template <template <typename...> class Concept, typename T, typename U>
struct has_common_embedding_impl<Concept, T, U, detail::void_t<
typename common<T, U>::type
>> {
using Common = typename common<T, U>::type;
using type = std::integral_constant<bool,
Concept<T>::value &&
Concept<U>::value &&
Concept<Common>::value &&
is_embedded<T, Common>::value &&
is_embedded<U, Common>::value
>;
};
template <template <typename...> class Concept, typename T, typename U>
using has_common_embedding = typename has_common_embedding_impl<Concept, T, U>::type;
template <template <typename...> class Concept, typename T, typename U>
struct has_nontrivial_common_embedding_impl
: has_common_embedding_impl<Concept, T, U>
{ };
template <template <typename...> class Concept, typename T>
struct has_nontrivial_common_embedding_impl<Concept, T, T>
: std::false_type
{ };
template <template <typename...> class Concept, typename T, typename U>
using has_nontrivial_common_embedding =
typename has_nontrivial_common_embedding_impl<Concept, T, U>::type;
} }}
# 34 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/nested_to.hpp" 1 3 4
# 19 "/usr/include/boost/hana/detail/nested_to.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
template <typename X>
constexpr decltype(auto) nested_to_t<Algorithm>::operator()(X&& x) const
{ return hana::partial(Algorithm{}, static_cast<X&&>(x)); }
} }}
# 35 "/usr/include/boost/hana/equal.hpp" 2 3 4
# 44 "/usr/include/boost/hana/equal.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr auto equal_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Equal = equal_impl<T, U>;
return Equal::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct equal_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr auto apply(X const&, Y const&) {
using T_ = detail::dependent_on_t<sizeof(X) == 1, T>;
static_assert(!hana::is_convertible<T_, U>::value &&
!hana::is_convertible<U, T_>::value,
"No default implementation of hana::equal is provided for related "
"types that can't be safely embedded into a common type, because "
"those are most likely programming errors. If this is really what "
"you want, you can manually convert both objects to a common "
"Comparable type before performing the comparison.");
return hana::false_c;
}
};
template <typename T, typename U>
struct equal_impl<T, U, when<
detail::has_nontrivial_common_embedding<Comparable, T, U>::value &&
!detail::EqualityComparable<T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr auto apply(X&& x, Y&& y) {
return hana::equal(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T, typename U>
struct equal_impl<T, U, when<detail::EqualityComparable<T, U>::value>> {
template <typename X, typename Y>
static constexpr auto apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) == static_cast<Y&&>(y); }
};
template <typename C>
struct equal_impl<C, C, when<
hana::Constant<C>::value &&
Comparable<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr auto apply(X const&, Y const&) {
constexpr auto eq = hana::equal(hana::value<X>(), hana::value<Y>());
constexpr bool truth_value = hana::if_(eq, true, false);
return hana::bool_c<truth_value>;
}
};
template <typename T, typename U>
struct equal_impl<T, U, when<hana::Product<T>::value && hana::Product<U>::value>> {
template <typename X, typename Y>
static constexpr auto apply(X const& x, Y const& y) {
return hana::and_(
hana::equal(hana::first(x), hana::first(y)),
hana::equal(hana::second(x), hana::second(y))
);
}
};
namespace detail {
template <typename Xs, typename Ys, std::size_t Length>
struct compare_finite_sequences {
Xs const& xs;
Ys const& ys;
template <std::size_t i>
constexpr auto apply(hana::false_, hana::true_) const {
return compare_finite_sequences::apply<i+1>(
hana::bool_c<i+1 == Length>,
hana::if_(hana::equal(hana::at_c<i>(xs), hana::at_c<i>(ys)),
hana::true_c, hana::false_c)
);
}
template <std::size_t i>
constexpr auto apply(hana::false_, hana::false_) const
{ return hana::false_c; }
template <std::size_t i, typename Result>
constexpr auto apply(hana::true_, Result r) const
{ return r; }
template <std::size_t i>
constexpr bool apply(hana::false_, bool b) const {
return b && compare_finite_sequences::apply<i+1>(
hana::bool_c<i+1 == Length>,
hana::if_(hana::equal(hana::at_c<i>(xs), hana::at_c<i>(ys)),
hana::true_c, hana::false_c)
);
}
};
}
template <typename T, typename U>
struct equal_impl<T, U, when<Sequence<T>::value && hana::Sequence<U>::value>> {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs const& xs, Ys const& ys) {
constexpr std::size_t xs_size = decltype(hana::length(xs))::value;
constexpr std::size_t ys_size = decltype(hana::length(ys))::value;
detail::compare_finite_sequences<Xs, Ys, xs_size> comp{xs, ys};
return comp.template apply<0>(hana::bool_c<xs_size == 0>,
hana::bool_c<xs_size == ys_size>);
}
};
namespace detail {
template <typename X, typename Y>
struct compare_struct_members {
X const& x;
Y const& y;
template <typename Member>
constexpr auto operator()(Member&& member) const {
auto accessor = hana::second(static_cast<Member&&>(member));
return hana::equal(accessor(x), accessor(y));
}
};
}
template <typename S>
struct equal_impl<S, S, when<hana::Struct<S>::value>> {
template <typename X, typename Y>
static constexpr auto apply(X const& x, Y const& y) {
return hana::all_of(hana::accessors<S>(),
detail::compare_struct_members<X, Y>{x, y});
}
};
}}
# 20 "/usr/include/boost/hana/adjust.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Value, typename F>
constexpr auto adjust_t::operator()(Xs&& xs, Value&& value, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using Adjust = ::std::conditional_t< (hana::Functor<S>::value), adjust_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::adjust(xs, value, f) requires 'xs' to be a Functor");
return Adjust::apply(static_cast<Xs&&>(xs),
static_cast<Value&&>(value),
static_cast<F&&>(f));
}
template <typename Fun, bool condition>
struct adjust_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename Value, typename F>
static constexpr auto apply(Xs&& xs, Value&& value, F&& f) {
return hana::adjust_if(
static_cast<Xs&&>(xs),
hana::equal.to(static_cast<Value&&>(value)),
static_cast<F&&>(f)
);
}
};
}}
# 62 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/all.hpp" 1 3 4
# 13 "/usr/include/boost/hana/all.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/all.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/all.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/all.hpp" 3 4
template <typename S, typename = void>
struct all_impl : all_impl<S, when<true>> { };
struct all_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr all_t all{};
}}
# 14 "/usr/include/boost/hana/all.hpp" 2 3 4
# 22 "/usr/include/boost/hana/all.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto all_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using All = ::std::conditional_t< (hana::Searchable<S>::value), all_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::all(xs) requires 'xs' to be a Searchable");
return All::apply(static_cast<Xs&&>(xs));
}
template <typename S, bool condition>
struct all_impl<S, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return hana::all_of(static_cast<Xs&&>(xs), hana::id); }
};
}}
# 64 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/any.hpp" 1 3 4
# 13 "/usr/include/boost/hana/any.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/any.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/any.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/any.hpp" 3 4
template <typename S, typename = void>
struct any_impl : any_impl<S, when<true>> { };
struct any_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr any_t any{};
}}
# 14 "/usr/include/boost/hana/any.hpp" 2 3 4
# 22 "/usr/include/boost/hana/any.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto any_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Any = ::std::conditional_t< (hana::Searchable<S>::value), any_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::any(xs) requires 'xs' to be a Searchable");
return Any::apply(static_cast<Xs&&>(xs));
}
template <typename S, bool condition>
struct any_impl<S, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return hana::any_of(static_cast<Xs&&>(xs), hana::id); }
};
}}
# 67 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/ap.hpp" 1 3 4
# 15 "/usr/include/boost/hana/ap.hpp" 3 4
# 1 "/usr/include/boost/hana/chain.hpp" 1 3 4
# 15 "/usr/include/boost/hana/chain.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/monad.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/monad.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/monad.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/monad.hpp" 3 4
namespace boost { namespace hana {
# 194 "/usr/include/boost/hana/fwd/concept/monad.hpp" 3 4
template <typename M>
struct Monad;
}}
# 14 "/usr/include/boost/hana/concept/monad.hpp" 2 3 4
# 1 "/usr/include/boost/hana/chain.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concept/monad.hpp" 2 3 4
# 1 "/usr/include/boost/hana/flatten.hpp" 1 3 4
# 15 "/usr/include/boost/hana/flatten.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/monad.hpp" 1 3 4
# 16 "/usr/include/boost/hana/flatten.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/unpack_flatten.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/unpack_flatten.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/array.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/array.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename N>
constexpr N factorial(N n) {
N result = 1;
while (n != 0)
result *= n--;
return result;
}
template <typename T, std::size_t Size>
struct array {
T elems_[Size > 0 ? Size : 1];
constexpr T& operator[](std::size_t n)
{ return elems_[n]; }
constexpr T const& operator[](std::size_t n) const
{ return elems_[n]; }
constexpr std::size_t size() const noexcept
{ return Size; }
constexpr T* begin() noexcept { return elems_; }
constexpr T const* begin() const noexcept { return elems_; }
constexpr T* end() noexcept { return elems_ + Size; }
constexpr T const* end() const noexcept { return elems_ + Size; }
constexpr array reverse() const {
array result = *this;
detail::reverse(result.begin(), result.end());
return result;
}
template <typename BinaryPred>
constexpr auto permutations(BinaryPred pred) const {
array<array<T, Size>, detail::factorial(Size)> result{};
auto out = result.begin();
array copy = *this;
do *out++ = copy;
while (detail::next_permutation(copy.begin(), copy.end(), pred));
return result;
}
constexpr auto permutations() const
{ return this->permutations(hana::_ < hana::_); }
template <typename BinaryPred>
constexpr auto sort(BinaryPred pred) const {
array result = *this;
detail::sort(result.begin(), result.end(), pred);
return result;
}
constexpr auto sort() const
{ return this->sort(hana::_ < hana::_); }
template <typename U>
constexpr auto iota(U value) const {
array result = *this;
detail::iota(result.begin(), result.end(), value);
return result;
}
};
template <typename T, std::size_t M, typename U, std::size_t N>
constexpr bool operator==(array<T, M> a, array<U, N> b)
{ return M == N && detail::equal(a.begin(), a.end(), b.begin(), b.end()); }
template <typename T, std::size_t M, typename U, std::size_t N>
constexpr bool operator<(array<T, M> a, array<U, N> b) {
return M < N || detail::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
}
} }}
# 17 "/usr/include/boost/hana/detail/unpack_flatten.hpp" 2 3 4
namespace boost { namespace hana { namespace detail {
template <std::size_t ...Lengths>
struct flatten_indices {
static constexpr std::size_t lengths[] = {Lengths..., 0};
static constexpr auto flat_length =
detail::accumulate(lengths, lengths + sizeof...(Lengths), 0);
template <bool Inner>
static constexpr auto compute() {
detail::array<std::size_t, flat_length> indices{};
for (std::size_t index = 0, i = 0; i < sizeof...(Lengths); ++i)
for (std::size_t j = 0; j < lengths[i]; ++j, ++index)
indices[index] = (Inner ? i : j);
return indices;
}
static constexpr auto inner = compute<true>();
static constexpr auto outer = compute<false>();
template <typename Xs, typename F, std::size_t ...i>
static constexpr decltype(auto)
apply(Xs&& xs, F&& f, std::index_sequence<i...>) {
return static_cast<F&&>(f)(
hana::at_c<outer[i]>(hana::at_c<inner[i]>(
static_cast<Xs&&>(xs)
))...
);
}
};
struct make_flatten_indices {
template <typename ...Xs>
auto operator()(Xs const& ...xs) const -> detail::flatten_indices<
decltype(hana::length(xs))::value...
>;
};
template <typename Xs, typename F>
constexpr decltype(auto) unpack_flatten(Xs&& xs, F&& f) {
using Indices = decltype(hana::unpack(xs, make_flatten_indices{}));
return Indices::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f),
std::make_index_sequence<Indices::flat_length>{});
}
} }}
# 21 "/usr/include/boost/hana/flatten.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto flatten_t::operator()(Xs&& xs) const {
using M = typename hana::tag_of<Xs>::type;
using Flatten = ::std::conditional_t< (hana::Monad<M>::value), flatten_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Monad<M>::value,
"hana::flatten(xs) requires 'xs' to be a Monad");
return Flatten::apply(static_cast<Xs&&>(xs));
}
template <typename M, bool condition>
struct flatten_impl<M, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return hana::chain(static_cast<Xs&&>(xs), hana::id); }
};
template <typename S>
struct flatten_impl<S, when<Sequence<S>::value>> {
template <typename Xs>
static constexpr auto apply(Xs&& xs) {
return detail::unpack_flatten(static_cast<Xs&&>(xs), hana::make<S>);
}
};
}}
# 20 "/usr/include/boost/hana/concept/monad.hpp" 2 3 4
namespace boost { namespace hana {
template <typename M>
struct Monad {
using Tag = typename tag_of<M>::type;
static constexpr bool value = !is_default<flatten_impl<Tag>>::value ||
!is_default<chain_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/chain.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr decltype(auto) chain_t::operator()(Xs&& xs, F&& f) const {
using M = typename hana::tag_of<Xs>::type;
using Chain = ::std::conditional_t< (hana::Monad<M>::value), chain_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Monad<M>::value,
"hana::chain(xs, f) requires 'xs' to be a Monad");
return Chain::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
template <typename M, bool condition>
struct chain_impl<M, when<condition>> : default_ {
template <typename Xs, typename F>
static constexpr auto apply(Xs&& xs, F&& f) {
return hana::flatten(hana::transform(static_cast<Xs&&>(xs),
static_cast<F&&>(f)));
}
};
}}
# 16 "/usr/include/boost/hana/ap.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/applicative.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/applicative.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/applicative.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/applicative.hpp" 3 4
namespace boost { namespace hana {
# 113 "/usr/include/boost/hana/fwd/concept/applicative.hpp" 3 4
template <typename A>
struct Applicative;
}}
# 14 "/usr/include/boost/hana/concept/applicative.hpp" 2 3 4
# 1 "/usr/include/boost/hana/ap.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concept/applicative.hpp" 2 3 4
# 1 "/usr/include/boost/hana/lift.hpp" 1 3 4
# 15 "/usr/include/boost/hana/lift.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/applicative.hpp" 1 3 4
# 16 "/usr/include/boost/hana/lift.hpp" 2 3 4
namespace boost { namespace hana {
template <typename A>
struct lift_t {
static_assert(hana::Applicative<A>::value,
"hana::lift<A> requires 'A' to be an Applicative");
template <typename X>
constexpr auto operator()(X&& x) const {
using Lift = ::std::conditional_t< (hana::Applicative<A>::value), lift_impl<A>, ::boost::hana::deleted_implementation >
;
return Lift::apply(static_cast<X&&>(x));
}
};
template <typename A, bool condition>
struct lift_impl<A, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...args) = delete;
};
template <typename S>
struct lift_impl<S, when<Sequence<S>::value>> {
template <typename X>
static constexpr decltype(auto) apply(X&& x)
{ return hana::make<S>(static_cast<X&&>(x)); }
};
}}
# 20 "/usr/include/boost/hana/concept/applicative.hpp" 2 3 4
namespace boost { namespace hana {
template <typename A>
struct Applicative {
using Tag = typename tag_of<A>::type;
static constexpr bool value = !is_default<ap_impl<Tag>>::value &&
!is_default<lift_impl<Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/ap.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/curry.hpp" 1 3 4
# 23 "/usr/include/boost/hana/functional/curry.hpp" 3 4
namespace boost { namespace hana {
# 101 "/usr/include/boost/hana/functional/curry.hpp" 3 4
template <std::size_t n, typename F>
struct curry_t;
template <std::size_t n>
struct make_curry_t {
template <typename F>
constexpr curry_t<n, typename detail::decay<F>::type>
operator()(F&& f) const { return {static_cast<F&&>(f)}; }
};
template <std::size_t n>
constexpr make_curry_t<n> curry{};
namespace curry_detail {
template <std::size_t n>
constexpr make_curry_t<n> curry_or_call{};
template <>
constexpr auto curry_or_call<0> = apply;
}
template <std::size_t n, typename F>
struct curry_t {
F f;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const& {
static_assert(sizeof...(x) <= n,
"too many arguments provided to boost::hana::curry");
return curry_detail::curry_or_call<n - sizeof...(x)>(
partial(f, static_cast<X&&>(x)...)
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) & {
static_assert(sizeof...(x) <= n,
"too many arguments provided to boost::hana::curry");
return curry_detail::curry_or_call<n - sizeof...(x)>(
partial(f, static_cast<X&&>(x)...)
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) && {
static_assert(sizeof...(x) <= n,
"too many arguments provided to boost::hana::curry");
return curry_detail::curry_or_call<n - sizeof...(x)>(
partial(std::move(f), static_cast<X&&>(x)...)
);
}
};
template <typename F>
struct curry_t<0, F> {
F f;
constexpr decltype(auto) operator()() const&
{ return f(); }
constexpr decltype(auto) operator()() &
{ return f(); }
constexpr decltype(auto) operator()() &&
{ return std::move(f)(); }
};
}}
# 22 "/usr/include/boost/hana/ap.hpp" 2 3 4
namespace boost { namespace hana {
template <typename A, bool condition>
struct ap_impl<A, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...args) = delete;
};
template <typename F, typename X>
constexpr decltype(auto) ap_t::operator()(F&& f, X&& x) const {
using Function = typename hana::tag_of<F>::type;
using Value = typename hana::tag_of<X>::type;
using Ap = ::std::conditional_t< (hana::Applicative<Function>::value && hana::Applicative<Value>::value), ap_impl<Function>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Applicative<Function>::value,
"hana::ap(f, x) requires 'f' to be an Applicative");
static_assert(hana::Applicative<Value>::value,
"hana::ap(f, x) requires 'x' to be an Applicative");
return Ap::apply(static_cast<F&&>(f), static_cast<X&&>(x));
}
template <typename F, typename ...Xs>
constexpr decltype(auto) ap_t::operator()(F&& f, Xs&& ...xs) const {
static_assert(sizeof...(xs) >= 1,
"hana::ap must be called with at least two arguments");
return detail::variadic::foldl1(
*this,
hana::transform(static_cast<F&&>(f), hana::curry<sizeof...(xs)>),
static_cast<Xs&&>(xs)...
);
}
template <typename S>
struct ap_impl<S, when<Sequence<S>::value>> {
template <typename F, typename X>
static constexpr decltype(auto) apply(F&& f, X&& x) {
return hana::chain(
static_cast<F&&>(f),
hana::partial(hana::transform, static_cast<X&&>(x))
);
}
};
}}
# 69 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/append.hpp" 1 3 4
# 13 "/usr/include/boost/hana/append.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/append.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/append.hpp" 3 4
namespace boost { namespace hana {
# 56 "/usr/include/boost/hana/fwd/append.hpp" 3 4
template <typename M, typename = void>
struct append_impl : append_impl<M, when<true>> { };
struct append_t {
template <typename Xs, typename X>
constexpr auto operator()(Xs&& xs, X&& x) const;
};
constexpr append_t append{};
}}
# 14 "/usr/include/boost/hana/append.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concat.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concat.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/monad_plus.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/monad_plus.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/monad_plus.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/monad_plus.hpp" 3 4
namespace boost { namespace hana {
# 85 "/usr/include/boost/hana/fwd/concept/monad_plus.hpp" 3 4
template <typename M>
struct MonadPlus;
}}
# 14 "/usr/include/boost/hana/concept/monad_plus.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concat.hpp" 1 3 4
# 16 "/usr/include/boost/hana/concept/monad_plus.hpp" 2 3 4
# 1 "/usr/include/boost/hana/empty.hpp" 1 3 4
# 15 "/usr/include/boost/hana/empty.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/monad_plus.hpp" 1 3 4
# 16 "/usr/include/boost/hana/empty.hpp" 2 3 4
namespace boost { namespace hana {
template <typename M>
struct empty_t {
static_assert(hana::MonadPlus<M>::value,
"hana::empty<M>() requires 'M' to be a MonadPlus");
constexpr auto operator()() const {
using Empty = ::std::conditional_t< (hana::MonadPlus<M>::value), empty_impl<M>, ::boost::hana::deleted_implementation >
;
return Empty::apply();
}
};
template <typename M, bool condition>
struct empty_impl<M, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S>
struct empty_impl<S, when<Sequence<S>::value>> {
static constexpr auto apply() {
return hana::make<S>();
}
};
}}
# 20 "/usr/include/boost/hana/concept/monad_plus.hpp" 2 3 4
namespace boost { namespace hana {
template <typename M>
struct MonadPlus {
using Tag = typename tag_of<M>::type;
static constexpr bool value = !is_default<concat_impl<Tag>>::value &&
!is_default<empty_impl<Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/concat.hpp" 2 3 4
# 28 "/usr/include/boost/hana/concat.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto concat_t::operator()(Xs&& xs, Ys&& ys) const {
using M = typename hana::tag_of<Xs>::type;
using Concat = ::std::conditional_t< (hana::MonadPlus<M>::value && std::is_same<typename hana::tag_of<Ys>::type, M>::value), concat_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(std::is_same<typename hana::tag_of<Ys>::type, M>::value,
"hana::concat(xs, ys) requires 'xs' and 'ys' to have the same tag");
static_assert(hana::MonadPlus<M>::value,
"hana::concat(xs, ys) requires 'xs' and 'ys' to be MonadPlus");
return Concat::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename M, bool condition>
struct concat_impl<M, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S>
struct concat_impl<S, when<Sequence<S>::value>> {
template <typename Xs, typename Ys, std::size_t ...xi, std::size_t ...yi>
static constexpr auto
concat_helper(Xs&& xs, Ys&& ys, std::index_sequence<xi...>,
std::index_sequence<yi...>)
{
return hana::make<S>(
hana::at_c<xi>(static_cast<Xs&&>(xs))...,
hana::at_c<yi>(static_cast<Ys&&>(ys))...
);
}
template <typename Xs, typename Ys>
static constexpr auto apply(Xs&& xs, Ys&& ys) {
constexpr std::size_t xi = decltype(hana::length(xs))::value;
constexpr std::size_t yi = decltype(hana::length(ys))::value;
return concat_helper(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys),
std::make_index_sequence<xi>{},
std::make_index_sequence<yi>{});
}
};
}}
# 17 "/usr/include/boost/hana/append.hpp" 2 3 4
# 29 "/usr/include/boost/hana/append.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename X>
constexpr auto append_t::operator()(Xs&& xs, X&& x) const {
using M = typename hana::tag_of<Xs>::type;
using Append = ::std::conditional_t< (hana::MonadPlus<M>::value), append_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::append(xs, x) requires 'xs' to be a MonadPlus");
return Append::apply(static_cast<Xs&&>(xs), static_cast<X&&>(x));
}
template <typename M, bool condition>
struct append_impl<M, when<condition>> : default_ {
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
return hana::concat(static_cast<Xs&&>(xs),
hana::lift<M>(static_cast<X&&>(x)));
}
};
template <typename S>
struct append_impl<S, when<Sequence<S>::value>> {
template <typename Xs, typename X, std::size_t ...i>
static constexpr auto append_helper(Xs&& xs, X&& x, std::index_sequence<i...>) {
return hana::make<S>(
hana::at_c<i>(static_cast<Xs&&>(xs))..., static_cast<X&&>(x)
);
}
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
return append_helper(static_cast<Xs&&>(xs), static_cast<X&&>(x),
std::make_index_sequence<N>{});
}
};
}}
# 70 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/assert.hpp" 1 3 4
# 19 "/usr/include/boost/hana/assert.hpp" 3 4
# 1 "/usr/include/c++/6/cstdio" 1 3 4
# 39 "/usr/include/c++/6/cstdio" 3 4
# 40 "/usr/include/c++/6/cstdio" 3
# 1 "/usr/include/stdio.h" 1 3 4
# 29 "/usr/include/stdio.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 34 "/usr/include/stdio.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
# 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_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 __quad_t;
typedef unsigned long int __u_quad_t;
# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef int __daddr_t;
typedef int __key_t;
typedef int __clockid_t;
typedef void * __timer_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;
typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;
typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;
typedef long int __fsword_t;
typedef long int __ssize_t;
typedef long int __syscall_slong_t;
typedef unsigned long int __syscall_ulong_t;
typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
typedef long int __intptr_t;
typedef unsigned int __socklen_t;
# 36 "/usr/include/stdio.h" 2 3 4
# 44 "/usr/include/stdio.h" 3 4
struct _IO_FILE;
typedef struct _IO_FILE FILE;
# 64 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 74 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 31 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 15 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 16 "/usr/include/_G_config.h" 2 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 82 "/usr/include/wchar.h" 3 4
typedef struct
{
int __count;
union
{
unsigned int __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 21 "/usr/include/_G_config.h" 2 3 4
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 32 "/usr/include/libio.h" 2 3 4
# 49 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h" 1 3 4
# 40 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 50 "/usr/include/libio.h" 2 3 4
# 144 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 173 "/usr/include/libio.h" 3 4
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
# 241 "/usr/include/libio.h" 3 4
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _flags2;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 289 "/usr/include/libio.h" 3 4
__off64_t _offset;
void *__pad1;
void *__pad2;
void *__pad3;
void *__pad4;
size_t __pad5;
int _mode;
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 333 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file;
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
extern "C" {
extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);
# 429 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp);
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 459 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 521 "/usr/include/libio.h" 3 4
}
# 75 "/usr/include/stdio.h" 2 3 4
typedef __gnuc_va_list va_list;
# 90 "/usr/include/stdio.h" 3 4
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __ssize_t ssize_t;
typedef _G_fpos_t fpos_t;
typedef _G_fpos64_t fpos64_t;
# 166 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4
# 167 "/usr/include/stdio.h" 2 3 4
extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;
extern int remove (const char *__filename) throw ();
extern int rename (const char *__old, const char *__new) throw ();
extern int renameat (int __oldfd, const char *__old, int __newfd,
const char *__new) throw ();
extern FILE *tmpfile (void) ;
# 207 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile64 (void) ;
extern char *tmpnam (char *__s) throw () ;
extern char *tmpnam_r (char *__s) throw () ;
# 229 "/usr/include/stdio.h" 3 4
extern char *tempnam (const char *__dir, const char *__pfx)
throw () __attribute__ ((__malloc__)) ;
extern int fclose (FILE *__stream);
extern int fflush (FILE *__stream);
# 254 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 264 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);
extern FILE *fopen (const char *__restrict __filename,
const char *__restrict __modes) ;
extern FILE *freopen (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) ;
# 297 "/usr/include/stdio.h" 3 4
extern FILE *fopen64 (const char *__restrict __filename,
const char *__restrict __modes) ;
extern FILE *freopen64 (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) ;
extern FILE *fdopen (int __fd, const char *__modes) throw () ;
extern FILE *fopencookie (void *__restrict __magic_cookie,
const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) throw () ;
extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
throw () ;
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
const char *__restrict __format, ...);
extern int printf (const char *__restrict __format, ...);
extern int sprintf (char *__restrict __s,
const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
__gnuc_va_list __arg);
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
extern int vsprintf (char *__restrict __s, const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
extern int __asprintf (char **__restrict __ptr,
const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int asprintf (char **__restrict __ptr,
const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int vdprintf (int __fd, const char *__restrict __fmt,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, const char *__restrict __fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream,
const char *__restrict __format, ...) ;
extern int scanf (const char *__restrict __format, ...) ;
extern int sscanf (const char *__restrict __s,
const char *__restrict __format, ...) throw ();
# 465 "/usr/include/stdio.h" 3 4
extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 2, 0))) ;
extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 1, 0))) ;
extern int vsscanf (const char *__restrict __s,
const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
# 524 "/usr/include/stdio.h" 3 4
extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);
extern int getchar (void);
# 552 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 563 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);
extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);
extern int putchar (int __c);
# 596 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);
extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);
extern int getw (FILE *__stream);
extern int putw (int __w, FILE *__stream);
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
;
# 642 "/usr/include/stdio.h" 3 4
# 651 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) ;
# 667 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) ;
extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
extern int puts (const char *__s);
extern int ungetc (int __c, FILE *__stream);
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s);
# 728 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (const char *__restrict __s,
FILE *__restrict __stream);
# 739 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream);
extern int fseek (FILE *__stream, long int __off, int __whence);
extern long int ftell (FILE *__stream) ;
extern void rewind (FILE *__stream);
# 775 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);
extern __off_t ftello (FILE *__stream) ;
# 794 "/usr/include/stdio.h" 3 4
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
extern int fsetpos (FILE *__stream, const fpos_t *__pos);
# 817 "/usr/include/stdio.h" 3 4
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw () ;
extern int ferror (FILE *__stream) throw () ;
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw () ;
extern int ferror_unlocked (FILE *__stream) throw () ;
extern void perror (const char *__s);
# 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4
# 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern const char *const sys_errlist[];
extern int _sys_nerr;
extern const char *const _sys_errlist[];
# 856 "/usr/include/stdio.h" 2 3 4
extern int fileno (FILE *__stream) throw () ;
extern int fileno_unlocked (FILE *__stream) throw () ;
# 874 "/usr/include/stdio.h" 3 4
extern FILE *popen (const char *__command, const char *__modes) ;
extern int pclose (FILE *__stream);
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s);
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack,
const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
const char *__restrict __format,
__gnuc_va_list __args)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw () ;
extern void funlockfile (FILE *__stream) throw ();
# 944 "/usr/include/stdio.h" 3 4
}
# 43 "/usr/include/c++/6/cstdio" 2 3
# 96 "/usr/include/c++/6/cstdio" 3
namespace std
{
using ::FILE;
using ::fpos_t;
using ::clearerr;
using ::fclose;
using ::feof;
using ::ferror;
using ::fflush;
using ::fgetc;
using ::fgetpos;
using ::fgets;
using ::fopen;
using ::fprintf;
using ::fputc;
using ::fputs;
using ::fread;
using ::freopen;
using ::fscanf;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::fwrite;
using ::getc;
using ::getchar;
using ::perror;
using ::printf;
using ::putc;
using ::putchar;
using ::puts;
using ::remove;
using ::rename;
using ::rewind;
using ::scanf;
using ::setbuf;
using ::setvbuf;
using ::sprintf;
using ::sscanf;
using ::tmpfile;
using ::tmpnam;
using ::ungetc;
using ::vfprintf;
using ::vprintf;
using ::vsprintf;
}
# 157 "/usr/include/c++/6/cstdio" 3
namespace __gnu_cxx
{
# 175 "/usr/include/c++/6/cstdio" 3
using ::snprintf;
using ::vfscanf;
using ::vscanf;
using ::vsnprintf;
using ::vsscanf;
}
namespace std
{
using ::__gnu_cxx::snprintf;
using ::__gnu_cxx::vfscanf;
using ::__gnu_cxx::vscanf;
using ::__gnu_cxx::vsnprintf;
using ::__gnu_cxx::vsscanf;
}
# 20 "/usr/include/boost/hana/assert.hpp" 2 3 4
# 1 "/usr/include/c++/6/cstdlib" 1 3 4
# 39 "/usr/include/c++/6/cstdlib" 3 4
# 40 "/usr/include/c++/6/cstdlib" 3
# 75 "/usr/include/c++/6/cstdlib" 3
# 1 "/usr/include/stdlib.h" 1 3 4
# 32 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 33 "/usr/include/stdlib.h" 2 3 4
extern "C" {
# 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4
# 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4
typedef enum
{
P_ALL,
P_PID,
P_PGID
} idtype_t;
# 42 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4
# 43 "/usr/include/stdlib.h" 2 3 4
# 56 "/usr/include/stdlib.h" 3 4
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 100 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) throw () ;
extern double atof (const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1)));
extern float strtof (const char *__restrict __nptr,
char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1)));
extern long double strtold (const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1)));
extern long int strtol (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
extern unsigned long int strtoul (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoq (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtouq (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoll (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtoull (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1)));
# 196 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/xlocale.h" 1 3 4
# 27 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{
struct __locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
const char *__names[13];
} *__locale_t;
typedef __locale_t locale_t;
# 197 "/usr/include/stdlib.h" 2 3 4
extern long int strtol_l (const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4)));
extern unsigned long int strtoul_l (const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4)));
__extension__
extern long long int strtoll_l (const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4)));
__extension__
extern unsigned long long int strtoull_l (const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4)));
extern double strtod_l (const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3)));
extern float strtof_l (const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3)));
extern long double strtold_l (const char *__restrict __nptr,
char **__restrict __endptr,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3)));
# 266 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) throw () ;
extern long int a64l (const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4
# 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
extern "C" {
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
# 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
typedef __pid_t pid_t;
typedef __id_t id_t;
# 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 57 "/usr/include/time.h" 3 4
typedef __clock_t clock_t;
# 73 "/usr/include/time.h" 3 4
typedef __time_t time_t;
# 91 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 103 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 216 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 36 "/usr/include/endian.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 2 3 4
# 60 "/usr/include/endian.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
# 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4
# 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4
# 44 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return __builtin_bswap32 (__bsx);
}
# 108 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
return __builtin_bswap64 (__bsx);
}
# 61 "/usr/include/endian.h" 2 3 4
# 217 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4
# 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4
# 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4
# 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4
# 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
typedef __sigset_t sigset_t;
# 1 "/usr/include/time.h" 1 3 4
# 120 "/usr/include/time.h" 3 4
struct timespec
{
__time_t tv_sec;
__syscall_slong_t tv_nsec;
};
# 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
# 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 48 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
# 56 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
typedef long int __fd_mask;
# 66 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
typedef struct
{
__fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 98 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
extern "C" {
# 108 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
# 120 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
# 133 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
}
# 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4
# 24 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4
extern "C" {
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
throw () __attribute__ ((__const__));
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
throw () __attribute__ ((__const__));
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
throw () __attribute__ ((__const__));
# 58 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4
}
# 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 262 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
# 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4
# 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4
# 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;
union pthread_attr_t
{
char __size[56];
long int __align;
};
typedef union pthread_attr_t pthread_attr_t;
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
# 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
unsigned int __nusers;
int __kind;
short __spins;
short __elision;
__pthread_list_t __list;
# 125 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
} __data;
char __size[40];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[4];
int __align;
} pthread_mutexattr_t;
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[48];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[4];
int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
typedef union
{
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __shared;
signed char __rwelision;
unsigned char __pad1[7];
unsigned long int __pad2;
unsigned int __flags;
} __data;
# 220 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
char __size[56];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[8];
long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
char __size[32];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[4];
int __align;
} pthread_barrierattr_t;
# 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
}
# 276 "/usr/include/stdlib.h" 2 3 4
extern long int random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
throw () __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
__extension__ unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern void *calloc (size_t __nmemb, size_t __size)
throw () __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size)
throw () __attribute__ ((__warn_unused_result__));
extern void free (void *__ptr) throw ();
extern void cfree (void *__ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3 4
# 24 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 25 "/usr/include/alloca.h" 2 3 4
extern "C" {
extern void *alloca (size_t __size) throw ();
}
# 454 "/usr/include/stdlib.h" 2 3 4
extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
throw () __attribute__ ((__nonnull__ (1))) ;
extern void *aligned_alloc (size_t __alignment, size_t __size)
throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ;
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" int at_quick_exit (void (*__func) (void))
throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1)));
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
throw () __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *secure_getenv (const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern int setenv (const char *__name, const char *__value, int __replace)
throw () __attribute__ ((__nonnull__ (2)));
extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) throw ();
# 567 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1)));
# 580 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 590 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 602 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 612 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
__attribute__ ((__nonnull__ (1))) ;
# 623 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 634 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 644 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 654 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 666 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
extern int system (const char *__command) ;
extern char *canonicalize_file_name (const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
# 694 "/usr/include/stdlib.h" 3 4
extern char *realpath (const char *__restrict __name,
char *__restrict __resolved) throw () ;
typedef int (*__compar_fn_t) (const void *, const void *);
typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
extern void *bsearch (const void *__key, const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
__attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) throw () __attribute__ ((__const__)) ;
extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
throw () __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
throw () __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
throw () __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
throw () __attribute__ ((__const__)) ;
# 772 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (const char *__s, size_t __n) throw ();
extern int mbtowc (wchar_t *__restrict __pwc,
const char *__restrict __s, size_t __n) throw ();
extern int wctomb (char *__s, wchar_t __wchar) throw ();
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s,
const wchar_t *__restrict __pwcs, size_t __n)
throw ();
extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
# 859 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
char *const *__restrict __tokens,
char **__restrict __valuep)
throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern void setkey (const char *__key) throw () __attribute__ ((__nonnull__ (1)));
extern int posix_openpt (int __oflag) ;
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw () ;
extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern int getpt (void);
extern int getloadavg (double __loadavg[], int __nelem)
throw () __attribute__ ((__nonnull__ (1)));
# 921 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4
# 922 "/usr/include/stdlib.h" 2 3 4
# 934 "/usr/include/stdlib.h" 3 4
}
# 76 "/usr/include/c++/6/cstdlib" 2 3
# 118 "/usr/include/c++/6/cstdlib" 3
extern "C++"
{
namespace std __attribute__ ((__visibility__ ("default")))
{
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::at_quick_exit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::quick_exit;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline long
abs(long __i) { return __builtin_labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
inline long long
abs(long long __x) { return __builtin_llabs (__x); }
# 201 "/usr/include/c++/6/cstdlib" 3
}
# 215 "/usr/include/c++/6/cstdlib" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
using ::lldiv_t;
using ::_Exit;
using ::llabs;
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::lldiv;
# 247 "/usr/include/c++/6/cstdlib" 3
using ::atoll;
using ::strtoll;
using ::strtoull;
using ::strtof;
using ::strtold;
}
namespace std
{
using ::__gnu_cxx::lldiv_t;
using ::__gnu_cxx::_Exit;
using ::__gnu_cxx::llabs;
using ::__gnu_cxx::div;
using ::__gnu_cxx::lldiv;
using ::__gnu_cxx::atoll;
using ::__gnu_cxx::strtof;
using ::__gnu_cxx::strtoll;
using ::__gnu_cxx::strtoull;
using ::__gnu_cxx::strtold;
}
}
# 21 "/usr/include/boost/hana/assert.hpp" 2 3 4
# 71 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/at_key.hpp" 1 3 4
# 13 "/usr/include/boost/hana/at_key.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/at_key.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/at_key.hpp" 3 4
namespace boost { namespace hana {
# 55 "/usr/include/boost/hana/fwd/at_key.hpp" 3 4
template <typename S, typename = void>
struct at_key_impl : at_key_impl<S, when<true>> { };
struct at_key_t {
template <typename Xs, typename Key>
constexpr decltype(auto) operator()(Xs&& xs, Key const& key) const;
};
constexpr at_key_t at_key{};
}}
# 14 "/usr/include/boost/hana/at_key.hpp" 2 3 4
# 23 "/usr/include/boost/hana/at_key.hpp" 3 4
# 1 "/usr/include/boost/hana/find.hpp" 1 3 4
# 22 "/usr/include/boost/hana/find.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Key>
constexpr auto find_t::operator()(Xs&& xs, Key const& key) const {
using S = typename hana::tag_of<Xs>::type;
using Find = ::std::conditional_t< (hana::Searchable<S>::value), find_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::find(xs, key) requires 'xs' to be Searchable");
return Find::apply(static_cast<Xs&&>(xs), key);
}
namespace detail {
template <typename T>
struct equal_to {
T const& t;
template <typename U>
constexpr auto operator()(U const& u) const {
return hana::equal(t, u);
}
};
}
template <typename S, bool condition>
struct find_impl<S, when<condition>> : default_ {
template <typename Xs, typename Key>
static constexpr auto apply(Xs&& xs, Key const& key) {
return hana::find_if(static_cast<Xs&&>(xs),
detail::equal_to<Key>{key});
}
};
}}
# 24 "/usr/include/boost/hana/at_key.hpp" 2 3 4
# 35 "/usr/include/boost/hana/at_key.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Key>
constexpr decltype(auto) at_key_t::operator()(Xs&& xs, Key const& key) const {
using S = typename hana::tag_of<Xs>::type;
using AtKey = ::std::conditional_t< (hana::Searchable<S>::value), at_key_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::at_key(xs, key) requires 'xs' to be Searchable");
return AtKey::apply(static_cast<Xs&&>(xs), key);
}
template <typename S, bool condition>
struct at_key_impl<S, when<condition>> : default_ {
template <typename Xs, typename Key>
static constexpr auto apply(Xs&& xs, Key const& key) {
return hana::find(static_cast<Xs&&>(xs), key).value();
}
};
namespace at_key_detail {
template <typename T>
struct equal_to {
T const& t;
template <typename U>
constexpr auto operator()(U const& u) const {
return hana::equal(t, u);
}
};
template <typename Xs, typename Pred, std::size_t i, std::size_t N, bool Done>
struct advance_until;
template <typename Xs, typename Pred, std::size_t i, std::size_t N>
struct advance_until<Xs, Pred, i, N, false>
: advance_until<Xs, Pred, i + 1, N, static_cast<bool>(detail::decay<decltype(
std::declval<Pred>()(hana::at_c<i>(std::declval<Xs>()))
)>::type::value)>
{ };
template <typename Xs, typename Pred, std::size_t N>
struct advance_until<Xs, Pred, N, N, false> {
template <typename Ys>
static constexpr auto apply(Ys&&) = delete;
};
template <typename Xs, typename Pred, std::size_t i, std::size_t N>
struct advance_until<Xs, Pred, i, N, true> {
template <typename Ys>
static constexpr decltype(auto) apply(Ys&& ys) {
return hana::at_c<i - 1>(static_cast<Ys&&>(ys));
}
};
}
template <typename S>
struct at_key_impl<S, when<hana::Sequence<S>::value>> {
template <typename Xs, typename Key>
static constexpr decltype(auto) apply(Xs&& xs, Key const&) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
using Pred = at_key_detail::equal_to<Key>;
return at_key_detail::advance_until<Xs&&, Pred, 0, N, false>::apply(
static_cast<Xs&&>(xs)
);
}
};
template <typename S>
struct at_key_impl<S, when<hana::Struct<S>::value>> {
template <typename X, typename Key>
static constexpr decltype(auto) apply(X&& x, Key const& key) {
auto accessor = hana::second(*hana::find_if(hana::accessors<S>(),
hana::equal.to(key) ^hana::on^ hana::first
));
return accessor(static_cast<X&&>(x));
}
};
}}
# 73 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/back.hpp" 1 3 4
# 13 "/usr/include/boost/hana/back.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/back.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/back.hpp" 3 4
namespace boost { namespace hana {
# 36 "/usr/include/boost/hana/fwd/back.hpp" 3 4
template <typename It, typename = void>
struct back_impl : back_impl<It, when<true>> { };
struct back_t {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const;
};
constexpr back_t back{};
}}
# 14 "/usr/include/boost/hana/back.hpp" 2 3 4
# 24 "/usr/include/boost/hana/back.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr decltype(auto) back_t::operator()(Xs&& xs) const {
using It = typename hana::tag_of<Xs>::type;
using Back = ::std::conditional_t< (hana::Iterable<It>::value), back_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::back(xs) requires 'xs' to be an Iterable");
return Back::apply(static_cast<Xs&&>(xs));
}
template <typename It, bool condition>
struct back_impl<It, when<condition>> : default_ {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs) {
constexpr std::size_t len = decltype(hana::length(xs))::value;
static_assert(len > 0, "hana::back(xs) requires 'xs' to be non-empty");
return hana::at_c<len - 1>(static_cast<Xs&&>(xs));
}
};
}}
# 74 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/cartesian_product.hpp" 1 3 4
# 13 "/usr/include/boost/hana/cartesian_product.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/cartesian_product.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/cartesian_product.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/cartesian_product.hpp" 3 4
template <typename S, typename = void>
struct cartesian_product_impl : cartesian_product_impl<S, when<true>> { };
struct cartesian_product_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr cartesian_product_t cartesian_product{};
}}
# 14 "/usr/include/boost/hana/cartesian_product.hpp" 2 3 4
# 29 "/usr/include/boost/hana/cartesian_product.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto cartesian_product_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using CartesianProduct = ::std::conditional_t< (hana::Sequence<S>::value), cartesian_product_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::cartesian_product(xs) requires 'xs' to be a Sequence");
return CartesianProduct::apply(static_cast<Xs&&>(xs));
}
namespace detail {
template <std::size_t ...Lengths>
struct cartesian_product_indices {
static constexpr std::size_t total_length() {
std::size_t lengths[] = {Lengths...};
std::size_t r = 1;
for (std::size_t len: lengths)
r *= len;
return r;
}
static constexpr std::size_t length = total_length();
static constexpr auto indices_of(std::size_t i) {
constexpr std::size_t lengths[] = {Lengths...};
constexpr std::size_t n = sizeof...(Lengths);
detail::array<std::size_t, n> result{};
for (std::size_t j = n; j--;) {
result[j] = i % lengths[j];
i /= lengths[j];
}
return result;
}
template <typename S, std::size_t n, std::size_t ...k, typename ...Xs>
static constexpr auto
product_element(std::index_sequence<k...>, Xs&& ...xs) {
constexpr auto indices = indices_of(n);
return hana::make<S>(hana::at_c<indices[k]>(xs)...);
}
template <typename S, std::size_t ...n, typename ...Xs>
static constexpr auto
create_product(std::index_sequence<n...>, Xs&& ...xs) {
return hana::make<S>(product_element<S, n>(
std::make_index_sequence<sizeof...(Xs)>{}, xs...
)...);
}
};
}
template <typename S, bool condition>
struct cartesian_product_impl<S, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs&& xs) {
return hana::unpack(static_cast<Xs&&>(xs), cartesian_product_impl{});
}
template <typename ...Xs>
constexpr auto operator()(Xs&& ...xs) const {
using indices = detail::cartesian_product_indices<
decltype(hana::length(xs))::value...
>;
return indices::template create_product<S>(
std::make_index_sequence<indices::length>{},
static_cast<Xs&&>(xs)...);
}
constexpr auto operator()() const {
return hana::make<S>();
}
};
}}
# 77 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/comparing.hpp" 1 3 4
# 13 "/usr/include/boost/hana/comparing.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/comparing.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/comparing.hpp" 3 4
namespace boost { namespace hana {
# 56 "/usr/include/boost/hana/fwd/comparing.hpp" 3 4
struct comparing_t {
template <typename F>
constexpr auto operator()(F&& f) const;
};
constexpr comparing_t comparing{};
}}
# 14 "/usr/include/boost/hana/comparing.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
template <typename F>
struct equal_by {
F f;
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) const&
{ return hana::equal(f(static_cast<X&&>(x)), f(static_cast<Y&&>(y))); }
template <typename X, typename Y>
constexpr auto operator()(X&& x, Y&& y) &
{ return hana::equal(f(static_cast<X&&>(x)), f(static_cast<Y&&>(y))); }
};
}
template <typename F>
constexpr auto comparing_t::operator()(F&& f) const {
return detail::equal_by<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
}}
# 79 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept.hpp" 1 3 4
# 14 "/usr/include/boost/hana/concept.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/comonad.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/comonad.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/comonad.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/comonad.hpp" 3 4
namespace boost { namespace hana {
# 107 "/usr/include/boost/hana/fwd/concept/comonad.hpp" 3 4
template <typename W>
struct Comonad;
}}
# 14 "/usr/include/boost/hana/concept/comonad.hpp" 2 3 4
# 1 "/usr/include/boost/hana/duplicate.hpp" 1 3 4
# 15 "/usr/include/boost/hana/duplicate.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/comonad.hpp" 1 3 4
# 16 "/usr/include/boost/hana/duplicate.hpp" 2 3 4
# 1 "/usr/include/boost/hana/extend.hpp" 1 3 4
# 18 "/usr/include/boost/hana/extend.hpp" 3 4
# 1 "/usr/include/boost/hana/duplicate.hpp" 1 3 4
# 19 "/usr/include/boost/hana/extend.hpp" 2 3 4
namespace boost { namespace hana {
template <typename W_, typename F>
constexpr decltype(auto) extend_t::operator()(W_&& w, F&& f) const {
using W = typename hana::tag_of<W_>::type;
using Extend = ::std::conditional_t< (hana::Comonad<W>::value), extend_impl<W>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Comonad<W>::value,
"hana::extend(w, f) requires 'w' to be a Comonad");
return Extend::apply(static_cast<W_&&>(w), static_cast<F&&>(f));
}
template <typename W, bool condition>
struct extend_impl<W, when<condition>> : default_ {
template <typename X, typename F>
static constexpr decltype(auto) apply(X&& x, F&& f) {
return hana::transform(hana::duplicate(static_cast<X&&>(x)),
static_cast<F&&>(f));
}
};
}}
# 19 "/usr/include/boost/hana/duplicate.hpp" 2 3 4
namespace boost { namespace hana {
template <typename W_>
constexpr decltype(auto) duplicate_t::operator()(W_&& w) const {
using W = typename hana::tag_of<W_>::type;
using Duplicate = ::std::conditional_t< (hana::Comonad<W>::value), duplicate_impl<W>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Comonad<W>::value,
"hana::duplicate(w) requires 'w' to be a Comonad");
return Duplicate::apply(static_cast<W_&&>(w));
}
template <typename W, bool condition>
struct duplicate_impl<W, when<condition>> : default_ {
template <typename X>
static constexpr decltype(auto) apply(X&& x)
{ return hana::extend(static_cast<X&&>(x), hana::id); }
};
}}
# 19 "/usr/include/boost/hana/concept/comonad.hpp" 2 3 4
# 1 "/usr/include/boost/hana/extract.hpp" 1 3 4
# 20 "/usr/include/boost/hana/extract.hpp" 3 4
namespace boost { namespace hana {
template <typename W_>
constexpr decltype(auto) extract_t::operator()(W_&& w) const {
using W = typename hana::tag_of<W_>::type;
using Extract = ::std::conditional_t< (hana::Comonad<W>::value), extract_impl<W>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Comonad<W>::value,
"hana::extract(w) requires 'w' to be a Comonad");
return Extract::apply(static_cast<W_&&>(w));
}
template <typename W, bool condition>
struct extract_impl<W, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...args) = delete;
};
}}
# 21 "/usr/include/boost/hana/concept/comonad.hpp" 2 3 4
namespace boost { namespace hana {
template <typename W>
struct Comonad {
using Tag = typename tag_of<W>::type;
static constexpr bool value = !is_default<extract_impl<Tag>>::value &&
(!is_default<duplicate_impl<Tag>>::value ||
!is_default<extend_impl<Tag>>::value);
};
}}
# 15 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/euclidean_ring.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/euclidean_ring.hpp" 3 4
namespace boost { namespace hana {
# 113 "/usr/include/boost/hana/fwd/concept/euclidean_ring.hpp" 3 4
template <typename R>
struct EuclideanRing;
}}
# 14 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 2 3 4
# 1 "/usr/include/boost/hana/div.hpp" 1 3 4
# 16 "/usr/include/boost/hana/div.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 1 3 4
# 17 "/usr/include/boost/hana/div.hpp" 2 3 4
# 27 "/usr/include/boost/hana/div.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) div_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Div = ::std::conditional_t< (hana::EuclideanRing<T>::value && hana::EuclideanRing<U>::value && !is_default<div_impl<T, U>>::value), decltype(div_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::EuclideanRing<T>::value,
"hana::div(x, y) requires 'x' to be an EuclideanRing");
static_assert(hana::EuclideanRing<U>::value,
"hana::div(x, y) requires 'y' to be an EuclideanRing");
static_assert(!is_default<div_impl<T, U>>::value,
"hana::div(x, y) requires 'x' and 'y' to be embeddable "
"in a common EuclideanRing");
return Div::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct div_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, typename U>
struct div_impl<T, U, when<
detail::has_nontrivial_common_embedding<EuclideanRing, T, U>::value
>> {
using C = typename common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::div(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T>
struct div_impl<T, T, when<std::is_integral<T>::value &&
!std::is_same<T, bool>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) / static_cast<Y&&>(y); }
};
namespace detail {
template <typename C, typename X, typename Y>
struct constant_from_div {
static constexpr auto value = hana::div(hana::value<X>(), hana::value<Y>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct div_impl<C, C, when<
hana::Constant<C>::value &&
EuclideanRing<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const&, Y const&)
{ return hana::to<C>(detail::constant_from_div<C, X, Y>{}); }
};
}}
# 19 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 2 3 4
# 1 "/usr/include/boost/hana/mod.hpp" 1 3 4
# 27 "/usr/include/boost/hana/mod.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) mod_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Mod = ::std::conditional_t< (hana::EuclideanRing<T>::value && hana::EuclideanRing<U>::value && !is_default<mod_impl<T, U>>::value), decltype(mod_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::EuclideanRing<T>::value,
"hana::mod(x, y) requires 'x' to be an EuclideanRing");
static_assert(hana::EuclideanRing<U>::value,
"hana::mod(x, y) requires 'y' to be an EuclideanRing");
static_assert(!is_default<mod_impl<T, U>>::value,
"hana::mod(x, y) requires 'x' and 'y' to be embeddable "
"in a common EuclideanRing");
return Mod::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct mod_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, typename U>
struct mod_impl<T, U, when<
detail::has_nontrivial_common_embedding<EuclideanRing, T, U>::value
>> {
using C = typename common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::mod(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T>
struct mod_impl<T, T, when<std::is_integral<T>::value &&
!std::is_same<T, bool>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) % static_cast<Y&&>(y); }
};
namespace detail {
template <typename C, typename X, typename Y>
struct constant_from_mod {
static constexpr auto value = hana::mod(hana::value<X>(), hana::value<Y>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct mod_impl<C, C, when<
hana::Constant<C>::value &&
EuclideanRing<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const&, Y const&)
{ return hana::to<C>(detail::constant_from_mod<C, X, Y>{}); }
};
}}
# 20 "/usr/include/boost/hana/concept/euclidean_ring.hpp" 2 3 4
namespace boost { namespace hana {
template <typename R>
struct EuclideanRing {
using Tag = typename tag_of<R>::type;
static constexpr bool value = !is_default<mod_impl<Tag, Tag>>::value &&
!is_default<div_impl<Tag, Tag>>::value;
};
}}
# 18 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/group.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/group.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/group.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/group.hpp" 3 4
namespace boost { namespace hana {
# 107 "/usr/include/boost/hana/fwd/concept/group.hpp" 3 4
template <typename G>
struct Group;
}}
# 14 "/usr/include/boost/hana/concept/group.hpp" 2 3 4
# 1 "/usr/include/boost/hana/minus.hpp" 1 3 4
# 16 "/usr/include/boost/hana/minus.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/group.hpp" 1 3 4
# 17 "/usr/include/boost/hana/minus.hpp" 2 3 4
# 1 "/usr/include/boost/hana/plus.hpp" 1 3 4
# 16 "/usr/include/boost/hana/plus.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/monoid.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/monoid.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/monoid.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/monoid.hpp" 3 4
namespace boost { namespace hana {
# 97 "/usr/include/boost/hana/fwd/concept/monoid.hpp" 3 4
template <typename M>
struct Monoid;
}}
# 14 "/usr/include/boost/hana/concept/monoid.hpp" 2 3 4
# 1 "/usr/include/boost/hana/plus.hpp" 1 3 4
# 19 "/usr/include/boost/hana/concept/monoid.hpp" 2 3 4
# 1 "/usr/include/boost/hana/zero.hpp" 1 3 4
# 13 "/usr/include/boost/hana/zero.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/zero.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/zero.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/zero.hpp" 3 4
template <typename M, typename = void>
struct zero_impl : zero_impl<M, when<true>> { };
template <typename M>
struct zero_t;
template <typename M>
constexpr zero_t<M> zero{};
}}
# 14 "/usr/include/boost/hana/zero.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/monoid.hpp" 1 3 4
# 17 "/usr/include/boost/hana/zero.hpp" 2 3 4
# 25 "/usr/include/boost/hana/zero.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct zero_t {
static_assert(hana::Monoid<M>::value,
"hana::zero<M>() requires 'M' to be a Monoid");
constexpr decltype(auto) operator()() const {
using Zero = ::std::conditional_t< (hana::Monoid<M>::value), zero_impl<M>, ::boost::hana::deleted_implementation >
;
return Zero::apply();
}
};
template <typename M, bool condition>
struct zero_impl<M, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T>
struct zero_impl<T, when<
std::is_arithmetic<T>::value &&
!std::is_same<T, bool>::value
>> {
static constexpr T apply()
{ return static_cast<T>(0); }
};
namespace detail {
template <typename C>
struct constant_from_zero {
static constexpr auto value = hana::zero<typename C::value_type>();
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct zero_impl<C, when<
hana::Constant<C>::value &&
Monoid<typename C::value_type>::value
>> {
static constexpr decltype(auto) apply()
{ return hana::to<C>(detail::constant_from_zero<C>{}); }
};
}}
# 20 "/usr/include/boost/hana/concept/monoid.hpp" 2 3 4
namespace boost { namespace hana {
template <typename M>
struct Monoid {
using Tag = typename tag_of<M>::type;
static constexpr bool value = !is_default<zero_impl<Tag>>::value &&
!is_default<plus_impl<Tag, Tag>>::value;
};
}}
# 17 "/usr/include/boost/hana/plus.hpp" 2 3 4
# 27 "/usr/include/boost/hana/plus.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) plus_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Plus = ::std::conditional_t< (hana::Monoid<T>::value && hana::Monoid<U>::value && !is_default<plus_impl<T, U>>::value), decltype(plus_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Monoid<T>::value,
"hana::plus(x, y) requires 'x' to be a Monoid");
static_assert(hana::Monoid<U>::value,
"hana::plus(x, y) requires 'y' to be a Monoid");
static_assert(!is_default<plus_impl<T, U>>::value,
"hana::plus(x, y) requires 'x' and 'y' to be embeddable "
"in a common Monoid");
return Plus::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct plus_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, typename U>
struct plus_impl<T, U, when<
detail::has_nontrivial_common_embedding<Monoid, T, U>::value
>> {
using C = typename common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::plus(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T>
struct plus_impl<T, T, when<
std::is_arithmetic<T>::value &&
!std::is_same<T, bool>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) + static_cast<Y&&>(y); }
};
namespace detail {
template <typename C, typename X, typename Y>
struct constant_from_plus {
static constexpr auto value = hana::plus(hana::value<X>(), hana::value<Y>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct plus_impl<C, C, when<
hana::Constant<C>::value &&
Monoid<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const&, Y const&)
{ return hana::to<C>(detail::constant_from_plus<C, X, Y>{}); }
};
}}
# 25 "/usr/include/boost/hana/minus.hpp" 2 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) minus_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Minus = ::std::conditional_t< (hana::Group<T>::value && hana::Group<U>::value), decltype(minus_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Group<T>::value,
"hana::minus(x, y) requires 'x' to be in a Group");
static_assert(hana::Group<U>::value,
"hana::minus(x, y) requires 'y' to be in a Group");
return Minus::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct minus_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, bool condition>
struct minus_impl<T, T, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::plus(static_cast<X&&>(x),
hana::negate(static_cast<Y&&>(y)));
}
};
template <typename T, typename U>
struct minus_impl<T, U, when<
detail::has_nontrivial_common_embedding<Group, T, U>::value
>> {
using C = typename common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::minus(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T>
struct minus_impl<T, T, when<std::is_arithmetic<T>::value &&
!std::is_same<bool, T>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) - static_cast<Y&&>(y); }
};
namespace detail {
template <typename C, typename X, typename Y>
struct constant_from_minus {
static constexpr auto value = hana::minus(hana::value<X>(), hana::value<Y>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct minus_impl<C, C, when<
hana::Constant<C>::value &&
Group<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const&, Y const&)
{ return hana::to<C>(detail::constant_from_minus<C, X, Y>{}); }
};
}}
# 19 "/usr/include/boost/hana/concept/group.hpp" 2 3 4
# 1 "/usr/include/boost/hana/negate.hpp" 1 3 4
# 24 "/usr/include/boost/hana/negate.hpp" 3 4
namespace boost { namespace hana {
template <typename X>
constexpr decltype(auto) negate_t::operator()(X&& x) const {
using G = typename hana::tag_of<X>::type;
using Negate = ::std::conditional_t< (hana::Group<G>::value), negate_impl<G>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Group<G>::value,
"hana::negate(x) requires 'x' to be in a Group");
return Negate::apply(static_cast<X&&>(x));
}
template <typename T, bool condition>
struct negate_impl<T, when<condition>> : default_ {
template <typename X>
static constexpr decltype(auto) apply(X&& x)
{ return hana::minus(hana::zero<T>(), static_cast<X&&>(x)); }
};
template <typename T>
struct negate_impl<T, when<std::is_arithmetic<T>::value &&
!std::is_same<bool, T>::value>> {
template <typename X>
static constexpr decltype(auto) apply(X&& x)
{ return -static_cast<X&&>(x); }
};
}}
# 20 "/usr/include/boost/hana/concept/group.hpp" 2 3 4
namespace boost { namespace hana {
template <typename G>
struct Group {
using Tag = typename tag_of<G>::type;
static constexpr bool value = !is_default<negate_impl<Tag>>::value ||
!is_default<minus_impl<Tag, Tag>>::value;
};
}}
# 21 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/metafunction.hpp" 1 3 4
# 19 "/usr/include/boost/hana/concept/metafunction.hpp" 3 4
namespace boost { namespace hana {
namespace detail {
template <typename F, typename Tag = typename tag_of<F>::type>
struct metafunction_dispatch {
static constexpr bool value = Metafunction<Tag>::value;
};
template <typename F>
struct metafunction_dispatch<F, F> {
static constexpr bool value = false;
};
}
template <typename F>
struct Metafunction
: detail::metafunction_dispatch<F>
{ };
}}
# 25 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/orderable.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/orderable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/orderable.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/orderable.hpp" 3 4
namespace boost { namespace hana {
# 183 "/usr/include/boost/hana/fwd/concept/orderable.hpp" 3 4
template <typename Ord>
struct Orderable;
}}
# 14 "/usr/include/boost/hana/concept/orderable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/less.hpp" 1 3 4
# 18 "/usr/include/boost/hana/less.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/orderable.hpp" 1 3 4
# 19 "/usr/include/boost/hana/less.hpp" 2 3 4
# 27 "/usr/include/boost/hana/less.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/nested_than.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/nested_than.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
template <typename X>
constexpr decltype(auto) nested_than_t<Algorithm>::operator()(X&& x) const
{ return hana::partial(hana::flip(Algorithm{}), static_cast<X&&>(x)); }
} }}
# 28 "/usr/include/boost/hana/less.hpp" 2 3 4
# 1 "/usr/include/boost/hana/less_equal.hpp" 1 3 4
# 22 "/usr/include/boost/hana/less_equal.hpp" 3 4
# 1 "/usr/include/boost/hana/less.hpp" 1 3 4
# 23 "/usr/include/boost/hana/less_equal.hpp" 2 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr auto less_equal_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using LessEqual = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value), decltype(less_equal_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::less_equal(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::less_equal(x, y) requires 'y' to be Orderable");
return LessEqual::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct less_equal_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::not_(hana::less(static_cast<Y&&>(y),
static_cast<X&&>(x)));
}
};
template <typename T, typename U>
struct less_equal_impl<T, U, when<
detail::has_nontrivial_common_embedding<Orderable, T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::less_equal(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
}}
# 32 "/usr/include/boost/hana/less.hpp" 2 3 4
# 1 "/usr/include/boost/hana/lexicographical_compare.hpp" 1 3 4
# 13 "/usr/include/boost/hana/lexicographical_compare.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/lexicographical_compare.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/lexicographical_compare.hpp" 3 4
namespace boost { namespace hana {
# 78 "/usr/include/boost/hana/fwd/lexicographical_compare.hpp" 3 4
template <typename T, typename = void>
struct lexicographical_compare_impl : lexicographical_compare_impl<T, when<true>> { };
struct lexicographical_compare_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs const& xs, Ys const& ys) const;
template <typename Xs, typename Ys, typename Pred>
constexpr auto operator()(Xs const& xs, Ys const& ys, Pred const& pred) const;
};
constexpr lexicographical_compare_t lexicographical_compare{};
}}
# 14 "/usr/include/boost/hana/lexicographical_compare.hpp" 2 3 4
# 26 "/usr/include/boost/hana/lexicographical_compare.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto lexicographical_compare_t::operator()(Xs const& xs, Ys const& ys) const {
return hana::lexicographical_compare(xs, ys, hana::less);
}
template <typename Xs, typename Ys, typename Pred>
constexpr auto lexicographical_compare_t::operator()(Xs const& xs, Ys const& ys, Pred const& pred) const {
using It1 = typename hana::tag_of<Xs>::type;
using It2 = typename hana::tag_of<Ys>::type;
using LexicographicalCompare = ::std::conditional_t< (hana::Iterable<It1>::value && hana::Iterable<It2>::value), lexicographical_compare_impl<It1>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It1>::value,
"hana::lexicographical_compare(xs, ys, pred) requires 'xs' to be Iterable");
static_assert(hana::Iterable<It2>::value,
"hana::lexicographical_compare(xs, ys, pred) requires 'ys' to be Iterable");
return LexicographicalCompare::apply(xs, ys, pred);
}
template <typename It, bool condition>
struct lexicographical_compare_impl<It, when<condition>> : default_ {
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper2(Xs const&, Ys const&, Pred const&, hana::true_)
{ return hana::false_c; }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper2(Xs const& xs, Ys const& ys, Pred const& pred, hana::false_)
{ return apply(hana::drop_front(xs), hana::drop_front(ys), pred); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper2(Xs const& xs, Ys const& ys, Pred const& pred, bool is_greater)
{ return is_greater ? false : apply(hana::drop_front(xs), hana::drop_front(ys), pred); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper1(Xs const&, Ys const&, Pred const&, hana::true_)
{ return hana::true_c; }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper1(Xs const& xs, Ys const& ys, Pred const& pred, hana::false_)
{ return helper2(xs, ys, pred, hana::if_(pred(hana::front(ys), hana::front(xs)), hana::true_c, hana::false_c)); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper1(Xs const& xs, Ys const& ys, Pred const& pred, bool is_less)
{ return is_less ? true : helper2(xs, ys, pred, hana::if_(pred(hana::front(ys), hana::front(xs)), hana::true_c, hana::false_c)); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper(Xs const&, Ys const& ys, Pred const&, hana::true_)
{ return hana::not_(hana::is_empty(ys)); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto
helper(Xs const& xs, Ys const& ys, Pred const& pred, hana::false_)
{ return helper1(xs, ys, pred, hana::if_(pred(hana::front(xs), hana::front(ys)), hana::true_c, hana::false_c)); }
template <typename Xs, typename Ys, typename Pred>
static constexpr auto apply(Xs const& xs, Ys const& ys, Pred const& pred) {
return helper(xs, ys, pred, hana::bool_c<
decltype(hana::is_empty(xs))::value ||
decltype(hana::is_empty(ys))::value
>);
}
};
}}
# 33 "/usr/include/boost/hana/less.hpp" 2 3 4
# 1 "/usr/include/boost/hana/or.hpp" 1 3 4
# 22 "/usr/include/boost/hana/or.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) or_t::operator()(X&& x, Y&& y) const {
using Bool = typename hana::tag_of<X>::type;
using Or = ::std::conditional_t< (hana::Logical<Bool>::value), or_impl<Bool>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Logical<Bool>::value,
"hana::or_(x, y) requires 'x' to be a Logical");
return Or::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename X, typename ...Y>
constexpr decltype(auto) or_t::operator()(X&& x, Y&& ...y) const {
return detail::variadic::foldl1(
*this,
static_cast<X&&>(x),
static_cast<Y&&>(y)...
);
}
template <typename L, bool condition>
struct or_impl<L, when<condition>> : hana::default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::if_(x, x, static_cast<Y&&>(y));
}
};
}}
# 34 "/usr/include/boost/hana/less.hpp" 2 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr auto less_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Less = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value && !is_default<less_impl<T, U>>::value), decltype(less_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::less(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::less(x, y) requires 'y' to be Orderable");
static_assert(!is_default<less_impl<T, U>>::value,
"hana::less(x, y) requires 'x' and 'y' to be embeddable "
"in a common Orderable");
return Less::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct less_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, typename U>
struct less_impl<T, U, when<
detail::has_nontrivial_common_embedding<Orderable, T, U>::value &&
!detail::LessThanComparable<T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::less(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T, typename U>
struct less_impl<T, U, when<detail::LessThanComparable<T, U>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) < static_cast<Y&&>(y); }
};
template <typename C>
struct less_impl<C, C, when<
hana::Constant<C>::value &&
Orderable<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr auto apply(X const&, Y const&) {
constexpr auto less = hana::less(hana::value<X>(), hana::value<Y>());
constexpr bool truth_value = hana::if_(less, true, false);
return hana::bool_c<truth_value>;
}
};
template <typename T, typename U>
struct less_impl<T, U, when<hana::Product<T>::value && hana::Product<U>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const& x, Y const& y) {
return hana::or_(
hana::less(hana::first(x), hana::first(y)),
hana::and_(
hana::less_equal(hana::first(x), hana::first(y)),
hana::less(hana::second(x), hana::second(y))
)
);
}
};
template <typename T, typename U>
struct less_impl<T, U, when<
hana::Sequence<T>::value && hana::Sequence<U>::value
>> {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs const& xs, Ys const& ys)
{ return hana::lexicographical_compare(xs, ys); }
};
}}
# 19 "/usr/include/boost/hana/concept/orderable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Ord>
struct Orderable {
using Tag = typename tag_of<Ord>::type;
static constexpr bool value = !is_default<less_impl<Tag, Tag>>::value;
};
}}
# 29 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 1 "/usr/include/boost/hana/concept/ring.hpp" 1 3 4
# 13 "/usr/include/boost/hana/concept/ring.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/ring.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/concept/ring.hpp" 3 4
namespace boost { namespace hana {
# 102 "/usr/include/boost/hana/fwd/concept/ring.hpp" 3 4
template <typename R>
struct Ring;
}}
# 14 "/usr/include/boost/hana/concept/ring.hpp" 2 3 4
# 1 "/usr/include/boost/hana/mult.hpp" 1 3 4
# 16 "/usr/include/boost/hana/mult.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/ring.hpp" 1 3 4
# 17 "/usr/include/boost/hana/mult.hpp" 2 3 4
# 27 "/usr/include/boost/hana/mult.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) mult_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Mult = ::std::conditional_t< (hana::Ring<T>::value && hana::Ring<U>::value && !is_default<mult_impl<T, U>>::value), decltype(mult_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Ring<T>::value,
"hana::mult(x, y) requires 'x' to be in a Ring");
static_assert(hana::Ring<U>::value,
"hana::mult(x, y) requires 'y' to be in a Ring");
static_assert(!is_default<mult_impl<T, U>>::value,
"hana::mult(x, y) requires 'x' and 'y' to be embeddable "
"in a common Ring");
return Mult::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct mult_impl<T, U, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T, typename U>
struct mult_impl<T, U, when<
detail::has_nontrivial_common_embedding<Ring, T, U>::value
>> {
using C = typename common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::mult(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
template <typename T>
struct mult_impl<T, T, when<std::is_arithmetic<T>::value &&
!std::is_same<bool, T>::value>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y)
{ return static_cast<X&&>(x) * static_cast<Y&&>(y); }
};
namespace detail {
template <typename C, typename X, typename Y>
struct constant_from_mult {
static constexpr auto value = hana::mult(hana::value<X>(), hana::value<Y>());
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct mult_impl<C, C, when<
hana::Constant<C>::value &&
Ring<typename C::value_type>::value
>> {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X const&, Y const&)
{ return hana::to<C>(detail::constant_from_mult<C, X, Y>{}); }
};
}}
# 19 "/usr/include/boost/hana/concept/ring.hpp" 2 3 4
# 1 "/usr/include/boost/hana/one.hpp" 1 3 4
# 13 "/usr/include/boost/hana/one.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/one.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/one.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/one.hpp" 3 4
template <typename R, typename = void>
struct one_impl : one_impl<R, when<true>> { };
template <typename R>
struct one_t;
template <typename R>
constexpr one_t<R> one{};
}}
# 14 "/usr/include/boost/hana/one.hpp" 2 3 4
# 25 "/usr/include/boost/hana/one.hpp" 3 4
namespace boost { namespace hana {
template <typename R>
struct one_t {
static_assert(hana::Ring<R>::value,
"hana::one<R>() requires 'R' to be a Ring");
constexpr decltype(auto) operator()() const {
using One = ::std::conditional_t< (hana::Ring<R>::value), one_impl<R>, ::boost::hana::deleted_implementation >
;
return One::apply();
}
};
template <typename R, bool condition>
struct one_impl<R, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename T>
struct one_impl<T, when<std::is_arithmetic<T>::value &&
!std::is_same<bool, T>::value>> {
static constexpr T apply()
{ return static_cast<T>(1); }
};
namespace detail {
template <typename C>
struct constant_from_one {
static constexpr auto value = hana::one<typename C::value_type>();
using hana_tag = detail::CanonicalConstant<typename C::value_type>;
};
}
template <typename C>
struct one_impl<C, when<
hana::Constant<C>::value &&
Ring<typename C::value_type>::value
>> {
static constexpr decltype(auto) apply()
{ return hana::to<C>(detail::constant_from_one<C>{}); }
};
}}
# 20 "/usr/include/boost/hana/concept/ring.hpp" 2 3 4
namespace boost { namespace hana {
template <typename R>
struct Ring {
using Tag = typename tag_of<R>::type;
static constexpr bool value = !is_default<one_impl<Tag>>::value &&
!is_default<mult_impl<Tag, Tag>>::value;
};
}}
# 31 "/usr/include/boost/hana/concept.hpp" 2 3 4
# 81 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/contains.hpp" 1 3 4
# 22 "/usr/include/boost/hana/contains.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Key>
constexpr auto contains_t::operator()(Xs&& xs, Key&& key) const {
using S = typename hana::tag_of<Xs>::type;
using Contains = ::std::conditional_t< (hana::Searchable<S>::value), contains_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::contains(xs, key) requires 'xs' to be a Searchable");
return Contains::apply(static_cast<Xs&&>(xs),
static_cast<Key&&>(key));
}
template <typename S, bool condition>
struct contains_impl<S, when<condition>> : default_ {
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
return hana::any_of(static_cast<Xs&&>(xs),
hana::equal.to(static_cast<X&&>(x)));
}
};
}}
# 82 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/core.hpp" 1 3 4
# 17 "/usr/include/boost/hana/core.hpp" 3 4
# 1 "/usr/include/boost/hana/core/is_a.hpp" 1 3 4
# 13 "/usr/include/boost/hana/core/is_a.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/core/is_a.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/core/is_a.hpp" 3 4
namespace boost { namespace hana {
# 42 "/usr/include/boost/hana/fwd/core/is_a.hpp" 3 4
template <typename Tag, typename ...T>
struct is_a_t;
template <typename Tag, typename ...T>
constexpr is_a_t<Tag, T...> is_a{};
# 56 "/usr/include/boost/hana/fwd/core/is_a.hpp" 3 4
template <typename Tag, typename ...T>
constexpr is_a_t<Tag, T...> is_an{};
}}
# 14 "/usr/include/boost/hana/core/is_a.hpp" 2 3 4
# 22 "/usr/include/boost/hana/core/is_a.hpp" 3 4
namespace boost { namespace hana {
template <typename DataType, typename T>
struct is_a_t<DataType, T>
: integral_constant<bool,
std::is_same<DataType, typename hana::tag_of<T>::type>::value
>
{ };
template <typename DataType>
struct is_a_t<DataType> {
template <typename T>
constexpr auto operator()(T const&) const
{ return hana::is_a<DataType, T>; }
};
}}
# 18 "/usr/include/boost/hana/core.hpp" 2 3 4
# 83 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/count.hpp" 1 3 4
# 13 "/usr/include/boost/hana/count.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/count.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/count.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/count.hpp" 3 4
template <typename T, typename = void>
struct count_impl : count_impl<T, when<true>> { };
struct count_t {
template <typename Xs, typename Value>
constexpr auto operator()(Xs&& xs, Value&& value) const;
};
constexpr count_t count{};
}}
# 14 "/usr/include/boost/hana/count.hpp" 2 3 4
# 1 "/usr/include/boost/hana/count_if.hpp" 1 3 4
# 13 "/usr/include/boost/hana/count_if.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/count_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/count_if.hpp" 3 4
namespace boost { namespace hana {
# 44 "/usr/include/boost/hana/fwd/count_if.hpp" 3 4
template <typename T, typename = void>
struct count_if_impl : count_if_impl<T, when<true>> { };
struct count_if_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr count_if_t count_if{};
}}
# 14 "/usr/include/boost/hana/count_if.hpp" 2 3 4
# 28 "/usr/include/boost/hana/count_if.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto count_if_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using CountIf = ::std::conditional_t< (hana::Foldable<S>::value), count_if_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::count_if(xs, pred) requires 'xs' to be Foldable");
return CountIf::apply(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
namespace detail {
template <typename Pred>
struct count_pred {
Pred pred;
template <typename ...Xs, typename = typename std::enable_if<
detail::fast_and<
Constant<decltype((*pred)(std::declval<Xs&&>()))>::value...
>::value
>::type>
constexpr auto operator()(Xs&& ...xs) const {
constexpr bool results[] = {false,
static_cast<bool>(hana::value<decltype((*pred)(static_cast<Xs&&>(xs)))>())...
};
constexpr std::size_t total = detail::count(
results, results + sizeof(results), true
);
return hana::size_c<total>;
}
template <typename ...Xs, typename = void, typename = typename std::enable_if<
!detail::fast_and<
Constant<decltype((*pred)(std::declval<Xs&&>()))>::value...
>::value
>::type>
constexpr auto operator()(Xs&& ...xs) const {
std::size_t total = 0;
using Swallow = std::size_t[];
(void)Swallow{0, ((*pred)(static_cast<Xs&&>(xs)) ? ++total : 0)...};
return total;
}
};
}
template <typename T, bool condition>
struct count_if_impl<T, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr decltype(auto) apply(Xs&& xs, Pred&& pred) {
return hana::unpack(static_cast<Xs&&>(xs),
detail::count_pred<decltype(&pred)>{&pred}
);
}
};
}}
# 19 "/usr/include/boost/hana/count.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Value>
constexpr auto count_t::operator()(Xs&& xs, Value&& value) const {
using S = typename hana::tag_of<Xs>::type;
using Count = ::std::conditional_t< (hana::Foldable<S>::value), count_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::count(xs, value) requires 'xs' to be Foldable");
return Count::apply(static_cast<Xs&&>(xs), static_cast<Value&&>(value));
}
template <typename T, bool condition>
struct count_impl<T, when<condition>> : default_ {
template <typename Xs, typename Value>
static constexpr auto apply(Xs&& xs, Value&& value) {
return hana::count_if(static_cast<Xs&&>(xs),
hana::equal.to(static_cast<Value&&>(value)));
}
};
}}
# 84 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/cycle.hpp" 1 3 4
# 13 "/usr/include/boost/hana/cycle.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/cycle.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/cycle.hpp" 3 4
namespace boost { namespace hana {
# 64 "/usr/include/boost/hana/fwd/cycle.hpp" 3 4
template <typename M, typename = void>
struct cycle_impl : cycle_impl<M, when<true>> { };
struct cycle_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
};
constexpr cycle_t cycle{};
}}
# 14 "/usr/include/boost/hana/cycle.hpp" 2 3 4
# 31 "/usr/include/boost/hana/cycle.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto cycle_t::operator()(Xs&& xs, N const& n) const {
using M = typename hana::tag_of<Xs>::type;
using Cycle = ::std::conditional_t< (hana::MonadPlus<M>::value), cycle_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::cycle(xs, n) requires 'xs' to be a MonadPlus");
static_assert(hana::IntegralConstant<N>::value,
"hana::cycle(xs, n) requires 'n' to be an IntegralConstant");
static_assert(N::value >= 0,
"hana::cycle(xs, n) requires 'n' to be non-negative");
return Cycle::apply(static_cast<Xs&&>(xs), n);
}
namespace detail {
template <typename M, std::size_t n, bool = n % 2 == 0>
struct cycle_helper;
template <typename M>
struct cycle_helper<M, 0, true> {
template <typename Xs>
static constexpr auto apply(Xs const&)
{ return hana::empty<M>(); }
};
template <typename M, std::size_t n>
struct cycle_helper<M, n, true> {
template <typename Xs>
static constexpr auto apply(Xs const& xs)
{ return cycle_helper<M, n/2>::apply(hana::concat(xs, xs)); }
};
template <typename M, std::size_t n>
struct cycle_helper<M, n, false> {
template <typename Xs>
static constexpr auto apply(Xs const& xs)
{ return hana::concat(xs, cycle_helper<M, n-1>::apply(xs)); }
};
}
template <typename M, bool condition>
struct cycle_impl<M, when<condition>> : default_ {
template <typename Xs, typename N>
static constexpr auto apply(Xs const& xs, N const&) {
constexpr std::size_t n = N::value;
return detail::cycle_helper<M, n>::apply(xs);
}
};
namespace detail {
template <std::size_t N, std::size_t Len>
struct cycle_indices {
static constexpr auto compute_value() {
detail::array<std::size_t, N * Len> indices{};
std::size_t len = Len;
for (std::size_t i = 0; i < N * Len; ++i)
indices[i] = i % len;
return indices;
}
static constexpr auto value = compute_value();
};
}
template <typename S>
struct cycle_impl<S, when<Sequence<S>::value>> {
template <typename Indices, typename Xs, std::size_t ...i>
static constexpr auto cycle_helper(Xs&& xs, std::index_sequence<i...>) {
constexpr auto indices = Indices::value;
(void)indices;
return hana::make<S>(hana::at_c<indices[i]>(xs)...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t len = decltype(hana::length(xs))::value;
using Indices = detail::cycle_indices<n, len>;
return cycle_helper<Indices>(static_cast<Xs&&>(xs),
std::make_index_sequence<n * len>{});
}
};
}}
# 86 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/define_struct.hpp" 1 3 4
# 13 "/usr/include/boost/hana/define_struct.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/define_struct.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/define_struct.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/define_struct.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/define_struct.hpp" 2 3 4
# 87 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/difference.hpp" 1 3 4
# 13 "/usr/include/boost/hana/difference.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/difference.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/difference.hpp" 3 4
namespace boost { namespace hana {
# 52 "/usr/include/boost/hana/fwd/difference.hpp" 3 4
template <typename S, typename = void>
struct difference_impl : difference_impl<S, when<true>> { };
struct difference_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr difference_t difference{};
}}
# 14 "/usr/include/boost/hana/difference.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto difference_t::operator()(Xs&& xs, Ys&& ys) const {
using S = typename hana::tag_of<Xs>::type;
using Difference = ::std::conditional_t< (true), difference_impl<S>, ::boost::hana::deleted_implementation >
;
return Difference::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename S, bool condition>
struct difference_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 88 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/drop_back.hpp" 1 3 4
# 13 "/usr/include/boost/hana/drop_back.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/drop_back.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/drop_back.hpp" 3 4
namespace boost { namespace hana {
# 48 "/usr/include/boost/hana/fwd/drop_back.hpp" 3 4
template <typename S, typename = void>
struct drop_back_impl : drop_back_impl<S, when<true>> { };
struct drop_back_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr drop_back_t drop_back{};
}}
# 14 "/usr/include/boost/hana/drop_back.hpp" 2 3 4
# 28 "/usr/include/boost/hana/drop_back.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto drop_back_t::operator()(Xs&& xs, N const& n) const {
using S = typename hana::tag_of<Xs>::type;
using DropBack = ::std::conditional_t< (hana::Sequence<S>::value && hana::IntegralConstant<N>::value), drop_back_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::drop_back(xs, n) requires 'xs' to be a Sequence");
static_assert(hana::IntegralConstant<N>::value,
"hana::drop_back(xs, n) requires 'n' to be an IntegralConstant");
static_assert(N::value >= 0,
"hana::drop_back(xs, n) requires 'n' to be non-negative");
return DropBack::apply(static_cast<Xs&&>(xs), n);
}
template <typename Xs>
constexpr auto drop_back_t::operator()(Xs&& xs) const {
return (*this)(static_cast<Xs&&>(xs), hana::size_c<1>);
}
template <typename S, bool condition>
struct drop_back_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...n>
static constexpr auto drop_back_helper(Xs&& xs, std::index_sequence<n...>) {
return hana::make<S>(hana::at_c<n>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t len = decltype(hana::length(xs))::value;
return drop_back_helper(static_cast<Xs&&>(xs),
std::make_index_sequence<(n > len ? 0 : len - n)>{});
}
};
}}
# 90 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/drop_front_exactly.hpp" 1 3 4
# 13 "/usr/include/boost/hana/drop_front_exactly.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/drop_front_exactly.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/drop_front_exactly.hpp" 3 4
namespace boost { namespace hana {
# 52 "/usr/include/boost/hana/fwd/drop_front_exactly.hpp" 3 4
template <typename It, typename = void>
struct drop_front_exactly_impl : drop_front_exactly_impl<It, when<true>> { };
struct drop_front_exactly_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr drop_front_exactly_t drop_front_exactly{};
}}
# 14 "/usr/include/boost/hana/drop_front_exactly.hpp" 2 3 4
# 25 "/usr/include/boost/hana/drop_front_exactly.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto drop_front_exactly_t::operator()(Xs&& xs, N const& n) const {
using It = typename hana::tag_of<Xs>::type;
using DropFrontExactly = ::std::conditional_t< (hana::Iterable<It>::value && hana::IntegralConstant<N>::value), drop_front_exactly_impl<It>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Iterable<It>::value,
"hana::drop_front_exactly(xs, n) requires 'xs' to be an Iterable");
static_assert(hana::IntegralConstant<N>::value,
"hana::drop_front_exactly(xs, n) requires 'n' to be an IntegralConstant");
static_assert(N::value >= 0,
"hana::drop_front_exactly(xs, n) requires 'n' to be non-negative");
return DropFrontExactly::apply(static_cast<Xs&&>(xs), n);
}
template <typename Xs>
constexpr auto drop_front_exactly_t::operator()(Xs&& xs) const {
return (*this)(static_cast<Xs&&>(xs), hana::size_c<1>);
}
namespace detail {
template <typename Xs, typename N>
constexpr void check_dfe_overflow(Xs const& xs, N const&, hana::true_) {
constexpr bool n_overflew_length = decltype(
hana::is_empty(hana::drop_front(xs, hana::size_c<N::value - 1>))
)::value;
static_assert(!n_overflew_length,
"hana::drop_front_exactly(xs, n) requires 'n' to be less than or "
"equal to the number of elements in 'xs'");
}
template <typename Xs, typename N>
constexpr void check_dfe_overflow(Xs const&, N const&, hana::false_) { }
}
template <typename It, bool condition>
struct drop_front_exactly_impl<It, when<condition>> : default_ {
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const& n) {
auto result = hana::drop_front(static_cast<Xs&&>(xs), n);
constexpr bool check_for_overflow =
decltype(hana::is_empty(result))::value && N::value != 0;
detail::check_dfe_overflow(xs, n, hana::bool_c<check_for_overflow>);
return result;
}
};
}}
# 92 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/erase_key.hpp" 1 3 4
# 13 "/usr/include/boost/hana/erase_key.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/erase_key.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/erase_key.hpp" 3 4
namespace boost { namespace hana {
template <typename T, typename = void>
struct erase_key_impl : erase_key_impl<T, when<true>> { };
struct erase_key_t {
template <typename Set, typename ...Args>
constexpr decltype(auto) operator()(Set&& set, Args&& ...args) const;
};
constexpr erase_key_t erase_key{};
}}
# 14 "/usr/include/boost/hana/erase_key.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Set, typename ...Args>
constexpr decltype(auto) erase_key_t::operator()(Set&& set, Args&& ...args) const {
return erase_key_impl<typename hana::tag_of<Set>::type>::apply(
static_cast<Set&&>(set),
static_cast<Args&&>(args)...
);
}
template <typename T, bool condition>
struct erase_key_impl<T, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 97 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fill.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fill.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/fill.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/fill.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/fill.hpp" 3 4
template <typename Xs, typename = void>
struct fill_impl : fill_impl<Xs, when<true>> { };
struct fill_t {
template <typename Xs, typename Value>
constexpr auto operator()(Xs&& xs, Value&& value) const;
};
constexpr fill_t fill{};
}}
# 14 "/usr/include/boost/hana/fill.hpp" 2 3 4
# 25 "/usr/include/boost/hana/fill.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Value>
constexpr auto fill_t::operator()(Xs&& xs, Value&& value) const {
using S = typename hana::tag_of<Xs>::type;
using Fill = ::std::conditional_t< (hana::Functor<S>::value), fill_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::fill(xs, value) requires 'xs' to be a Functor");
return Fill::apply(static_cast<Xs&&>(xs),
static_cast<Value&&>(value));
}
template <typename Fun, bool condition>
struct fill_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename Value>
static constexpr auto apply(Xs&& xs, Value&& v) {
return hana::transform(static_cast<Xs&&>(xs),
hana::always(static_cast<Value&&>(v))
);
}
};
template <typename S>
struct fill_impl<S, when<Sequence<S>::value>> {
template <typename V>
struct filler {
V const& v;
template <typename ...Xs>
constexpr auto operator()(Xs const& ...xs) const {
return hana::make<S>(((void)xs, v)...);
}
};
template <typename Xs, typename V>
static constexpr auto apply(Xs const& xs, V const& v) {
return hana::unpack(xs, filler<V>{v});
}
};
}}
# 102 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/filter.hpp" 1 3 4
# 13 "/usr/include/boost/hana/filter.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/filter.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/filter.hpp" 3 4
namespace boost { namespace hana {
# 69 "/usr/include/boost/hana/fwd/filter.hpp" 3 4
template <typename M, typename = void>
struct filter_impl : filter_impl<M, when<true>> { };
struct filter_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr filter_t filter{};
}}
# 14 "/usr/include/boost/hana/filter.hpp" 2 3 4
# 34 "/usr/include/boost/hana/filter.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto filter_t::operator()(Xs&& xs, Pred&& pred) const {
using M = typename hana::tag_of<Xs>::type;
using Filter = ::std::conditional_t< (hana::MonadPlus<M>::value), filter_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::filter(xs, pred) requires 'xs' to be a MonadPlus");
return Filter::apply(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
namespace detail {
template <typename Pred, typename M>
struct lift_or_empty {
template <typename X>
static constexpr auto helper(X&& x, hana::true_)
{ return hana::lift<M>(static_cast<X&&>(x)); }
template <typename X>
static constexpr auto helper(X&&, hana::false_)
{ return hana::empty<M>(); }
template <typename X>
constexpr auto operator()(X&& x) const {
constexpr bool cond = decltype(std::declval<Pred>()(x))::value;
return helper(static_cast<X&&>(x), hana::bool_c<cond>);
}
};
}
template <typename M, bool condition>
struct filter_impl<M, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr decltype(auto) apply(Xs&& xs, Pred const&) {
return hana::chain(static_cast<Xs&&>(xs),
detail::lift_or_empty<Pred, M>{}
);
}
};
namespace detail {
template <bool ...b>
struct filter_indices {
static constexpr auto compute_indices() {
constexpr bool bs[] = {b..., false};
constexpr std::size_t N = detail::count(bs, bs + sizeof(bs), true);
detail::array<std::size_t, N> indices{};
std::size_t* keep = &indices[0];
for (std::size_t i = 0; i < sizeof...(b); ++i)
if (bs[i])
*keep++ = i;
return indices;
}
static constexpr auto indices = compute_indices();
};
template <typename Pred>
struct make_filter_indices {
Pred const& pred;
template <typename ...X>
auto operator()(X&& ...x) const -> filter_indices<
static_cast<bool>(detail::decay<
decltype(pred(static_cast<X&&>(x)))
>::type::value)...
> { return {}; }
};
}
template <typename S>
struct filter_impl<S, when<Sequence<S>::value>> {
template <typename Indices, typename Xs, std::size_t ...i>
static constexpr auto filter_helper(Xs&& xs, std::index_sequence<i...>) {
return hana::make<S>(
hana::at_c<Indices::indices[i]>(static_cast<Xs&&>(xs))...
);
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred const& pred) {
using Indices = decltype(
hana::unpack(static_cast<Xs&&>(xs),
detail::make_filter_indices<Pred>{pred})
);
return filter_impl::filter_helper<Indices>(
static_cast<Xs&&>(xs),
std::make_index_sequence<Indices::indices.size()>{}
);
}
};
}}
# 103 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fold.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fold.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/fold.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/fold.hpp" 3 4
namespace boost { namespace hana {
# 35 "/usr/include/boost/hana/fwd/fold.hpp" 3 4
constexpr auto fold = fold_left;
}}
# 14 "/usr/include/boost/hana/fold.hpp" 2 3 4
# 108 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fold_right.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fold_right.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/fold_right.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/fold_right.hpp" 3 4
namespace boost { namespace hana {
# 77 "/usr/include/boost/hana/fwd/fold_right.hpp" 3 4
template <typename T, typename = void>
struct fold_right_impl : fold_right_impl<T, when<true>> { };
struct fold_right_t {
template <typename Xs, typename State, typename F>
constexpr decltype(auto) operator()(Xs&& xs, State&& state, F&& f) const;
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const;
};
constexpr fold_right_t fold_right{};
}}
# 14 "/usr/include/boost/hana/fold_right.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/variadic/foldr1.hpp" 1 3 4
# 17 "/usr/include/boost/hana/detail/variadic/foldr1.hpp" 3 4
namespace boost { namespace hana { namespace detail { namespace variadic {
template <unsigned int n, typename = when<true>>
struct foldr1_impl;
template <>
struct foldr1_impl<1> {
template <typename F, typename X1>
static constexpr X1 apply(F&&, X1&& x1)
{ return static_cast<X1&&>(x1); }
};
template <>
struct foldr1_impl<2> {
template <typename F, typename X1, typename X2>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2) {
return static_cast<F&&>(f)(static_cast<X1&&>(x1),
static_cast<X2&&>(x2));
}
};
template <>
struct foldr1_impl<3> {
template <typename F, typename X1, typename X2, typename X3>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3) {
return f(static_cast<X1&&>(x1),
f(static_cast<X2&&>(x2),
static_cast<X3&&>(x3)));
}
};
template <>
struct foldr1_impl<4> {
template <typename F, typename X1, typename X2, typename X3, typename X4>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4) {
return f(static_cast<X1&&>(x1),
f(static_cast<X2&&>(x2),
f(static_cast<X3&&>(x3),
static_cast<X4&&>(x4))));
}
};
template <>
struct foldr1_impl<5> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5) {
return f(static_cast<X1&&>(x1),
f(static_cast<X2&&>(x2),
f(static_cast<X3&&>(x3),
f(static_cast<X4&&>(x4),
static_cast<X5&&>(x5)))));
}
};
template <>
struct foldr1_impl<6> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6>
static constexpr decltype(auto) apply(F&& f, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6) {
return f(static_cast<X1&&>(x1),
f(static_cast<X2&&>(x2),
f(static_cast<X3&&>(x3),
f(static_cast<X4&&>(x4),
f(static_cast<X5&&>(x5),
static_cast<X6&&>(x6))))));
}
};
template <unsigned int n>
struct foldr1_impl<n, when<(n >= 7) && (n < 14)>> {
template <typename F, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7, typename ...Xn>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, Xn&& ...xn)
{
return f(static_cast<X1&&>(x1),
f(static_cast<X2&&>(x2),
f(static_cast<X3&&>(x3),
f(static_cast<X4&&>(x4),
f(static_cast<X5&&>(x5),
f(static_cast<X6&&>(x6),
foldr1_impl<sizeof...(xn) + 1>::apply(f, static_cast<X7&&>(x7), static_cast<Xn&&>(xn)...)))))));
}
};
template <unsigned int n>
struct foldr1_impl<n, when<(n >= 14) && (n < 28)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, Xn&& ...xn)
{
return f(static_cast<X1&&>(x1), f(static_cast<X2&&>(x2), f(static_cast<X3&&>(x3), f(static_cast<X4&&>(x4), f(static_cast<X5&&>(x5), f(static_cast<X6&&>(x6), f(static_cast<X7&&>(x7),
f(static_cast<X8&&>(x8), f(static_cast<X9&&>(x9), f(static_cast<X10&&>(x10), f(static_cast<X11&&>(x11), f(static_cast<X12&&>(x12), f(static_cast<X13&&>(x13),
foldr1_impl<sizeof...(xn) + 1>::apply(f, static_cast<X14&&>(x14), static_cast<Xn&&>(xn)...))))))))))))));
}
};
template <unsigned int n>
struct foldr1_impl<n, when<(n >= 28) && (n < 56)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename X15, typename X16, typename X17, typename X18, typename X19, typename X20, typename X21
, typename X22, typename X23, typename X24, typename X25, typename X26, typename X27, typename X28
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, X15&& x15, X16&& x16, X17&& x17, X18&& x18, X19&& x19, X20&& x20, X21&& x21
, X22&& x22, X23&& x23, X24&& x24, X25&& x25, X26&& x26, X27&& x27, X28&& x28
, Xn&& ...xn)
{
return f(static_cast<X1&&>(x1), f(static_cast<X2&&>(x2), f(static_cast<X3&&>(x3), f(static_cast<X4&&>(x4), f(static_cast<X5&&>(x5), f(static_cast<X6&&>(x6), f(static_cast<X7&&>(x7),
f(static_cast<X8&&>(x8), f(static_cast<X9&&>(x9), f(static_cast<X10&&>(x10), f(static_cast<X11&&>(x11), f(static_cast<X12&&>(x12), f(static_cast<X13&&>(x13), f(static_cast<X14&&>(x14),
f(static_cast<X15&&>(x15), f(static_cast<X16&&>(x16), f(static_cast<X17&&>(x17), f(static_cast<X18&&>(x18), f(static_cast<X19&&>(x19), f(static_cast<X20&&>(x20), f(static_cast<X21&&>(x21),
f(static_cast<X22&&>(x22), f(static_cast<X23&&>(x23), f(static_cast<X24&&>(x24), f(static_cast<X25&&>(x25), f(static_cast<X26&&>(x26), f(static_cast<X27&&>(x27),
foldr1_impl<sizeof...(xn) + 1>::apply(f, static_cast<X28&&>(x28), static_cast<Xn&&>(xn)...))))))))))))))))))))))))))));
}
};
template <unsigned int n>
struct foldr1_impl<n, when<(n >= 56)>> {
template <
typename F
, typename X1, typename X2, typename X3, typename X4, typename X5, typename X6, typename X7
, typename X8, typename X9, typename X10, typename X11, typename X12, typename X13, typename X14
, typename X15, typename X16, typename X17, typename X18, typename X19, typename X20, typename X21
, typename X22, typename X23, typename X24, typename X25, typename X26, typename X27, typename X28
, typename X29, typename X30, typename X31, typename X32, typename X33, typename X34, typename X35
, typename X36, typename X37, typename X38, typename X39, typename X40, typename X41, typename X42
, typename X43, typename X44, typename X45, typename X46, typename X47, typename X48, typename X49
, typename X50, typename X51, typename X52, typename X53, typename X54, typename X55, typename X56
, typename ...Xn
>
static constexpr decltype(auto)
apply(F&& f
, X1&& x1, X2&& x2, X3&& x3, X4&& x4, X5&& x5, X6&& x6, X7&& x7
, X8&& x8, X9&& x9, X10&& x10, X11&& x11, X12&& x12, X13&& x13, X14&& x14
, X15&& x15, X16&& x16, X17&& x17, X18&& x18, X19&& x19, X20&& x20, X21&& x21
, X22&& x22, X23&& x23, X24&& x24, X25&& x25, X26&& x26, X27&& x27, X28&& x28
, X29&& x29, X30&& x30, X31&& x31, X32&& x32, X33&& x33, X34&& x34, X35&& x35
, X36&& x36, X37&& x37, X38&& x38, X39&& x39, X40&& x40, X41&& x41, X42&& x42
, X43&& x43, X44&& x44, X45&& x45, X46&& x46, X47&& x47, X48&& x48, X49&& x49
, X50&& x50, X51&& x51, X52&& x52, X53&& x53, X54&& x54, X55&& x55, X56&& x56
, Xn&& ...xn)
{
return f(static_cast<X1&&>(x1), f(static_cast<X2&&>(x2), f(static_cast<X3&&>(x3), f(static_cast<X4&&>(x4), f(static_cast<X5&&>(x5), f(static_cast<X6&&>(x6), f(static_cast<X7&&>(x7),
f(static_cast<X8&&>(x8), f(static_cast<X9&&>(x9), f(static_cast<X10&&>(x10), f(static_cast<X11&&>(x11), f(static_cast<X12&&>(x12), f(static_cast<X13&&>(x13), f(static_cast<X14&&>(x14),
f(static_cast<X15&&>(x15), f(static_cast<X16&&>(x16), f(static_cast<X17&&>(x17), f(static_cast<X18&&>(x18), f(static_cast<X19&&>(x19), f(static_cast<X20&&>(x20), f(static_cast<X21&&>(x21),
f(static_cast<X22&&>(x22), f(static_cast<X23&&>(x23), f(static_cast<X24&&>(x24), f(static_cast<X25&&>(x25), f(static_cast<X26&&>(x26), f(static_cast<X27&&>(x27), f(static_cast<X28&&>(x28),
f(static_cast<X29&&>(x29), f(static_cast<X30&&>(x30), f(static_cast<X31&&>(x31), f(static_cast<X32&&>(x32), f(static_cast<X33&&>(x33), f(static_cast<X34&&>(x34), f(static_cast<X35&&>(x35),
f(static_cast<X36&&>(x36), f(static_cast<X37&&>(x37), f(static_cast<X38&&>(x38), f(static_cast<X39&&>(x39), f(static_cast<X40&&>(x40), f(static_cast<X41&&>(x41), f(static_cast<X42&&>(x42),
f(static_cast<X43&&>(x43), f(static_cast<X44&&>(x44), f(static_cast<X45&&>(x45), f(static_cast<X46&&>(x46), f(static_cast<X47&&>(x47), f(static_cast<X48&&>(x48), f(static_cast<X49&&>(x49),
f(static_cast<X50&&>(x50), f(static_cast<X51&&>(x51), f(static_cast<X52&&>(x52), f(static_cast<X53&&>(x53), f(static_cast<X54&&>(x54), f(static_cast<X55&&>(x55),
foldr1_impl<sizeof...(xn) + 1>::apply(f, static_cast<X56&&>(x56), static_cast<Xn&&>(xn)...))))))))))))))))))))))))))))))))))))))))))))))))))))))));
}
};
struct foldr1_t {
template <typename F, typename X1, typename ...Xn>
constexpr decltype(auto) operator()(F&& f, X1&& x1, Xn&& ...xn) const {
return foldr1_impl<sizeof...(xn) + 1>::apply(
static_cast<F&&>(f), static_cast<X1&&>(x1), static_cast<Xn&&>(xn)...
);
}
};
constexpr foldr1_t foldr1{};
struct foldr_t {
template <typename F, typename State, typename ...Xn>
constexpr decltype(auto) operator()(F&& f, State&& state, Xn&& ...xn) const {
return foldr1_impl<sizeof...(xn) + 1>::apply(
static_cast<F&&>(f), static_cast<Xn&&>(xn)..., static_cast<State&&>(state)
);
}
};
constexpr foldr_t foldr{};
}} }}
# 19 "/usr/include/boost/hana/fold_right.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename State, typename F>
constexpr decltype(auto) fold_right_t::operator()(Xs&& xs, State&& state, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using FoldRight = ::std::conditional_t< (hana::Foldable<S>::value), fold_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::fold_right(xs, state, f) requires 'xs' to be Foldable");
return FoldRight::apply(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
template <typename Xs, typename F>
constexpr decltype(auto) fold_right_t::operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using FoldRight = ::std::conditional_t< (hana::Foldable<S>::value), fold_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::fold_right(xs, f) requires 'xs' to be Foldable");
return FoldRight::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
namespace detail {
template <typename F, typename State>
struct variadic_foldr {
F& f;
State& state;
template <typename ...T>
constexpr decltype(auto) operator()(T&& ...t) const {
return detail::variadic::foldr(
static_cast<F&&>(f),
static_cast<State&&>(state),
static_cast<T&&>(t)...
);
}
};
}
template <typename T, bool condition>
struct fold_right_impl<T, when<condition>> : default_ {
template <typename Xs, typename S, typename F>
static constexpr decltype(auto) apply(Xs&& xs, S&& s, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs),
detail::variadic_foldr<F, S>{f, s}
);
}
template <typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
return hana::unpack(static_cast<Xs&&>(xs),
hana::partial(
detail::variadic::foldr1,
static_cast<F&&>(f)
)
);
}
};
}}
# 110 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/for_each.hpp" 1 3 4
# 13 "/usr/include/boost/hana/for_each.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/for_each.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/for_each.hpp" 3 4
namespace boost { namespace hana {
# 43 "/usr/include/boost/hana/fwd/for_each.hpp" 3 4
template <typename T, typename = void>
struct for_each_impl : for_each_impl<T, when<true>> { };
struct for_each_t {
template <typename Xs, typename F>
constexpr void operator()(Xs&& xs, F&& f) const;
};
constexpr for_each_t for_each{};
}}
# 14 "/usr/include/boost/hana/for_each.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr void for_each_t::operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using ForEach = ::std::conditional_t< (hana::Foldable<S>::value), for_each_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::for_each(xs, f) requires 'xs' to be Foldable");
return ForEach::apply(static_cast<Xs&&>(xs), static_cast<F&&>(f));
}
namespace detail {
template <typename F>
struct on_each {
F f;
template <typename ...Xs>
constexpr void operator()(Xs&& ...xs) const {
using Swallow = int[];
(void)Swallow{0, ((void)(*f)(static_cast<Xs&&>(xs)), 0)...};
}
};
}
template <typename T, bool condition>
struct for_each_impl<T, when<condition>> : default_ {
template <typename Xs, typename F>
static constexpr void apply(Xs&& xs, F&& f) {
hana::unpack(static_cast<Xs&&>(xs),
detail::on_each<decltype(&f)>{&f});
}
};
}}
# 111 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional.hpp" 1 3 4
# 15 "/usr/include/boost/hana/functional.hpp" 3 4
# 1 "/usr/include/boost/hana/functional/arg.hpp" 1 3 4
# 19 "/usr/include/boost/hana/functional/arg.hpp" 3 4
namespace boost { namespace hana {
# 60 "/usr/include/boost/hana/functional/arg.hpp" 3 4
template <std::size_t n, typename = void>
struct arg_t;
template <>
struct arg_t<1> {
template <typename X1, typename ...Xn>
constexpr X1 operator()(X1&& x1, Xn&& ...) const
{ return static_cast<X1&&>(x1); }
};
template <>
struct arg_t<2> {
template <typename X1, typename X2, typename ...Xn>
constexpr X2 operator()(X1&&, X2&& x2, Xn&& ...) const
{ return static_cast<X2&&>(x2); }
};
template <>
struct arg_t<3> {
template <typename X1, typename X2, typename X3, typename ...Xn>
constexpr X3 operator()(X1&&, X2&&, X3&& x3, Xn&& ...) const
{ return static_cast<X3&&>(x3); }
};
template <>
struct arg_t<4> {
template <typename X1, typename X2, typename X3, typename X4, typename ...Xn>
constexpr X4 operator()(X1&&, X2&&, X3&&, X4&& x4, Xn&& ...) const
{ return static_cast<X4&&>(x4); }
};
template <>
struct arg_t<5> {
template <typename X1, typename X2, typename X3, typename X4,
typename X5, typename ...Xn>
constexpr X5 operator()(X1&&, X2&&, X3&&, X4&&, X5&& x5, Xn&& ...) const
{ return static_cast<X5&&>(x5); }
};
template <std::size_t n, typename>
struct arg_t {
static_assert(n > 0,
"invalid usage of boost::hana::arg<n> with n == 0");
template <typename X1, typename X2, typename X3, typename X4,
typename X5, typename ...Xn>
constexpr decltype(auto)
operator()(X1&&, X2&&, X3&&, X4&&, X5&&, Xn&& ...xn) const {
static_assert(sizeof...(xn) >= n - 5,
"invalid usage of boost::hana::arg<n> with too few arguments");
return arg_t<n == 0 ? 1 : n - 5>{}(static_cast<Xn&&>(xn)...);
}
};
template <std::size_t n>
struct arg_t<n, std::enable_if_t<(n > 25)>> {
template <
typename X1, typename X2, typename X3, typename X4, typename X5,
typename X6, typename X7, typename X8, typename X9, typename X10,
typename X11, typename X12, typename X13, typename X14, typename X15,
typename X16, typename X17, typename X18, typename X19, typename X20,
typename X21, typename X22, typename X23, typename X24, typename X25,
typename ...Xn>
constexpr decltype(auto)
operator()(X1&&, X2&&, X3&&, X4&&, X5&&,
X6&&, X7&&, X8&&, X9&&, X10&&,
X11&&, X12&&, X13&&, X14&&, X15&&,
X16&&, X17&&, X18&&, X19&&, X20&&,
X21&&, X22&&, X23&&, X24&&, X25&&, Xn&& ...xn) const
{ return arg_t<n - 25>{}(static_cast<Xn&&>(xn)...); }
};
template <std::size_t n>
constexpr arg_t<n> arg{};
}}
# 16 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/capture.hpp" 1 3 4
# 22 "/usr/include/boost/hana/functional/capture.hpp" 3 4
namespace boost { namespace hana {
# 53 "/usr/include/boost/hana/functional/capture.hpp" 3 4
namespace detail {
template <typename F, typename Closure, std::size_t ...i>
constexpr auto apply_capture(F&& f, Closure&& closure, std::index_sequence<i...>) {
return hana::partial(static_cast<F&&>(f),
hana::get_impl<i>(static_cast<Closure&&>(closure).storage_)...
);
}
}
template <typename ...X>
struct capture_t;
struct make_capture_t {
struct secret { };
template <typename ...X>
constexpr capture_t<typename detail::decay<X>::type...>
operator()(X&& ...x) const {
return {secret{}, static_cast<X&&>(x)...};
}
};
template <typename ...X>
struct capture_t {
template <typename ...Y>
constexpr capture_t(make_capture_t::secret, Y&& ...y)
: storage_{static_cast<Y&&>(y)...}
{ }
basic_tuple<X...> storage_;
template <typename F>
constexpr auto operator()(F&& f) const& {
return detail::apply_capture(
static_cast<F&&>(f), *this,
std::make_index_sequence<sizeof...(X)>{}
);
}
template <typename F>
constexpr auto operator()(F&& f) & {
return detail::apply_capture(
static_cast<F&&>(f), *this,
std::make_index_sequence<sizeof...(X)>{}
);
}
template <typename F>
constexpr auto operator()(F&& f) && {
return detail::apply_capture(
static_cast<F&&>(f), static_cast<capture_t&&>(*this),
std::make_index_sequence<sizeof...(X)>{}
);
}
};
constexpr make_capture_t capture{};
}}
# 17 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/demux.hpp" 1 3 4
# 21 "/usr/include/boost/hana/functional/demux.hpp" 3 4
namespace boost { namespace hana {
# 170 "/usr/include/boost/hana/functional/demux.hpp" 3 4
template <typename F>
struct pre_demux_t;
struct make_pre_demux_t {
struct secret { };
template <typename F>
constexpr pre_demux_t<typename detail::decay<F>::type> operator()(F&& f) const {
return {static_cast<F&&>(f)};
}
};
template <typename Indices, typename F, typename ...G>
struct demux_t;
template <typename F>
struct pre_demux_t {
F f;
template <typename ...G>
constexpr demux_t<std::make_index_sequence<sizeof...(G)>, F,
typename detail::decay<G>::type...>
operator()(G&& ...g) const& {
return {make_pre_demux_t::secret{}, this->f, static_cast<G&&>(g)...};
}
template <typename ...G>
constexpr demux_t<std::make_index_sequence<sizeof...(G)>, F,
typename detail::decay<G>::type...>
operator()(G&& ...g) && {
return {make_pre_demux_t::secret{}, static_cast<F&&>(this->f), static_cast<G&&>(g)...};
}
};
template <std::size_t ...n, typename F, typename ...G>
struct demux_t<std::index_sequence<n...>, F, G...> {
template <typename ...T>
constexpr demux_t(make_pre_demux_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, G...> storage_;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const& {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)(x...)...
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) & {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)(x...)...
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) && {
return static_cast<F&&>(hana::get_impl<0>(storage_))(
static_cast<G&&>(hana::get_impl<n+1>(storage_))(x...)...
);
}
};
template <typename F, typename G>
struct demux_t<std::index_sequence<0>, F, G> {
template <typename ...T>
constexpr demux_t(make_pre_demux_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, G> storage_;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const& {
return hana::get_impl<0>(storage_)(
hana::get_impl<1>(storage_)(static_cast<X&&>(x)...)
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) & {
return hana::get_impl<0>(storage_)(
hana::get_impl<1>(storage_)(static_cast<X&&>(x)...)
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) && {
return static_cast<F&&>(hana::get_impl<0>(storage_))(
static_cast<G&&>(hana::get_impl<1>(storage_))(static_cast<X&&>(x)...)
);
}
};
constexpr make_pre_demux_t demux{};
}}
# 20 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/fix.hpp" 1 3 4
# 19 "/usr/include/boost/hana/functional/fix.hpp" 3 4
namespace boost { namespace hana {
# 59 "/usr/include/boost/hana/functional/fix.hpp" 3 4
template <typename F>
struct fix_t;
constexpr detail::create<fix_t> fix{};
template <typename F>
struct fix_t {
F f;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const&
{ return f(fix(f), static_cast<X&&>(x)...); }
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) &
{ return f(fix(f), static_cast<X&&>(x)...); }
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) &&
{ return std::move(f)(fix(f), static_cast<X&&>(x)...); }
};
}}
# 21 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/iterate.hpp" 1 3 4
# 20 "/usr/include/boost/hana/functional/iterate.hpp" 3 4
namespace boost { namespace hana {
# 79 "/usr/include/boost/hana/functional/iterate.hpp" 3 4
template <std::size_t n, typename = when<true>>
struct iterate_t;
template <>
struct iterate_t<0> {
template <typename F, typename X>
constexpr X operator()(F&&, X&& x) const
{ return static_cast<X&&>(x); }
};
template <>
struct iterate_t<1> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return f(static_cast<X&&>(x));
}
};
template <>
struct iterate_t<2> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return f(f(static_cast<X&&>(x)));
}
};
template <>
struct iterate_t<3> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return f(f(f(static_cast<X&&>(x))));
}
};
template <>
struct iterate_t<4> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return f(f(f(f(static_cast<X&&>(x)))));
}
};
template <>
struct iterate_t<5> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return f(f(f(f(f(static_cast<X&&>(x))))));
}
};
template <std::size_t n>
struct iterate_t<n, when<(n >= 6) && (n < 12)>> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return iterate_t<n - 6>{}(f,
f(f(f(f(f(f(static_cast<X&&>(x)))))))
);
}
};
template <std::size_t n>
struct iterate_t<n, when<(n >= 12) && (n < 24)>> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return iterate_t<n - 12>{}(f,
f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X&&>(x)
))))))))))))
);
}
};
template <std::size_t n>
struct iterate_t<n, when<(n >= 24) && (n < 48)>> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return iterate_t<n - 24>{}(f,
f(f(f(f(f(f(f(f(f(f(f(f(
f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X&&>(x)
))))))))))))
))))))))))))
);
}
};
template <std::size_t n>
struct iterate_t<n, when<(n >= 48)>> {
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return iterate_t<n - 48>{}(f,
f(f(f(f(f(f(f(f(f(f(f(f(
f(f(f(f(f(f(f(f(f(f(f(f(
f(f(f(f(f(f(f(f(f(f(f(f(
f(f(f(f(f(f(f(f(f(f(f(f(
static_cast<X&&>(x)
))))))))))))
))))))))))))
))))))))))))
))))))))))))
);
}
};
template <std::size_t n>
struct make_iterate_t {
template <typename F>
constexpr decltype(auto) operator()(F&& f) const
{ return hana::partial(iterate_t<n>{}, static_cast<F&&>(f)); }
template <typename F, typename X>
constexpr decltype(auto) operator()(F&& f, X&& x) const {
return iterate_t<n>{}(static_cast<F&&>(f),
static_cast<X&&>(x));
}
};
template <std::size_t n>
constexpr make_iterate_t<n> iterate{};
}}
# 25 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/lockstep.hpp" 1 3 4
# 21 "/usr/include/boost/hana/functional/lockstep.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/functional/lockstep.hpp" 3 4
template <typename Indices, typename F, typename ...G>
struct lockstep_t;
template <typename F>
struct pre_lockstep_t;
struct make_pre_lockstep_t {
struct secret { };
template <typename F>
constexpr pre_lockstep_t<typename detail::decay<F>::type> operator()(F&& f) const {
return {static_cast<F&&>(f)};
}
};
template <std::size_t ...n, typename F, typename ...G>
struct lockstep_t<std::index_sequence<n...>, F, G...> {
template <typename ...T>
constexpr lockstep_t(make_pre_lockstep_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
{ }
basic_tuple<F, G...> storage_;
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) const& {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)(static_cast<X&&>(x))...
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) & {
return hana::get_impl<0>(storage_)(
hana::get_impl<n+1>(storage_)(static_cast<X&&>(x))...
);
}
template <typename ...X>
constexpr decltype(auto) operator()(X&& ...x) && {
return static_cast<F&&>(hana::get_impl<0>(storage_))(
static_cast<G&&>(hana::get_impl<n+1>(storage_))(static_cast<X&&>(x))...
);
}
};
template <typename F>
struct pre_lockstep_t {
F f;
template <typename ...G>
constexpr lockstep_t<std::make_index_sequence<sizeof...(G)>, F,
typename detail::decay<G>::type...>
operator()(G&& ...g) const& {
return {make_pre_lockstep_t::secret{}, this->f, static_cast<G&&>(g)...};
}
template <typename ...G>
constexpr lockstep_t<std::make_index_sequence<sizeof...(G)>, F,
typename detail::decay<G>::type...>
operator()(G&& ...g) && {
return {make_pre_lockstep_t::secret{}, static_cast<F&&>(this->f),
static_cast<G&&>(g)...};
}
};
constexpr make_pre_lockstep_t lockstep{};
}}
# 26 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/overload.hpp" 1 3 4
# 17 "/usr/include/boost/hana/functional/overload.hpp" 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/functional/overload.hpp" 3 4
template <typename F, typename ...G>
struct overload_t
: overload_t<F>::type
, overload_t<G...>::type
{
using type = overload_t;
using overload_t<F>::type::operator();
using overload_t<G...>::type::operator();
template <typename F_, typename ...G_>
constexpr explicit overload_t(F_&& f, G_&& ...g)
: overload_t<F>::type(static_cast<F_&&>(f))
, overload_t<G...>::type(static_cast<G_&&>(g)...)
{ }
};
template <typename F>
struct overload_t<F> { using type = F; };
template <typename R, typename ...Args>
struct overload_t<R(*)(Args...)> {
using type = overload_t;
R (*fptr_)(Args...);
explicit constexpr overload_t(R (*fp)(Args...))
: fptr_(fp)
{ }
constexpr R operator()(Args ...args) const
{ return fptr_(static_cast<Args&&>(args)...); }
};
struct make_overload_t {
template <typename ...F,
typename Overload = typename overload_t<
typename detail::decay<F>::type...
>::type
>
constexpr Overload operator()(F&& ...f) const {
return Overload(static_cast<F&&>(f)...);
}
};
constexpr make_overload_t overload{};
}}
# 28 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 1 "/usr/include/boost/hana/functional/overload_linearly.hpp" 1 3 4
# 19 "/usr/include/boost/hana/functional/overload_linearly.hpp" 3 4
namespace boost { namespace hana {
# 44 "/usr/include/boost/hana/functional/overload_linearly.hpp" 3 4
template <typename F, typename G>
struct overload_linearly_t {
F f;
G g;
private:
template <typename ...Args, typename =
decltype(std::declval<F const&>()(std::declval<Args>()...))>
constexpr F const& which(int) const& { return f; }
template <typename ...Args, typename =
decltype(std::declval<F&>()(std::declval<Args>()...))>
constexpr F& which(int) & { return f; }
template <typename ...Args, typename =
decltype(std::declval<F&&>()(std::declval<Args>()...))>
constexpr F which(int) && { return static_cast<F&&>(f); }
template <typename ...Args>
constexpr G const& which(long) const& { return g; }
template <typename ...Args>
constexpr G& which(long) & { return g; }
template <typename ...Args>
constexpr G which(long) && { return static_cast<G&&>(g); }
public:
template <typename ...Args>
constexpr decltype(auto) operator()(Args&& ...args) const&
{ return which<Args...>(int{})(static_cast<Args&&>(args)...); }
template <typename ...Args>
constexpr decltype(auto) operator()(Args&& ...args) &
{ return which<Args...>(int{})(static_cast<Args&&>(args)...); }
template <typename ...Args>
constexpr decltype(auto) operator()(Args&& ...args) &&
{ return which<Args...>(int{})(static_cast<Args&&>(args)...); }
};
struct make_overload_linearly_t {
template <typename F, typename G>
constexpr overload_linearly_t<
typename detail::decay<F>::type,
typename detail::decay<G>::type
> operator()(F&& f, G&& g) const {
return {static_cast<F&&>(f), static_cast<G&&>(g)};
}
template <typename F, typename G, typename ...H>
constexpr decltype(auto) operator()(F&& f, G&& g, H&& ...h) const {
return (*this)(static_cast<F&&>(f),
(*this)(static_cast<G&&>(g), static_cast<H&&>(h)...));
}
template <typename F>
constexpr typename detail::decay<F>::type operator()(F&& f) const {
return static_cast<F&&>(f);
}
};
constexpr make_overload_linearly_t overload_linearly{};
}}
# 29 "/usr/include/boost/hana/functional.hpp" 2 3 4
# 113 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fuse.hpp" 1 3 4
# 13 "/usr/include/boost/hana/fuse.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/fuse.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/fuse.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/fuse.hpp" 3 4
struct fuse_t {
template <typename F>
constexpr auto operator()(F&& f) const;
};
constexpr fuse_t fuse{};
}}
# 14 "/usr/include/boost/hana/fuse.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
template <typename F>
struct fused {
F f;
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const&
{ return hana::unpack(static_cast<Xs&&>(xs), f); }
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) &
{ return hana::unpack(static_cast<Xs&&>(xs), f); }
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) &&
{ return hana::unpack(static_cast<Xs&&>(xs), static_cast<F&&>(f)); }
};
}
template <typename F>
constexpr auto fuse_t::operator()(F&& f) const {
return detail::fused<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
}}
# 114 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/greater.hpp" 1 3 4
# 26 "/usr/include/boost/hana/greater.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) greater_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Greater = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value), decltype(greater_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::greater(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::greater(x, y) requires 'y' to be Orderable");
return Greater::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct greater_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::less(static_cast<Y&&>(y),
static_cast<X&&>(x));
}
};
template <typename T, typename U>
struct greater_impl<T, U, when<
detail::has_nontrivial_common_embedding<Orderable, T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::greater(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
}}
# 115 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/greater_equal.hpp" 1 3 4
# 27 "/usr/include/boost/hana/greater_equal.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) greater_equal_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using GreaterEqual = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value), decltype(greater_equal_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::greater_equal(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::greater_equal(x, y) requires 'y' to be Orderable");
return GreaterEqual::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct greater_equal_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X x, Y y) {
return hana::not_(hana::less(static_cast<X&&>(x),
static_cast<Y&&>(y)));
}
};
template <typename T, typename U>
struct greater_equal_impl<T, U, when<
detail::has_nontrivial_common_embedding<Orderable, T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::greater_equal(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
}}
# 116 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/group.hpp" 1 3 4
# 13 "/usr/include/boost/hana/group.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/group.hpp" 1 3 4
# 15 "/usr/include/boost/hana/fwd/group.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/nested_by_fwd.hpp" 1 3 4
# 16 "/usr/include/boost/hana/detail/nested_by_fwd.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
struct nested_by_t {
template <typename Predicate, typename Object>
constexpr decltype(auto)
operator()(Predicate&& predicate, Object&& object) const;
template <typename Predicate>
constexpr decltype(auto) operator()(Predicate&& predicate) const;
};
# 48 "/usr/include/boost/hana/detail/nested_by_fwd.hpp" 3 4
template <typename Algorithm>
struct nested_by { static constexpr nested_by_t<Algorithm> by{}; };
template <typename Algorithm>
constexpr nested_by_t<Algorithm> nested_by<Algorithm>::by;
} }}
# 16 "/usr/include/boost/hana/fwd/group.hpp" 2 3 4
namespace boost { namespace hana {
# 88 "/usr/include/boost/hana/fwd/group.hpp" 3 4
template <typename S, typename = void>
struct group_impl : group_impl<S, when<true>> { };
struct group_t : detail::nested_by<group_t> {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
template <typename Xs, typename Predicate>
constexpr auto operator()(Xs&& xs, Predicate&& pred) const;
};
constexpr group_t group{};
}}
# 14 "/usr/include/boost/hana/group.hpp" 2 3 4
# 22 "/usr/include/boost/hana/group.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/nested_by.hpp" 1 3 4
# 20 "/usr/include/boost/hana/detail/nested_by.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Algorithm>
template <typename Predicate, typename Object>
constexpr decltype(auto) nested_by_t<Algorithm>::
operator()(Predicate&& predicate, Object&& object) const {
return Algorithm{}(static_cast<Object&&>(object),
static_cast<Predicate&&>(predicate));
}
template <typename Algorithm>
template <typename Predicate>
constexpr decltype(auto)
nested_by_t<Algorithm>::operator()(Predicate&& predicate) const {
return hana::partial(hana::flip(Algorithm{}),
static_cast<Predicate&&>(predicate));
}
} }}
# 23 "/usr/include/boost/hana/group.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto group_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Group = ::std::conditional_t< (hana::Sequence<S>::value), group_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::group(xs) requires 'xs' to be a Sequence");
return Group::apply(static_cast<Xs&&>(xs));
}
template <typename Xs, typename Predicate>
constexpr auto group_t::operator()(Xs&& xs, Predicate&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Group = ::std::conditional_t< (hana::Sequence<S>::value), group_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::group(xs, predicate) requires 'xs' to be a Sequence");
return Group::apply(static_cast<Xs&&>(xs),
static_cast<Predicate&&>(pred));
}
namespace detail {
template <typename Xs, std::size_t ...i>
constexpr auto get_subsequence_(Xs&& xs, std::index_sequence<i...>) {
using S = typename hana::tag_of<Xs>::type;
return hana::make<S>(hana::at_c<i>(static_cast<Xs&&>(xs))...);
}
template <std::size_t offset, typename Indices>
struct offset_by;
template <std::size_t offset, std::size_t ...i>
struct offset_by<offset, std::index_sequence<i...>> {
using type = std::index_sequence<(offset + i)...>;
};
template <bool ...b>
struct group_indices {
static constexpr bool bs[] = {b...};
static constexpr std::size_t n_groups =
detail::count(bs, bs + sizeof(bs), false) + 1;
static constexpr auto compute_info() {
detail::array<std::size_t, n_groups> sizes{}, offsets{};
for (std::size_t g = 0, i = 0, offset = 0; g < n_groups; ++g) {
offsets[g] = offset;
sizes[g] = 1;
while (i < sizeof...(b) && bs[i++])
++sizes[g];
offset += sizes[g];
}
return std::make_pair(offsets, sizes);
}
static constexpr auto info = compute_info();
static constexpr auto offsets = info.first;
static constexpr auto group_sizes = info.second;
template <typename S, typename Xs, std::size_t ...i>
static constexpr auto finish(Xs&& xs, std::index_sequence<i...>) {
return hana::make<S>(
detail::get_subsequence_(
static_cast<Xs&&>(xs),
typename offset_by<
offsets[i], std::make_index_sequence<group_sizes[i]>
>::type{}
)...
);
}
};
}
template <typename S, bool condition>
struct group_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred, std::size_t ...i>
static constexpr auto
group_helper(Xs&& xs, Pred&& pred, std::index_sequence<0, i...>) {
using info = detail::group_indices<static_cast<bool>(decltype(
pred(hana::at_c<i - 1>(static_cast<Xs&&>(xs)),
hana::at_c<i>(static_cast<Xs&&>(xs)))
)::value)...>;
return info::template finish<S>(static_cast<Xs&&>(xs),
std::make_index_sequence<info::n_groups>{}
);
}
template <typename Xs, typename Pred>
static constexpr auto
group_helper(Xs&& xs, Pred&&, std::index_sequence<0>) {
return hana::make<S>(static_cast<Xs&&>(xs));
}
template <typename Xs, typename Pred>
static constexpr auto
group_helper(Xs&&, Pred&&, std::index_sequence<>) {
return hana::make<S>();
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
constexpr std::size_t len = decltype(hana::length(xs))::value;
return group_helper(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred),
std::make_index_sequence<len>{});
}
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return group_impl::apply(static_cast<Xs&&>(xs), hana::equal); }
};
}}
# 117 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/insert.hpp" 1 3 4
# 13 "/usr/include/boost/hana/insert.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/insert.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/insert.hpp" 3 4
namespace boost { namespace hana {
template <typename T, typename = void>
struct insert_impl : insert_impl<T, when<true>> { };
struct insert_t {
template <typename Set, typename ...Args>
constexpr decltype(auto) operator()(Set&& set, Args&& ...args) const;
};
constexpr insert_t insert{};
# 58 "/usr/include/boost/hana/fwd/insert.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/insert.hpp" 2 3 4
# 1 "/usr/include/boost/hana/take_front.hpp" 1 3 4
# 13 "/usr/include/boost/hana/take_front.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/take_front.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/take_front.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/take_front.hpp" 3 4
template <typename S, typename = void>
struct take_front_impl : take_front_impl<S, when<true>> { };
struct take_front_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
};
constexpr take_front_t take_front{};
# 70 "/usr/include/boost/hana/fwd/take_front.hpp" 3 4
template <std::size_t n>
struct take_front_c_t;
template <std::size_t n>
constexpr take_front_c_t<n> take_front_c{};
}}
# 14 "/usr/include/boost/hana/take_front.hpp" 2 3 4
# 28 "/usr/include/boost/hana/take_front.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto take_front_t::operator()(Xs&& xs, N const& n) const {
using S = typename hana::tag_of<Xs>::type;
using TakeFront = ::std::conditional_t< (hana::Sequence<S>::value && hana::IntegralConstant<N>::value), take_front_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::take_front(xs, n) requires 'xs' to be a Sequence");
static_assert(hana::IntegralConstant<N>::value,
"hana::take_front(xs, n) requires 'n' to be an IntegralConstant");
return TakeFront::apply(static_cast<Xs&&>(xs), n);
}
template <typename S, bool condition>
struct take_front_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...n>
static constexpr auto take_front_helper(Xs&& xs, std::index_sequence<n...>) {
return hana::make<S>(hana::at_c<n>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t size = decltype(hana::length(xs))::value;
return take_front_helper(static_cast<Xs&&>(xs),
std::make_index_sequence<(n < size ? n : size)>{});
}
};
template <std::size_t n>
struct take_front_c_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const {
return hana::take_front(static_cast<Xs&&>(xs), hana::size_c<n>);
}
};
}}
# 22 "/usr/include/boost/hana/insert.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Set, typename ...Args>
constexpr decltype(auto) insert_t::operator()(Set&& set, Args&& ...args) const {
return insert_impl<typename hana::tag_of<Set>::type>::apply(
static_cast<Set&&>(set),
static_cast<Args&&>(args)...
);
}
template <typename T, bool condition>
struct insert_impl<T, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S>
struct insert_impl<S, when<Sequence<S>::value>> {
template <typename Xs, typename N, typename Element>
static constexpr auto apply(Xs&& xs, N const& n, Element&& e) {
return hana::concat(hana::append(hana::take_front(xs, n),
static_cast<Element&&>(e)),
hana::drop_front(xs, n));
}
};
}}
# 119 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/insert_range.hpp" 1 3 4
# 13 "/usr/include/boost/hana/insert_range.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/insert_range.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/insert_range.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/insert_range.hpp" 3 4
template <typename S, typename = void>
struct insert_range_impl : insert_range_impl<S, when<true>> { };
struct insert_range_t {
template <typename Xs, typename N, typename Elements>
constexpr auto operator()(Xs&& xs, N&& n, Elements&& elements) const;
};
constexpr insert_range_t insert_range{};
}}
# 14 "/usr/include/boost/hana/insert_range.hpp" 2 3 4
# 25 "/usr/include/boost/hana/insert_range.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N, typename Elements>
constexpr auto insert_range_t::operator()(Xs&& xs, N&& n, Elements&& elements) const {
using S = typename hana::tag_of<Xs>::type;
using InsertRange = ::std::conditional_t< (hana::Sequence<Xs>::value && hana::Foldable<Elements>::value), insert_range_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<Xs>::value,
"hana::insert_range(xs, n, elements) requires 'xs' to be a Sequence");
static_assert(hana::Foldable<Elements>::value,
"hana::insert_range(xs, n, elements) requires 'elements' to be a Foldable");
return InsertRange::apply(static_cast<Xs&&>(xs),
static_cast<N&&>(n),
static_cast<Elements&&>(elements));
}
template <typename S, bool condition>
struct insert_range_impl<S, when<condition>> {
template <typename Xs, typename N, typename Elements>
static constexpr auto apply(Xs&& xs, N const& n, Elements&& e) {
return hana::concat(
hana::concat(
hana::take_front(xs, n),
hana::to<S>(static_cast<Elements&&>(e))
),
hana::drop_front(xs, n)
);
}
};
}}
# 120 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/intersection.hpp" 1 3 4
# 13 "/usr/include/boost/hana/intersection.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/intersection.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/intersection.hpp" 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/fwd/intersection.hpp" 3 4
template <typename S, typename = void>
struct intersection_impl : intersection_impl<S, when<true>> { };
struct intersection_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr intersection_t intersection{};
}}
# 14 "/usr/include/boost/hana/intersection.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto intersection_t::operator()(Xs&& xs, Ys&& ys) const {
using S = typename hana::tag_of<Xs>::type;
using Intersection = ::std::conditional_t< (true), intersection_impl<S>, ::boost::hana::deleted_implementation >
;
return Intersection::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename S, bool condition>
struct intersection_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 122 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/intersperse.hpp" 1 3 4
# 13 "/usr/include/boost/hana/intersperse.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/intersperse.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/intersperse.hpp" 3 4
namespace boost { namespace hana {
# 45 "/usr/include/boost/hana/fwd/intersperse.hpp" 3 4
template <typename S, typename = void>
struct intersperse_impl : intersperse_impl<S, when<true>> { };
struct intersperse_t {
template <typename Xs, typename Z>
constexpr auto operator()(Xs&& xs, Z&& z) const;
};
constexpr intersperse_t intersperse{};
}}
# 14 "/usr/include/boost/hana/intersperse.hpp" 2 3 4
# 27 "/usr/include/boost/hana/intersperse.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Z>
constexpr auto intersperse_t::operator()(Xs&& xs, Z&& z) const {
using S = typename hana::tag_of<Xs>::type;
using Intersperse = ::std::conditional_t< (hana::Sequence<S>::value), intersperse_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::intersperse(xs, z) requires 'xs' to be a Sequence");
return Intersperse::apply(static_cast<Xs&&>(xs), static_cast<Z&&>(z));
}
template <typename S, bool condition>
struct intersperse_impl<S, when<condition>> : default_ {
template <std::size_t i, typename Xs, typename Z>
static constexpr decltype(auto)
pick(Xs&&, Z&& z, hana::false_ )
{ return static_cast<Z&&>(z); }
template <std::size_t i, typename Xs, typename Z>
static constexpr decltype(auto)
pick(Xs&& xs, Z&&, hana::true_ )
{ return hana::at_c<(i + 1) / 2>(static_cast<Xs&&>(xs)); }
template <typename Xs, typename Z, std::size_t ...i>
static constexpr auto
intersperse_helper(Xs&& xs, Z&& z, std::index_sequence<i...>) {
return hana::make<S>(
pick<i>(static_cast<Xs&&>(xs), static_cast<Z&&>(z),
hana::bool_c<(i % 2 == 0)>)...
);
}
template <typename Xs, typename Z>
static constexpr auto apply(Xs&& xs, Z&& z) {
constexpr std::size_t size = decltype(hana::length(xs))::value;
constexpr std::size_t new_size = size == 0 ? 0 : (size * 2) - 1;
return intersperse_helper(static_cast<Xs&&>(xs), static_cast<Z&&>(z),
std::make_index_sequence<new_size>{});
}
};
}}
# 123 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/is_disjoint.hpp" 1 3 4
# 13 "/usr/include/boost/hana/is_disjoint.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/is_disjoint.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/is_disjoint.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/is_disjoint.hpp" 3 4
template <typename S1, typename S2, typename = void>
struct is_disjoint_impl : is_disjoint_impl<S1, S2, when<true>> { };
struct is_disjoint_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr is_disjoint_t is_disjoint{};
}}
# 14 "/usr/include/boost/hana/is_disjoint.hpp" 2 3 4
# 1 "/usr/include/boost/hana/none_of.hpp" 1 3 4
# 13 "/usr/include/boost/hana/none_of.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/none_of.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/none_of.hpp" 3 4
namespace boost { namespace hana {
# 43 "/usr/include/boost/hana/fwd/none_of.hpp" 3 4
template <typename S, typename = void>
struct none_of_impl : none_of_impl<S, when<true>> { };
struct none_of_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr none_of_t none_of{};
}}
# 14 "/usr/include/boost/hana/none_of.hpp" 2 3 4
# 22 "/usr/include/boost/hana/none_of.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto none_of_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using NoneOf = ::std::conditional_t< (hana::Searchable<S>::value), none_of_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::none_of(xs, pred) requires 'xs' to be a Searchable");
return NoneOf::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct none_of_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::not_(hana::any_of(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred)));
}
};
}}
# 20 "/usr/include/boost/hana/is_disjoint.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto is_disjoint_t::operator()(Xs&& xs, Ys&& ys) const {
using S1 = typename hana::tag_of<Xs>::type;
using S2 = typename hana::tag_of<Ys>::type;
using IsDisjoint = ::std::conditional_t< (hana::Searchable<S1>::value && hana::Searchable<S2>::value), decltype(is_disjoint_impl<S1, S2>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S1>::value,
"hana::is_disjoint(xs, ys) requires 'xs' to be Searchable");
static_assert(hana::Searchable<S2>::value,
"hana::is_disjoint(xs, ys) requires 'ys' to be Searchable");
return IsDisjoint::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
namespace detail {
template <typename Ys>
struct in_by_reference {
Ys const& ys;
template <typename X>
constexpr auto operator()(X const& x) const
{ return hana::contains(ys, x); }
};
}
template <typename S1, typename S2, bool condition>
struct is_disjoint_impl<S1, S2, when<condition>> : default_ {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs const& xs, Ys const& ys) {
return hana::none_of(xs, detail::in_by_reference<Ys>{ys});
}
};
}}
# 124 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/is_subset.hpp" 1 3 4
# 13 "/usr/include/boost/hana/is_subset.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/is_subset.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/is_subset.hpp" 3 4
namespace boost { namespace hana {
# 67 "/usr/include/boost/hana/fwd/is_subset.hpp" 3 4
template <typename S1, typename S2, typename = void>
struct is_subset_impl : is_subset_impl<S1, S2, when<true>> { };
struct is_subset_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr auto is_subset = hana::infix(is_subset_t{});
}}
# 14 "/usr/include/boost/hana/is_subset.hpp" 2 3 4
# 26 "/usr/include/boost/hana/is_subset.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto is_subset_t::operator()(Xs&& xs, Ys&& ys) const {
using S1 = typename hana::tag_of<Xs>::type;
using S2 = typename hana::tag_of<Ys>::type;
using IsSubset = ::std::conditional_t< (hana::Searchable<S1>::value && hana::Searchable<S2>::value && !is_default<is_subset_impl<S1, S2>>::value), decltype(is_subset_impl<S1, S2>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S1>::value,
"hana::is_subset(xs, ys) requires 'xs' to be Searchable");
static_assert(hana::Searchable<S2>::value,
"hana::is_subset(xs, ys) requires 'ys' to be Searchable");
static_assert(!is_default<is_subset_impl<S1, S2>>::value,
"hana::is_subset(xs, ys) requires 'xs' and 'ys' to be embeddable "
"in a common Searchable");
return IsSubset::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename S1, typename S2, bool condition>
struct is_subset_impl<S1, S2, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S, bool condition>
struct is_subset_impl<S, S, when<condition>> {
template <typename Xs, typename Ys>
static constexpr decltype(auto) apply(Xs&& xs, Ys&& ys) {
return hana::all_of(static_cast<Xs&&>(xs),
hana::partial(hana::contains, static_cast<Ys&&>(ys)));
}
};
template <typename S1, typename S2>
struct is_subset_impl<S1, S2, when<
detail::has_nontrivial_common_embedding<Searchable, S1, S2>::value
>> {
using C = typename common<S1, S2>::type;
template <typename Xs, typename Ys>
static constexpr decltype(auto) apply(Xs&& xs, Ys&& ys) {
return hana::is_subset(hana::to<C>(static_cast<Xs&&>(xs)),
hana::to<C>(static_cast<Ys&&>(ys)));
}
};
}}
# 126 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/keys.hpp" 1 3 4
# 13 "/usr/include/boost/hana/keys.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/keys.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/keys.hpp" 3 4
namespace boost { namespace hana {
template <typename T, typename = void>
struct keys_impl : keys_impl<T, when<true>> { };
struct keys_t {
template <typename Map>
constexpr auto operator()(Map&& map) const;
};
constexpr keys_t keys{};
# 48 "/usr/include/boost/hana/fwd/keys.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/keys.hpp" 2 3 4
# 23 "/usr/include/boost/hana/keys.hpp" 3 4
namespace boost { namespace hana {
template <typename Map>
constexpr auto keys_t::operator()(Map&& map) const {
return keys_impl<typename hana::tag_of<Map>::type>::apply(
static_cast<Map&&>(map)
);
}
template <typename T, bool condition>
struct keys_impl<T, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
template <typename S>
struct keys_impl<S, when<hana::Struct<S>::value>> {
template <typename Object>
static constexpr auto apply(Object const&) {
return hana::transform(hana::accessors<S>(), hana::first);
}
};
}}
# 127 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/map.hpp" 1 3 4
# 13 "/usr/include/boost/hana/map.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/map.hpp" 1 3 4
# 21 "/usr/include/boost/hana/fwd/map.hpp" 3 4
namespace boost { namespace hana {
# 94 "/usr/include/boost/hana/fwd/map.hpp" 3 4
template <typename HashTable, typename Storage>
struct map;
struct map_tag { };
# 135 "/usr/include/boost/hana/fwd/map.hpp" 3 4
constexpr auto make_map = make<map_tag>;
constexpr auto to_map = to<map_tag>;
# 166 "/usr/include/boost/hana/fwd/map.hpp" 3 4
struct values_t {
template <typename Map>
constexpr decltype(auto) operator()(Map&& map) const;
};
constexpr values_t values{};
# 223 "/usr/include/boost/hana/fwd/map.hpp" 3 4
}}
# 14 "/usr/include/boost/hana/map.hpp" 2 3 4
# 28 "/usr/include/boost/hana/map.hpp" 3 4
# 1 "/usr/include/boost/hana/detail/has_duplicates.hpp" 1 3 4
# 21 "/usr/include/boost/hana/detail/has_duplicates.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename T, typename ...U>
constexpr std::size_t pack_count() {
std::size_t c = 0;
std::size_t expand[] = {0,
(decltype(hana::equal(std::declval<T>(), std::declval<U>()))::value
? ++c
: c)...
};
(void)expand;
return c;
}
# 56 "/usr/include/boost/hana/detail/has_duplicates.hpp" 3 4
template <typename ...T>
struct has_duplicates {
static constexpr bool value =
sizeof...(T) > 0 &&
!detail::fast_and<(detail::pack_count<T, T...>() == 1)...>::value
;
};
} }}
# 29 "/usr/include/boost/hana/map.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/hash_table.hpp" 1 3 4
# 15 "/usr/include/boost/hana/detail/hash_table.hpp" 3 4
# 1 "/usr/include/boost/hana/ext/std/integer_sequence.hpp" 1 3 4
# 16 "/usr/include/boost/hana/ext/std/integer_sequence.hpp" 3 4
# 1 "/usr/include/boost/hana/ext/std/integral_constant.hpp" 1 3 4
# 42 "/usr/include/boost/hana/ext/std/integral_constant.hpp" 3 4
namespace boost { namespace hana {
namespace ext { namespace std {
template <typename T>
struct integral_constant_tag { using value_type = T; };
}}
namespace detail {
template <typename T, T v>
constexpr bool
is_std_integral_constant(std::integral_constant<T, v>*)
{ return true; }
constexpr bool is_std_integral_constant(...)
{ return false; }
template <typename T, T v>
constexpr bool
is_hana_integral_constant(hana::integral_constant<T, v>*)
{ return true; }
constexpr bool is_hana_integral_constant(...)
{ return false; }
}
template <typename T>
struct tag_of<T, when<
detail::is_std_integral_constant((T*)0) &&
!detail::is_hana_integral_constant((T*)0)
>> {
using type = ext::std::integral_constant_tag<
typename hana::tag_of<typename T::value_type>::type
>;
};
template <typename T>
struct IntegralConstant<ext::std::integral_constant_tag<T>> {
static constexpr bool value = true;
};
template <typename T, typename C>
struct to_impl<ext::std::integral_constant_tag<T>, C, when<
hana::IntegralConstant<C>::value
>> : embedding<is_embedded<typename C::value_type, T>{}> {
template <typename N>
static constexpr auto apply(N const&) {
return std::integral_constant<T, N::value>{};
}
};
}}
# 17 "/usr/include/boost/hana/ext/std/integer_sequence.hpp" 2 3 4
# 65 "/usr/include/boost/hana/ext/std/integer_sequence.hpp" 3 4
namespace boost { namespace hana {
namespace ext { namespace std { struct integer_sequence_tag; }}
template <typename T, T ...v>
struct tag_of<std::integer_sequence<T, v...>> {
using type = ext::std::integer_sequence_tag;
};
template <>
struct equal_impl<ext::std::integer_sequence_tag, ext::std::integer_sequence_tag> {
template <typename X, X ...xs, typename Y, Y ...ys>
static constexpr hana::bool_<detail::fast_and<(xs == ys)...>::value>
apply(std::integer_sequence<X, xs...> const&, std::integer_sequence<Y, ys...> const&)
{ return {}; }
template <typename Xs, typename Ys>
static constexpr hana::false_ apply(Xs const&, Ys const&, ...)
{ return {}; }
};
template <>
struct unpack_impl<ext::std::integer_sequence_tag> {
template <typename T, T ...v, typename F>
static constexpr decltype(auto)
apply(std::integer_sequence<T, v...> const&, F&& f) {
return static_cast<F&&>(f)(std::integral_constant<T, v>{}...);
}
};
template <>
struct at_impl<ext::std::integer_sequence_tag> {
template <typename T, T ...v, typename N>
static constexpr auto apply(std::integer_sequence<T, v...> const&, N const&) {
constexpr std::size_t n = N::value;
constexpr T values[] = {v...};
return std::integral_constant<T, values[n]>{};
}
};
template <>
struct drop_front_impl<ext::std::integer_sequence_tag> {
template <std::size_t n, typename T, T ...t, std::size_t ...i>
static constexpr auto drop_front_helper(std::integer_sequence<T, t...>,
std::index_sequence<i...>)
{
constexpr T ts[sizeof...(t)+1] = {t...};
return std::integer_sequence<T, ts[n + i]...>{};
}
template <typename T, T ...t, typename N>
static constexpr auto apply(std::integer_sequence<T, t...> ts, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t len = sizeof...(t);
return drop_front_helper<n>(ts,
std::make_index_sequence<(n < len ? len - n : 0)>{});
}
};
template <>
struct is_empty_impl<ext::std::integer_sequence_tag> {
template <typename T, T ...xs>
static constexpr auto apply(std::integer_sequence<T, xs...> const&)
{ return hana::bool_c<sizeof...(xs) == 0>; }
};
}}
# 16 "/usr/include/boost/hana/detail/hash_table.hpp" 2 3 4
# 1 "/usr/include/boost/hana/hash.hpp" 1 3 4
# 15 "/usr/include/boost/hana/hash.hpp" 3 4
# 1 "/usr/include/boost/hana/concept/hashable.hpp" 1 3 4
# 14 "/usr/include/boost/hana/concept/hashable.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/concept/hashable.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/concept/hashable.hpp" 3 4
namespace boost { namespace hana {
# 64 "/usr/include/boost/hana/fwd/concept/hashable.hpp" 3 4
template <typename T>
struct Hashable;
}}
# 15 "/usr/include/boost/hana/concept/hashable.hpp" 2 3 4
# 1 "/usr/include/boost/hana/hash.hpp" 1 3 4
# 20 "/usr/include/boost/hana/concept/hashable.hpp" 2 3 4
namespace boost { namespace hana {
template <typename T>
struct Hashable {
using Tag = typename tag_of<T>::type;
static constexpr bool value = !is_default<hash_impl<Tag>>::value;
};
}}
# 16 "/usr/include/boost/hana/hash.hpp" 2 3 4
# 25 "/usr/include/boost/hana/hash.hpp" 3 4
namespace boost { namespace hana {
template <typename X>
constexpr auto hash_t::operator()(X const& x) const {
using Tag = typename hana::tag_of<X>::type;
using Hash = ::std::conditional_t< (hana::Hashable<Tag>::value), hash_impl<Tag>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Hashable<Tag>::value,
"hana::hash(x) requires 'x' to be Hashable");
return Hash::apply(x);
}
template <typename Tag, bool condition>
struct hash_impl<Tag, when<condition>> : default_ {
template <typename X>
static constexpr auto apply(X const&) = delete;
};
namespace detail {
template <typename T, typename = void>
struct hash_integral_helper;
template <typename Member, typename T>
struct hash_integral_helper<Member T::*> {
template <typename X>
static constexpr auto apply(X const&) {
return hana::type_c<hana::integral_constant<Member T::*, X::value>>;
}
};
template <typename T>
struct hash_integral_helper<T,
typename std::enable_if<std::is_signed<T>::value>::type
> {
template <typename X>
static constexpr auto apply(X const&) {
constexpr signed long long x = X::value;
return hana::type_c<hana::integral_constant<signed long long, x>>;
}
};
template <typename T>
struct hash_integral_helper<T,
typename std::enable_if<std::is_unsigned<T>::value>::type
> {
template <typename X>
static constexpr auto apply(X const&) {
constexpr unsigned long long x = X::value;
return hana::type_c<hana::integral_constant<unsigned long long, x>>;
}
};
template <>
struct hash_integral_helper<bool> {
template <typename X>
static constexpr auto apply(X const&) {
return hana::type_c<hana::integral_constant<bool, X::value>>;
}
};
template <>
struct hash_integral_helper<char> {
template <typename X>
static constexpr auto apply(X const&) {
using T = std::conditional<std::is_signed<char>::value,
signed long long, unsigned long long
>::type;
constexpr T x = X::value;
return hana::type_c<hana::integral_constant<T, x>>;
}
};
}
template <typename Tag>
struct hash_impl<Tag, when<hana::IntegralConstant<Tag>::value>> {
template <typename X>
static constexpr auto apply(X const& x) {
using T = typename std::remove_cv<decltype(X::value)>::type;
return detail::hash_integral_helper<T>::apply(x);
}
};
}}
# 20 "/usr/include/boost/hana/detail/hash_table.hpp" 2 3 4
# 1 "/usr/include/boost/hana/range.hpp" 1 3 4
# 13 "/usr/include/boost/hana/range.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/range.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/range.hpp" 3 4
namespace boost { namespace hana {
# 80 "/usr/include/boost/hana/fwd/range.hpp" 3 4
template <typename T, T from, T to>
struct range;
struct range_tag { };
# 114 "/usr/include/boost/hana/fwd/range.hpp" 3 4
constexpr auto make_range = make<range_tag>;
# 144 "/usr/include/boost/hana/fwd/range.hpp" 3 4
template <typename T, T from, T to>
constexpr range<T, from, to> range_c{};
}}
# 14 "/usr/include/boost/hana/range.hpp" 2 3 4
# 34 "/usr/include/boost/hana/range.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/maximum.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/maximum.hpp" 3 4
namespace boost { namespace hana {
# 98 "/usr/include/boost/hana/fwd/maximum.hpp" 3 4
template <typename T, typename = void>
struct maximum_impl : maximum_impl<T, when<true>> { };
template <typename T, typename = void>
struct maximum_pred_impl : maximum_pred_impl<T, when<true>> { };
struct maximum_t : detail::nested_by<maximum_t> {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const;
template <typename Xs, typename Predicate>
constexpr decltype(auto) operator()(Xs&& xs, Predicate&& pred) const;
};
constexpr maximum_t maximum{};
}}
# 35 "/usr/include/boost/hana/range.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/minimum.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/minimum.hpp" 3 4
namespace boost { namespace hana {
# 98 "/usr/include/boost/hana/fwd/minimum.hpp" 3 4
template <typename T, typename = void>
struct minimum_impl : minimum_impl<T, when<true>> { };
template <typename T, typename = void>
struct minimum_pred_impl : minimum_pred_impl<T, when<true>> { };
struct minimum_t : detail::nested_by<minimum_t> {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const;
template <typename Xs, typename Predicate>
constexpr decltype(auto) operator()(Xs&& xs, Predicate&& pred) const;
};
constexpr minimum_t minimum{};
}}
# 36 "/usr/include/boost/hana/range.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/product.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/product.hpp" 3 4
namespace boost { namespace hana {
# 59 "/usr/include/boost/hana/fwd/product.hpp" 3 4
template <typename T, typename = void>
struct product_impl : product_impl<T, when<true>> { };
template <typename R>
struct product_t;
template <typename R = integral_constant_tag<int>>
constexpr product_t<R> product{};
}}
# 37 "/usr/include/boost/hana/range.hpp" 2 3 4
# 1 "/usr/include/boost/hana/fwd/sum.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/sum.hpp" 3 4
namespace boost { namespace hana {
# 68 "/usr/include/boost/hana/fwd/sum.hpp" 3 4
template <typename T, typename = void>
struct sum_impl : sum_impl<T, when<true>> { };
template <typename M>
struct sum_t;
template <typename M = integral_constant_tag<int>>
constexpr sum_t<M> sum{};
}}
# 38 "/usr/include/boost/hana/range.hpp" 2 3 4
# 47 "/usr/include/boost/hana/range.hpp" 3 4
namespace boost { namespace hana {
template <typename T, T From, T To>
struct range
: detail::operators::adl<range<T, From, To>>
, detail::iterable_operators<range<T, From, To>>
{
static_assert(From <= To,
"hana::make_range(from, to) requires 'from <= to'");
using value_type = T;
static constexpr value_type from = From;
static constexpr value_type to = To;
};
template <typename T, T From, T To>
struct tag_of<range<T, From, To>> {
using type = range_tag;
};
template <>
struct make_impl<range_tag> {
template <typename From, typename To>
static constexpr auto apply(From const&, To const&) {
static_assert(hana::IntegralConstant<From>::value,
"hana::make_range(from, to) requires 'from' to be an IntegralConstant");
static_assert(hana::IntegralConstant<To>::value,
"hana::make_range(from, to) requires 'to' to be an IntegralConstant");
using T = typename common<
typename hana::tag_of<From>::type::value_type,
typename hana::tag_of<To>::type::value_type
>::type;
constexpr T from = hana::to<T>(From::value);
constexpr T to = hana::to<T>(To::value);
return range<T, from, to>{};
}
};
namespace detail {
template <>
struct comparable_operators<range_tag> {
static constexpr bool value = true;
};
}
template <>
struct equal_impl<range_tag, range_tag> {
template <typename R1, typename R2>
static constexpr auto apply(R1 const&, R2 const&) {
return hana::bool_c<
(R1::from == R1::to && R2::from == R2::to) ||
(R1::from == R2::from && R1::to == R2::to)
>;
}
};
template <>
struct unpack_impl<range_tag> {
template <typename T, T from, typename F, T ...v>
static constexpr decltype(auto)
unpack_helper(F&& f, std::integer_sequence<T, v...>) {
return static_cast<F&&>(f)(integral_constant<T, from + v>{}...);
}
template <typename T, T from, T to, typename F>
static constexpr decltype(auto) apply(range<T, from, to> const&, F&& f) {
return unpack_helper<T, from>(static_cast<F&&>(f),
std::make_integer_sequence<T, to - from>{});
}
};
template <>
struct length_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return hana::size_c<static_cast<std::size_t>(to - from)>; }
};
template <>
struct minimum_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return integral_c<T, from>; }
};
template <>
struct maximum_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return integral_c<T, to-1>; }
};
template <>
struct sum_impl<range_tag> {
template <typename I>
static constexpr I sum_helper(I m, I n) {
if (m == n)
return m;
else if (0 == m)
return n * (n+1) / 2;
else if (0 < m)
return sum_helper(0, n) - sum_helper(0, m-1);
else if (0 <= n)
return sum_helper(0, n) - sum_helper(0, -m);
else
return -sum_helper(-n, -m);
}
template <typename, typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&) {
return integral_c<T, from == to ? 0 : sum_helper(from, to-1)>;
}
};
template <>
struct product_impl<range_tag> {
template <typename I>
static constexpr I product_helper(I m, I n) {
if (m <= 0 && 0 < n)
return 0;
else {
I p = 1;
for (; m != n; ++m)
p *= m;
return p;
}
}
template <typename, typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return integral_c<T, product_helper(from, to)>; }
};
template <>
struct find_impl<range_tag> {
template <typename T, T from, typename N>
static constexpr auto find_helper(hana::true_) {
constexpr T n = N::value;
return hana::just(hana::integral_c<T, n>);
}
template <typename T, T from, typename N>
static constexpr auto find_helper(hana::false_)
{ return hana::nothing; }
template <typename T, T from, T to, typename N>
static constexpr auto apply(range<T, from, to> const&, N const&) {
constexpr auto n = N::value;
return find_helper<T, from, N>(hana::bool_c<(n >= from && n < to)>);
}
};
template <>
struct contains_impl<range_tag> {
template <typename T, T from, T to, typename N>
static constexpr auto apply(range<T, from, to> const&, N const&) {
constexpr auto n = N::value;
return bool_c<(n >= from && n < to)>;
}
};
template <>
struct front_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return integral_c<T, from>; }
};
template <>
struct is_empty_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return bool_c<from == to>; }
};
template <>
struct at_impl<range_tag> {
template <typename T, T from, T to, typename N>
static constexpr auto apply(range<T, from, to> const&, N const&) {
constexpr auto n = N::value;
return integral_c<T, from + n>;
}
};
template <>
struct back_impl<range_tag> {
template <typename T, T from, T to>
static constexpr auto apply(range<T, from, to> const&)
{ return integral_c<T, to - 1>; }
};
template <>
struct drop_front_impl<range_tag> {
template <typename T, T from, T to, typename N>
static constexpr auto apply(range<T, from, to> const&, N const&) {
constexpr auto n = N::value;
return range<T, (to < from + n ? to : from + n), to>{};
}
};
template <>
struct drop_front_exactly_impl<range_tag> {
template <typename T, T from, T to, typename N>
static constexpr auto apply(range<T, from, to> const&, N const&) {
constexpr auto n = N::value;
return range<T, from + n, to>{};
}
};
}}
# 22 "/usr/include/boost/hana/detail/hash_table.hpp" 2 3 4
# 30 "/usr/include/boost/hana/detail/hash_table.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Hash, std::size_t ...i>
struct bucket { };
template <typename ...Buckets>
struct hash_table
: Buckets...
{ };
template <typename Hash, std::size_t ...i>
std::index_sequence<i...> find_indices_impl(bucket<Hash, i...> const&);
template <typename Hash>
std::index_sequence<> find_indices_impl(...);
template <typename Map, typename Key>
struct find_indices {
using Hash = typename decltype(hana::hash(std::declval<Key>()))::type;
using type = decltype(detail::find_indices_impl<Hash>(std::declval<Map>()));
};
template <template <std::size_t> class KeyAtIndex, typename Key>
struct find_pred {
template <typename Index>
auto operator()(Index const&) const -> decltype(
hana::equal(std::declval<KeyAtIndex<Index::value>>(),
std::declval<Key>())
);
};
template <typename Indices, typename Key, template <std::size_t> class KeyAtIndex>
struct find_index_impl {
using type = decltype(hana::find_if(Indices{}, find_pred<KeyAtIndex, Key>{}));
};
template <std::size_t i, typename Key, template <std::size_t> class KeyAtIndex>
struct find_index_impl<std::index_sequence<i>, Key, KeyAtIndex> {
using Equal = decltype(
hana::equal(std::declval<KeyAtIndex<i>>(),
std::declval<Key>())
);
using type = typename std::conditional<Equal::value,
hana::optional<std::integral_constant<std::size_t, i>>,
hana::optional<>
>::type;
};
template <typename Map, typename Key, template <std::size_t> class KeyAtIndex>
struct find_index {
using Indices = typename find_indices<Map, Key>::type;
using type = typename find_index_impl<Indices, Key, KeyAtIndex>::type;
};
template <typename Bucket, typename Hash, std::size_t Index>
struct update_bucket {
using type = Bucket;
};
template <std::size_t ...i, typename Hash, std::size_t Index>
struct update_bucket<bucket<Hash, i...>, Hash, Index> {
using type = bucket<Hash, i..., Index>;
};
template <typename Map, typename Key, std::size_t Index, bool =
(find_indices<Map, Key>::type::size() > 0)
>
struct bucket_insert;
template <typename ...Buckets, typename Key, std::size_t Index>
struct bucket_insert<hash_table<Buckets...>, Key, Index, true> {
using Hash = typename decltype(hana::hash(std::declval<Key>()))::type;
using type = hash_table<typename update_bucket<Buckets, Hash, Index>::type...>;
};
template <typename ...Buckets, typename Key, std::size_t Index>
struct bucket_insert<hash_table<Buckets...>, Key, Index, false> {
using Hash = typename decltype(hana::hash(std::declval<Key>()))::type;
using type = hash_table<Buckets..., bucket<Hash, Index>>;
};
template <template <std::size_t> class KeyAtIndex, std::size_t N,
typename Indices = std::make_index_sequence<N>>
struct make_hash_table;
template <template <std::size_t> class KeyAtIndex, std::size_t N, std::size_t ...i>
struct make_hash_table<KeyAtIndex, N, std::index_sequence<i...>> {
using type = hash_table<
bucket<typename decltype(hana::hash(std::declval<KeyAtIndex<i>>()))::type, i>...
>;
};
} }}
# 30 "/usr/include/boost/hana/map.hpp" 2 3 4
# 1 "/usr/include/boost/hana/detail/operators/searchable.hpp" 1 3 4
# 17 "/usr/include/boost/hana/detail/operators/searchable.hpp" 3 4
namespace boost { namespace hana { namespace detail {
template <typename Derived>
struct searchable_operators {
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) & {
return hana::at_key(static_cast<Derived&>(*this),
static_cast<Key&&>(key));
}
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) && {
return hana::at_key(static_cast<Derived&&>(*this),
static_cast<Key&&>(key));
}
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) const& {
return hana::at_key(static_cast<Derived const&>(*this),
static_cast<Key&&>(key));
}
};
} }}
# 33 "/usr/include/boost/hana/map.hpp" 2 3 4
# 50 "/usr/include/boost/hana/map.hpp" 3 4
# 1 "/usr/include/boost/hana/remove_if.hpp" 1 3 4
# 13 "/usr/include/boost/hana/remove_if.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/remove_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/remove_if.hpp" 3 4
namespace boost { namespace hana {
# 57 "/usr/include/boost/hana/fwd/remove_if.hpp" 3 4
template <typename M, typename = void>
struct remove_if_impl : remove_if_impl<M, when<true>> { };
struct remove_if_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr remove_if_t remove_if{};
}}
# 14 "/usr/include/boost/hana/remove_if.hpp" 2 3 4
# 23 "/usr/include/boost/hana/remove_if.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto remove_if_t::operator()(Xs&& xs, Pred&& pred) const {
using M = typename hana::tag_of<Xs>::type;
using RemoveIf = ::std::conditional_t< (hana::MonadPlus<M>::value), remove_if_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::remove_if(xs, predicate) requires 'xs' to be a MonadPlus");
return RemoveIf::apply(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
template <typename M, bool condition>
struct remove_if_impl<M, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::filter(static_cast<Xs&&>(xs),
hana::compose(hana::not_, static_cast<Pred&&>(pred)));
}
};
}}
# 51 "/usr/include/boost/hana/map.hpp" 2 3 4
# 59 "/usr/include/boost/hana/map.hpp" 3 4
namespace boost { namespace hana {
namespace detail {
template <>
struct comparable_operators<map_tag> {
static constexpr bool value = true;
};
}
template <typename HashTable, typename Storage>
struct map
: detail::searchable_operators<map<HashTable, Storage>>
, detail::operators::adl<map<HashTable, Storage>>
{
using hash_table_type = HashTable;
using storage_type = Storage;
Storage storage;
using hana_tag = map_tag;
explicit constexpr map(Storage const& xs)
: storage(xs)
{ }
explicit constexpr map(Storage&& xs)
: storage(static_cast<Storage&&>(xs))
{ }
constexpr map() = default;
constexpr map(map const& other) = default;
constexpr map(map&& other) = default;
};
namespace detail {
template <typename Storage>
struct KeyAtIndex {
template <std::size_t i>
using apply = decltype(hana::first(hana::get_impl<i>(std::declval<Storage>())));
};
}
template <>
struct make_impl<map_tag> {
template <typename ...Pairs>
static constexpr auto apply(Pairs&& ...pairs) {
# 142 "/usr/include/boost/hana/map.hpp" 3 4
using Storage = hana::basic_tuple<typename detail::decay<Pairs>::type...>;
using HashTable = typename detail::make_hash_table<
detail::KeyAtIndex<Storage>::template apply, sizeof...(Pairs)
>::type;
return map<HashTable, Storage>(
hana::make_basic_tuple(static_cast<Pairs&&>(pairs)...)
);
}
};
template <>
struct keys_impl<map_tag> {
template <typename Map>
static constexpr decltype(auto) apply(Map&& map) {
return hana::transform(static_cast<Map&&>(map).storage, hana::first);
}
};
template <typename Map>
constexpr decltype(auto) values_t::operator()(Map&& map) const {
return hana::transform(static_cast<Map&&>(map).storage, hana::second);
}
template <>
struct insert_impl<map_tag> {
template <typename Map, typename Pair>
static constexpr auto helper(Map&& map, Pair&& pair, ...) {
using RawMap = typename std::remove_reference<Map>::type;
using HashTable = typename RawMap::hash_table_type;
using NewHashTable = typename detail::bucket_insert<
HashTable,
decltype(hana::first(pair)),
decltype(hana::length(map.storage))::value
>::type;
using NewStorage = decltype(
hana::append(static_cast<Map&&>(map).storage, static_cast<Pair&&>(pair))
);
return hana::map<NewHashTable, NewStorage>(
hana::append(static_cast<Map&&>(map).storage, static_cast<Pair&&>(pair))
);
}
template <typename Map, typename Pair, std::size_t i>
static constexpr auto
helper(Map&& map, Pair&&,
hana::optional<std::integral_constant<std::size_t, i>>)
{
return static_cast<Map&&>(map);
}
template <typename Map, typename Pair>
static constexpr auto apply(Map&& map, Pair&& pair) {
using RawMap = typename std::remove_reference<Map>::type;
using Storage = typename RawMap::storage_type;
using HashTable = typename RawMap::hash_table_type;
using Key = decltype(hana::first(pair));
using MaybeIndex = typename detail::find_index<
HashTable, Key, detail::KeyAtIndex<Storage>::template apply
>::type;
return helper(static_cast<Map&&>(map), static_cast<Pair&&>(pair), MaybeIndex{});
}
};
template <>
struct erase_key_impl<map_tag> {
template <typename Map, typename Key>
static constexpr auto
erase_key_helper(Map&& map, Key const&, hana::false_) {
return static_cast<Map&&>(map);
}
template <typename Map, typename Key>
static constexpr auto
erase_key_helper(Map&& map, Key const& key, hana::true_) {
return hana::unpack(
hana::remove_if(static_cast<Map&&>(map).storage,
hana::on(hana::equal.to(key), hana::first)),
hana::make_map
);
}
template <typename Map, typename Key>
static constexpr auto apply(Map&& map, Key const& key) {
constexpr bool contains = hana::value<decltype(hana::contains(map, key))>();
return erase_key_helper(static_cast<Map&&>(map), key,
hana::bool_c<contains>);
}
};
template <>
struct equal_impl<map_tag, map_tag> {
template <typename M1, typename M2>
static constexpr auto equal_helper(M1 const&, M2 const&, hana::false_) {
return hana::false_c;
}
template <typename M1, typename M2>
static constexpr auto equal_helper(M1 const& m1, M2 const& m2, hana::true_) {
return hana::all_of(hana::keys(m1), hana::demux(equal)(
hana::partial(hana::find, m1),
hana::partial(hana::find, m2)
));
}
template <typename M1, typename M2>
static constexpr auto apply(M1 const& m1, M2 const& m2) {
return equal_impl::equal_helper(m1, m2, hana::bool_c<
decltype(hana::length(m1.storage))::value ==
decltype(hana::length(m2.storage))::value
>);
}
};
template <>
struct find_impl<map_tag> {
template <typename Map>
static constexpr auto find_helper(Map&&, ...) {
return hana::nothing;
}
template <typename Map, std::size_t i>
static constexpr auto
find_helper(Map&& map, hana::optional<std::integral_constant<std::size_t, i>>) {
return hana::just(hana::second(hana::at_c<i>(static_cast<Map&&>(map).storage)));
}
template <typename Map, typename Key>
static constexpr auto apply(Map&& map, Key const&) {
using RawMap = typename std::remove_reference<Map>::type;
using Storage = typename RawMap::storage_type;
using HashTable = typename RawMap::hash_table_type;
using MaybeIndex = typename detail::find_index<
HashTable, Key, detail::KeyAtIndex<Storage>::template apply
>::type;
return find_helper(static_cast<Map&&>(map), MaybeIndex{});
}
};
template <>
struct find_if_impl<map_tag> {
template <typename M, typename Pred>
static constexpr auto apply(M&& map, Pred&& pred) {
return hana::transform(
hana::find_if(static_cast<M&&>(map).storage,
hana::compose(static_cast<Pred&&>(pred), hana::first)),
hana::second
);
}
};
template <>
struct any_of_impl<map_tag> {
template <typename M, typename Pred>
static constexpr auto apply(M const& map, Pred const& pred)
{ return hana::any_of(hana::keys(map), pred); }
};
template <>
struct is_subset_impl<map_tag, map_tag> {
template <typename Ys>
struct all_contained {
Ys const& ys;
template <typename ...X>
constexpr auto operator()(X const& ...x) const {
return hana::bool_c<detail::fast_and<
hana::value<decltype(hana::contains(ys, x))>()...
>::value>;
}
};
template <typename Xs, typename Ys>
static constexpr auto apply(Xs const& xs, Ys const& ys) {
auto ys_keys = hana::keys(ys);
return hana::unpack(hana::keys(xs), all_contained<decltype(ys_keys)>{ys_keys});
}
};
template <>
struct at_key_impl<map_tag> {
template <typename Map, typename Key>
static constexpr decltype(auto) apply(Map&& map, Key const&) {
using RawMap = typename std::remove_reference<Map>::type;
using HashTable = typename RawMap::hash_table_type;
using Storage = typename RawMap::storage_type;
using MaybeIndex = typename detail::find_index<
HashTable, Key, detail::KeyAtIndex<Storage>::template apply
>::type;
static_assert(!decltype(hana::is_nothing(MaybeIndex{}))::value,
"hana::at_key(map, key) requires the 'key' to be present in the 'map'");
constexpr std::size_t index = decltype(*MaybeIndex{}){}();
return hana::second(hana::at_c<index>(static_cast<Map&&>(map).storage));
}
};
template <>
struct unpack_impl<map_tag> {
template <typename M, typename F>
static constexpr decltype(auto) apply(M&& map, F&& f) {
return hana::unpack(static_cast<M&&>(map).storage,
static_cast<F&&>(f));
}
};
template <typename F>
struct to_impl<map_tag, F, when<hana::Foldable<F>::value>> {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs) {
return hana::fold_left(
static_cast<Xs&&>(xs), hana::make_map(), hana::insert
);
}
};
}}
# 134 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/max.hpp" 1 3 4
# 13 "/usr/include/boost/hana/max.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/max.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/max.hpp" 3 4
namespace boost { namespace hana {
# 32 "/usr/include/boost/hana/fwd/max.hpp" 3 4
template <typename T, typename U, typename = void>
struct max_impl : max_impl<T, U, when<true>> { };
struct max_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr max_t max{};
}}
# 14 "/usr/include/boost/hana/max.hpp" 2 3 4
# 22 "/usr/include/boost/hana/max.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) max_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Max = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value), decltype(max_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::max(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::max(x, y) requires 'y' to be Orderable");
return Max::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct max_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
decltype(auto) cond = hana::less(x, y);
return hana::if_(static_cast<decltype(cond)&&>(cond),
static_cast<Y&&>(y),
static_cast<X&&>(x)
);
}
};
}}
# 135 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/maximum.hpp" 1 3 4
# 24 "/usr/include/boost/hana/maximum.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr decltype(auto) maximum_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Maximum = ::std::conditional_t< (hana::Foldable<S>::value), maximum_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::maximum(xs) requires 'xs' to be Foldable");
return Maximum::apply(static_cast<Xs&&>(xs));
}
template <typename Xs, typename Predicate>
constexpr decltype(auto) maximum_t::operator()(Xs&& xs, Predicate&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Maximum = ::std::conditional_t< (hana::Foldable<S>::value), maximum_pred_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::maximum(xs, predicate) requires 'xs' to be Foldable");
return Maximum::apply(static_cast<Xs&&>(xs),
static_cast<Predicate&&>(pred));
}
namespace detail {
template <typename Pred>
struct max_by {
Pred pred;
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const {
auto result = (*pred)(x, y);
return hana::if_(result, static_cast<Y&&>(y),
static_cast<X&&>(x));
}
};
}
template <typename T, bool condition>
struct maximum_pred_impl<T, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr decltype(auto) apply(Xs&& xs, Pred&& pred) {
return hana::fold_left(static_cast<Xs&&>(xs),
detail::max_by<decltype(&pred)>{&pred}
);
}
};
template <typename T, bool condition>
struct maximum_impl<T, when<condition>> : default_ {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs)
{ return hana::maximum(static_cast<Xs&&>(xs), hana::less); }
};
}}
# 136 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/members.hpp" 1 3 4
# 13 "/usr/include/boost/hana/members.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/members.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/members.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/members.hpp" 3 4
template <typename S, typename = void>
struct members_impl : members_impl<S, when<true>> { };
struct members_t {
template <typename Object>
constexpr auto operator()(Object&& object) const;
};
constexpr members_t members{};
}}
# 14 "/usr/include/boost/hana/members.hpp" 2 3 4
# 23 "/usr/include/boost/hana/members.hpp" 3 4
namespace boost { namespace hana {
template <typename Object>
constexpr auto members_t::operator()(Object&& object) const {
using S = typename hana::tag_of<Object>::type;
using Members = ::std::conditional_t< (hana::Struct<S>::value), members_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Struct<S>::value,
"hana::members(object) requires 'object' to be a Struct");
return Members::apply(static_cast<Object&&>(object));
}
namespace struct_detail {
template <typename Holder, typename Forward>
struct members_helper {
Holder object;
template <typename Accessor>
constexpr decltype(auto) operator()(Accessor&& accessor) const {
return hana::second(static_cast<Accessor&&>(accessor))(
static_cast<Forward>(object)
);
}
};
}
template <typename S, bool condition>
struct members_impl<S, when<condition>> : default_ {
template <typename Object>
static constexpr auto apply(Object&& object) {
return hana::transform(hana::accessors<S>(),
struct_detail::members_helper<Object&, Object&&>{object}
);
}
};
}}
# 137 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/min.hpp" 1 3 4
# 13 "/usr/include/boost/hana/min.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/min.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/min.hpp" 3 4
namespace boost { namespace hana {
# 39 "/usr/include/boost/hana/fwd/min.hpp" 3 4
template <typename T, typename U, typename = void>
struct min_impl : min_impl<T, U, when<true>> { };
struct min_t {
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const;
};
constexpr min_t min{};
}}
# 14 "/usr/include/boost/hana/min.hpp" 2 3 4
# 22 "/usr/include/boost/hana/min.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr decltype(auto) min_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using Min = ::std::conditional_t< (hana::Orderable<T>::value && hana::Orderable<U>::value), decltype(min_impl<T, U>{}), ::boost::hana::deleted_implementation >
;
static_assert(hana::Orderable<T>::value,
"hana::min(x, y) requires 'x' to be Orderable");
static_assert(hana::Orderable<U>::value,
"hana::min(x, y) requires 'y' to be Orderable");
return Min::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct min_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
decltype(auto) cond = hana::less(x, y);
return hana::if_(static_cast<decltype(cond)&&>(cond),
static_cast<X&&>(x),
static_cast<Y&&>(y)
);
}
};
}}
# 138 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/minimum.hpp" 1 3 4
# 24 "/usr/include/boost/hana/minimum.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr decltype(auto) minimum_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Minimum = ::std::conditional_t< (hana::Foldable<S>::value), minimum_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::minimum(xs) requires 'xs' to be Foldable");
return Minimum::apply(static_cast<Xs&&>(xs));
}
template <typename Xs, typename Predicate>
constexpr decltype(auto) minimum_t::operator()(Xs&& xs, Predicate&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Minimum = ::std::conditional_t< (hana::Foldable<S>::value), minimum_pred_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::minimum(xs, predicate) requires 'xs' to be Foldable");
return Minimum::apply(static_cast<Xs&&>(xs),
static_cast<Predicate&&>(pred));
}
namespace detail {
template <typename Pred>
struct min_by {
Pred pred;
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const {
auto result = (*pred)(x, y);
return hana::if_(result, static_cast<X&&>(x),
static_cast<Y&&>(y));
}
};
}
template <typename T, bool condition>
struct minimum_pred_impl<T, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr decltype(auto) apply(Xs&& xs, Pred const& pred) {
return hana::fold_left(static_cast<Xs&&>(xs),
detail::min_by<decltype(&pred)>{&pred}
);
}
};
template <typename T, bool condition>
struct minimum_impl<T, when<condition>> : default_ {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs)
{ return hana::minimum(static_cast<Xs&&>(xs), hana::less); }
};
}}
# 139 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/monadic_compose.hpp" 1 3 4
# 13 "/usr/include/boost/hana/monadic_compose.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/monadic_compose.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/monadic_compose.hpp" 3 4
namespace boost { namespace hana {
# 66 "/usr/include/boost/hana/fwd/monadic_compose.hpp" 3 4
struct monadic_compose_t {
template <typename F, typename G>
constexpr auto operator()(F&& f, G&& g) const;
};
constexpr monadic_compose_t monadic_compose{};
}}
# 14 "/usr/include/boost/hana/monadic_compose.hpp" 2 3 4
# 22 "/usr/include/boost/hana/monadic_compose.hpp" 3 4
namespace boost { namespace hana {
namespace detail {
struct monadic_compose_helper {
template <typename F, typename G, typename X>
constexpr decltype(auto) operator()(F&& f, G&& g, X&& x) const {
using M = typename hana::tag_of<decltype(g(x))>::type;
static_assert(hana::Monad<M>::value,
"hana::monadic_compose(f, g) requires 'g' to return a monadic value");
return hana::chain(static_cast<G&&>(g)(static_cast<X&&>(x)),
static_cast<F&&>(f));
}
};
}
template <typename F, typename G>
constexpr auto monadic_compose_t::operator()(F&& f, G&& g) const {
return hana::partial(detail::monadic_compose_helper{},
static_cast<F&&>(f),
static_cast<G&&>(g)
);
}
}}
# 142 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/monadic_fold_left.hpp" 1 3 4
# 13 "/usr/include/boost/hana/monadic_fold_left.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/monadic_fold_left.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/monadic_fold_left.hpp" 3 4
namespace boost { namespace hana {
# 93 "/usr/include/boost/hana/fwd/monadic_fold_left.hpp" 3 4
template <typename T, typename = void>
struct monadic_fold_left_impl : monadic_fold_left_impl<T, when<true>> { };
template <typename M>
struct monadic_fold_left_t;
template <typename M>
constexpr monadic_fold_left_t<M> monadic_fold_left{};
}}
# 14 "/usr/include/boost/hana/monadic_fold_left.hpp" 2 3 4
# 29 "/usr/include/boost/hana/monadic_fold_left.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct monadic_fold_left_t {
static_assert(hana::Monad<M>::value,
"hana::monadic_fold_left<M> requires 'M' to be a Monad");
template <typename Xs, typename State, typename F>
constexpr decltype(auto) operator()(Xs&& xs, State&& state, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using MonadicFoldLeft = ::std::conditional_t< (hana::Foldable<S>::value), monadic_fold_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::monadic_fold_left<M>(xs, state, f) requires 'xs' to be Foldable");
return MonadicFoldLeft::template apply<M>(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using MonadicFoldLeft = ::std::conditional_t< (hana::Foldable<S>::value), monadic_fold_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::monadic_fold_left<M>(xs, f) requires 'xs' to be Foldable");
return MonadicFoldLeft::template apply<M>(static_cast<Xs&&>(xs),
static_cast<F&&>(f));
}
};
namespace detail {
struct foldlM_helper {
template <typename F, typename X, typename K, typename Z>
constexpr decltype(auto) operator()(F&& f, X&& x, K&& k, Z&& z) const {
return hana::chain(
static_cast<F&&>(f)(
static_cast<Z&&>(z),
static_cast<X&&>(x)
),
static_cast<K&&>(k)
);
}
};
template <typename End, typename M, typename F>
struct monadic_foldl1_helper {
F f;
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const
{ return f(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename Y>
constexpr decltype(auto) operator()(End, Y&& y) const
{ return hana::lift<M>(static_cast<Y&&>(y)); }
};
}
template <typename T, bool condition>
struct monadic_fold_left_impl<T, when<condition>> : default_ {
template <typename M, typename Xs, typename S, typename F>
static constexpr decltype(auto) apply(Xs&& xs, S&& s, F&& f) {
return hana::fold_right(
static_cast<Xs&&>(xs),
hana::lift<M>,
hana::curry<3>(hana::partial(
detail::foldlM_helper{}, static_cast<F&&>(f)
))
)(static_cast<S&&>(s));
}
template <typename M, typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
struct end { };
using G = detail::monadic_foldl1_helper<end, M, typename detail::decay<F>::type>;
decltype(auto) result = hana::monadic_fold_left<M>(
static_cast<Xs&&>(xs),
end{},
G{static_cast<F&&>(f)}
);
static_assert(!std::is_same<
std::remove_reference_t<decltype(result)>,
decltype(hana::lift<M>(end{}))
>{},
"hana::monadic_fold_left<M>(xs, f) requires 'xs' to be non-empty");
return result;
}
};
}}
# 143 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/monadic_fold_right.hpp" 1 3 4
# 13 "/usr/include/boost/hana/monadic_fold_right.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/monadic_fold_right.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/monadic_fold_right.hpp" 3 4
namespace boost { namespace hana {
# 95 "/usr/include/boost/hana/fwd/monadic_fold_right.hpp" 3 4
template <typename T, typename = void>
struct monadic_fold_right_impl : monadic_fold_right_impl<T, when<true>> { };
template <typename M>
struct monadic_fold_right_t;
template <typename M>
constexpr monadic_fold_right_t<M> monadic_fold_right{};
}}
# 14 "/usr/include/boost/hana/monadic_fold_right.hpp" 2 3 4
# 29 "/usr/include/boost/hana/monadic_fold_right.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct monadic_fold_right_t {
static_assert(hana::Monad<M>::value,
"hana::monadic_fold_right<M> requires 'M' to be a Monad");
template <typename Xs, typename State, typename F>
constexpr decltype(auto) operator()(Xs&& xs, State&& state, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using MonadicFoldRight = ::std::conditional_t< (hana::Foldable<S>::value), monadic_fold_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::monadic_fold_right<M>(xs, state, f) requires 'xs' to be Foldable");
return MonadicFoldRight::template apply<M>(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
static_cast<F&&>(f));
}
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const {
using S = typename hana::tag_of<Xs>::type;
using MonadicFoldRight = ::std::conditional_t< (hana::Foldable<S>::value), monadic_fold_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::monadic_fold_right<M>(xs, f) requires 'xs' to be Foldable");
return MonadicFoldRight::template apply<M>(static_cast<Xs&&>(xs),
static_cast<F&&>(f));
}
};
namespace detail {
struct foldrM_helper {
template <typename F, typename K, typename X, typename Z>
constexpr decltype(auto) operator()(F&& f, K&& k, X&& x, Z&& z) const {
return hana::chain(
static_cast<F&&>(f)(
static_cast<X&&>(x),
static_cast<Z&&>(z)
),
static_cast<K&&>(k)
);
}
};
template <typename End, typename M, typename F>
struct monadic_foldr1_helper {
F f;
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const
{ return f(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X>
constexpr decltype(auto) operator()(X&& x, End) const
{ return hana::lift<M>(static_cast<X&&>(x)); }
};
}
template <typename T, bool condition>
struct monadic_fold_right_impl<T, when<condition>> : default_ {
template <typename M, typename Xs, typename S, typename F>
static constexpr decltype(auto) apply(Xs&& xs, S&& s, F&& f) {
return hana::fold_left(
static_cast<Xs&&>(xs),
hana::lift<M>,
hana::curry<3>(hana::partial(
detail::foldrM_helper{}, static_cast<F&&>(f)
))
)(static_cast<S&&>(s));
}
template <typename M, typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
struct end { };
using G = detail::monadic_foldr1_helper<end, M, typename detail::decay<F>::type>;
decltype(auto) result = hana::monadic_fold_right<M>(
static_cast<Xs&&>(xs),
end{},
G{static_cast<F&&>(f)}
);
static_assert(!std::is_same<
std::remove_reference_t<decltype(result)>,
decltype(hana::lift<M>(end{}))
>{},
"hana::monadic_fold_right<M>(xs, f) requires 'xs' to be non-empty");
return result;
}
};
}}
# 144 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/none.hpp" 1 3 4
# 13 "/usr/include/boost/hana/none.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/none.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/none.hpp" 3 4
namespace boost { namespace hana {
# 34 "/usr/include/boost/hana/fwd/none.hpp" 3 4
template <typename S, typename = void>
struct none_impl : none_impl<S, when<true>> { };
struct none_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr none_t none{};
}}
# 14 "/usr/include/boost/hana/none.hpp" 2 3 4
# 22 "/usr/include/boost/hana/none.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto none_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using None = ::std::conditional_t< (hana::Searchable<S>::value), none_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Searchable<S>::value,
"hana::none(xs) requires 'xs' to be a Searchable");
return None::apply(static_cast<Xs&&>(xs));
}
template <typename S, bool condition>
struct none_impl<S, when<condition>> : default_ {
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return hana::none_of(static_cast<Xs&&>(xs), hana::id); }
};
}}
# 147 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/not_equal.hpp" 1 3 4
# 25 "/usr/include/boost/hana/not_equal.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename Y>
constexpr auto not_equal_t::operator()(X&& x, Y&& y) const {
using T = typename hana::tag_of<X>::type;
using U = typename hana::tag_of<Y>::type;
using NotEqual = not_equal_impl<T, U>;
return NotEqual::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
}
template <typename T, typename U, bool condition>
struct not_equal_impl<T, U, when<condition>> : default_ {
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::not_(hana::equal(static_cast<X&&>(x),
static_cast<Y&&>(y)));
}
};
template <typename T, typename U>
struct not_equal_impl<T, U, when<
detail::has_nontrivial_common_embedding<Comparable, T, U>::value
>> {
using C = typename hana::common<T, U>::type;
template <typename X, typename Y>
static constexpr decltype(auto) apply(X&& x, Y&& y) {
return hana::not_equal(hana::to<C>(static_cast<X&&>(x)),
hana::to<C>(static_cast<Y&&>(y)));
}
};
}}
# 150 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/ordering.hpp" 1 3 4
# 13 "/usr/include/boost/hana/ordering.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/ordering.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/ordering.hpp" 3 4
namespace boost { namespace hana {
# 56 "/usr/include/boost/hana/fwd/ordering.hpp" 3 4
struct ordering_t {
template <typename F>
constexpr auto operator()(F&& f) const;
};
constexpr ordering_t ordering{};
}}
# 14 "/usr/include/boost/hana/ordering.hpp" 2 3 4
namespace boost { namespace hana {
namespace detail {
template <typename F>
struct less_by {
F f;
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) const&
{ return hana::less(f(static_cast<X&&>(x)), f(static_cast<Y&&>(y))); }
template <typename X, typename Y>
constexpr decltype(auto) operator()(X&& x, Y&& y) &
{ return hana::less(f(static_cast<X&&>(x)), f(static_cast<Y&&>(y))); }
};
}
template <typename F>
constexpr auto ordering_t::operator()(F&& f) const {
return detail::less_by<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
}}
# 154 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/partition.hpp" 1 3 4
# 13 "/usr/include/boost/hana/partition.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/partition.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/partition.hpp" 3 4
namespace boost { namespace hana {
# 69 "/usr/include/boost/hana/fwd/partition.hpp" 3 4
template <typename S, typename = void>
struct partition_impl : partition_impl<S, when<true>> { };
struct partition_t : detail::nested_by<partition_t> {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr partition_t partition{};
}}
# 14 "/usr/include/boost/hana/partition.hpp" 2 3 4
# 31 "/usr/include/boost/hana/partition.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto partition_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Partition = ::std::conditional_t< (hana::Sequence<S>::value), partition_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::partition(xs, pred) requires 'xs' to be a Sequence");
return Partition::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
namespace detail {
template <bool ...B>
struct partition_indices {
static constexpr bool results[] = {B..., false};
static constexpr std::size_t left_size =
detail::count(results, results + sizeof...(B), true);
static constexpr std::size_t right_size = sizeof...(B) - left_size;
static constexpr auto compute_left() {
detail::array<std::size_t, left_size> indices{};
std::size_t* left = &indices[0];
for (std::size_t i = 0; i < sizeof...(B); ++i)
if (results[i])
*left++ = i;
return indices;
}
static constexpr auto compute_right() {
detail::array<std::size_t, right_size> indices{};
std::size_t* right = &indices[0];
for (std::size_t i = 0; i < sizeof...(B); ++i)
if (!results[i])
*right++ = i;
return indices;
}
static constexpr auto left = compute_left();
static constexpr auto right = compute_right();
template <typename S, typename Xs, std::size_t ...l, std::size_t ...r>
static constexpr auto apply(Xs&& xs, std::index_sequence<l...>,
std::index_sequence<r...>)
{
return hana::make<hana::pair_tag>(
hana::make<S>(hana::at_c<left[l]>(static_cast<Xs&&>(xs))...),
hana::make<S>(hana::at_c<right[r]>(static_cast<Xs&&>(xs))...)
);
}
};
template <typename Pred>
struct deduce_partition_indices {
template <typename ...Xs>
auto operator()(Xs&& ...xs) const -> detail::partition_indices<
static_cast<bool>(detail::decay<
decltype(std::declval<Pred>()(static_cast<Xs&&>(xs)))
>::type::value)...
> { return {}; }
};
}
template <typename S, bool condition>
struct partition_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
using Indices = decltype(hana::unpack(
static_cast<Xs&&>(xs), detail::deduce_partition_indices<Pred&&>{}
));
return Indices::template apply<S>(
static_cast<Xs&&>(xs),
std::make_index_sequence<Indices::left_size>{},
std::make_index_sequence<Indices::right_size>{}
);
}
};
}}
# 156 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/permutations.hpp" 1 3 4
# 13 "/usr/include/boost/hana/permutations.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/permutations.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/permutations.hpp" 3 4
namespace boost { namespace hana {
# 38 "/usr/include/boost/hana/fwd/permutations.hpp" 3 4
template <typename S, typename = void>
struct permutations_impl : permutations_impl<S, when<true>> { };
struct permutations_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr permutations_t permutations{};
}}
# 14 "/usr/include/boost/hana/permutations.hpp" 2 3 4
# 27 "/usr/include/boost/hana/permutations.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto permutations_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Permutations = ::std::conditional_t< (hana::Sequence<S>::value), permutations_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::permutations(xs) requires 'xs' to be a Sequence");
return Permutations::apply(static_cast<Xs&&>(xs));
}
namespace detail {
template <std::size_t N>
struct permutation_indices {
static constexpr auto value =
detail::array<std::size_t, N>{}.iota(0).permutations();
};
}
template <typename S, bool condition>
struct permutations_impl<S, when<condition>> : default_ {
template <std::size_t n, typename Xs, std::size_t ...i>
static constexpr auto
nth_permutation(Xs const& xs, std::index_sequence<i...>) {
constexpr auto indices = detail::permutation_indices<sizeof...(i)>::value;
(void)indices;
return hana::make<S>(hana::at_c<indices[n][i]>(xs)...);
}
template <std::size_t N, typename Xs, std::size_t ...n>
static constexpr auto
permutations_helper(Xs const& xs, std::index_sequence<n...>) {
return hana::make<S>(nth_permutation<n>(xs, std::make_index_sequence<N>{})...);
}
template <typename Xs>
static constexpr auto apply(Xs const& xs) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
constexpr std::size_t total_perms = detail::factorial(N);
return permutations_helper<N>(xs, std::make_index_sequence<total_perms>{});
}
};
}}
# 157 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/power.hpp" 1 3 4
# 13 "/usr/include/boost/hana/power.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/power.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/power.hpp" 3 4
namespace boost { namespace hana {
# 44 "/usr/include/boost/hana/fwd/power.hpp" 3 4
template <typename R, typename = void>
struct power_impl : power_impl<R, when<true>> { };
struct power_t {
template <typename X, typename N>
constexpr decltype(auto) operator()(X&& x, N const& n) const;
};
constexpr power_t power{};
}}
# 14 "/usr/include/boost/hana/power.hpp" 2 3 4
# 27 "/usr/include/boost/hana/power.hpp" 3 4
namespace boost { namespace hana {
template <typename X, typename N>
constexpr decltype(auto) power_t::operator()(X&& x, N const& n) const {
using R = typename hana::tag_of<X>::type;
using Power = ::std::conditional_t< (hana::Ring<R>::value && hana::IntegralConstant<N>::value), power_impl<R>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Ring<R>::value,
"hana::power(x, n) requires 'x' to be in a Ring");
static_assert(hana::IntegralConstant<N>::value,
"hana::power(x, n) requires 'n' to be an IntegralConstant");
static_assert(N::value >= 0,
"hana::power(x, n) requires 'n' to be non-negative");
return Power::apply(static_cast<X&&>(x), n);
}
template <typename R, bool condition>
struct power_impl<R, when<condition>> : default_ {
template <typename X, typename N>
static constexpr decltype(auto) apply(X&& x, N const&) {
constexpr std::size_t n = N::value;
return hana::iterate<n>(
hana::partial(hana::mult, static_cast<X&&>(x)),
hana::one<R>()
);
}
};
}}
# 159 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/prefix.hpp" 1 3 4
# 13 "/usr/include/boost/hana/prefix.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/prefix.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/prefix.hpp" 3 4
namespace boost { namespace hana {
# 60 "/usr/include/boost/hana/fwd/prefix.hpp" 3 4
template <typename M, typename = void>
struct prefix_impl : prefix_impl<M, when<true>> { };
struct prefix_t {
template <typename Xs, typename Pref>
constexpr auto operator()(Xs&& xs, Pref&& pref) const;
};
constexpr prefix_t prefix{};
}}
# 14 "/usr/include/boost/hana/prefix.hpp" 2 3 4
# 24 "/usr/include/boost/hana/prefix.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pref>
constexpr auto prefix_t::operator()(Xs&& xs, Pref&& pref) const {
using M = typename hana::tag_of<Xs>::type;
using Prefix = ::std::conditional_t< (hana::MonadPlus<M>::value), prefix_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::prefix(xs, pref) requires 'xs' to be a MonadPlus");
return Prefix::apply(static_cast<Xs&&>(xs), static_cast<Pref&&>(pref));
}
template <typename M, bool condition>
struct prefix_impl<M, when<condition>> : default_ {
template <typename Xs, typename Z>
static constexpr decltype(auto) apply(Xs&& xs, Z&& z) {
return hana::chain(static_cast<Xs&&>(xs),
hana::partial(hana::append, hana::lift<M>(static_cast<Z&&>(z))));
}
};
}}
# 160 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/prepend.hpp" 1 3 4
# 13 "/usr/include/boost/hana/prepend.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/prepend.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/prepend.hpp" 3 4
namespace boost { namespace hana {
# 61 "/usr/include/boost/hana/fwd/prepend.hpp" 3 4
template <typename M, typename = void>
struct prepend_impl : prepend_impl<M, when<true>> { };
struct prepend_t {
template <typename Xs, typename X>
constexpr auto operator()(Xs&& xs, X&& x) const;
};
constexpr prepend_t prepend{};
}}
# 14 "/usr/include/boost/hana/prepend.hpp" 2 3 4
# 29 "/usr/include/boost/hana/prepend.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename X>
constexpr auto prepend_t::operator()(Xs&& xs, X&& x) const {
using M = typename hana::tag_of<Xs>::type;
using Prepend = ::std::conditional_t< (hana::MonadPlus<M>::value), prepend_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::prepend(xs, x) requires 'xs' to be a MonadPlus");
return Prepend::apply(static_cast<Xs&&>(xs), static_cast<X&&>(x));
}
template <typename M, bool condition>
struct prepend_impl<M, when<condition>> : default_ {
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
return hana::concat(hana::lift<M>(static_cast<X&&>(x)),
static_cast<Xs&&>(xs));
}
};
template <typename S>
struct prepend_impl<S, when<Sequence<S>::value>> {
template <typename Xs, typename X, std::size_t ...i>
static constexpr auto prepend_helper(Xs&& xs, X&& x, std::index_sequence<i...>) {
return hana::make<S>(
static_cast<X&&>(x), hana::at_c<i>(static_cast<Xs&&>(xs))...
);
}
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
return prepend_helper(static_cast<Xs&&>(xs), static_cast<X&&>(x),
std::make_index_sequence<N>{});
}
};
}}
# 161 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/product.hpp" 1 3 4
# 25 "/usr/include/boost/hana/product.hpp" 3 4
namespace boost { namespace hana {
template <typename R>
struct product_t {
static_assert(hana::Ring<R>::value,
"hana::product<R> requires 'R' to be a Ring");
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Product = ::std::conditional_t< (hana::Foldable<S>::value), product_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::product<R>(xs) requires 'xs' to be Foldable");
return Product::template apply<R>(static_cast<Xs&&>(xs));
}
};
template <typename T, bool condition>
struct product_impl<T, when<condition>> : default_ {
template <typename R, typename Xs>
static constexpr decltype(auto) apply(Xs&& xs) {
return hana::fold_left(static_cast<Xs&&>(xs), hana::one<R>(), hana::mult);
}
};
}}
# 162 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/remove.hpp" 1 3 4
# 13 "/usr/include/boost/hana/remove.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/remove.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/remove.hpp" 3 4
namespace boost { namespace hana {
# 58 "/usr/include/boost/hana/fwd/remove.hpp" 3 4
template <typename M, typename = void>
struct remove_impl : remove_impl<M, when<true>> { };
struct remove_t {
template <typename Xs, typename Value>
constexpr auto operator()(Xs&& xs, Value&& value) const;
};
constexpr remove_t remove{};
}}
# 14 "/usr/include/boost/hana/remove.hpp" 2 3 4
# 24 "/usr/include/boost/hana/remove.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Value>
constexpr auto remove_t::operator()(Xs&& xs, Value&& value) const {
using M = typename hana::tag_of<Xs>::type;
using Remove = ::std::conditional_t< (hana::MonadPlus<M>::value), remove_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::remove(xs, value) requires 'xs' to be a MonadPlus");
return Remove::apply(static_cast<Xs&&>(xs),
static_cast<Value&&>(value));
}
template <typename M, bool condition>
struct remove_impl<M, when<condition>> : default_ {
template <typename Xs, typename Value>
static constexpr auto apply(Xs&& xs, Value&& value) {
return hana::filter(static_cast<Xs&&>(xs),
hana::compose(hana::not_,
hana::equal.to(static_cast<Value&&>(value))));
}
};
}}
# 164 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/remove_at.hpp" 1 3 4
# 13 "/usr/include/boost/hana/remove_at.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/remove_at.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/remove_at.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/remove_at.hpp" 3 4
template <typename S, typename = void>
struct remove_at_impl : remove_at_impl<S, when<true>> { };
struct remove_at_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
};
constexpr remove_at_t remove_at{};
# 74 "/usr/include/boost/hana/fwd/remove_at.hpp" 3 4
template <std::size_t n>
struct remove_at_c_t;
template <std::size_t n>
constexpr remove_at_c_t<n> remove_at_c{};
}}
# 14 "/usr/include/boost/hana/remove_at.hpp" 2 3 4
# 28 "/usr/include/boost/hana/remove_at.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto remove_at_t::operator()(Xs&& xs, N const& n) const {
using S = typename hana::tag_of<Xs>::type;
using RemoveAt = ::std::conditional_t< (hana::Sequence<S>::value && hana::IntegralConstant<N>::value), remove_at_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::remove_at(xs, n) requires 'xs' to be a Sequence");
static_assert(hana::IntegralConstant<N>::value,
"hana::remove_at(xs, n) requires 'n' to be an IntegralConstant");
static_assert(N::value >= 0,
"hana::remove_at(xs, n) requires 'n' to be non-negative");
return RemoveAt::apply(static_cast<Xs&&>(xs), n);
}
template <typename S, bool condition>
struct remove_at_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...before, std::size_t ...after>
static constexpr auto
remove_at_helper(Xs&& xs, std::index_sequence<before...>,
std::index_sequence<after...>)
{
return hana::make<S>(
hana::at_c<before>(static_cast<Xs&&>(xs))...,
hana::at_c<after + sizeof...(before) + 1>(static_cast<Xs&&>(xs))...
);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t len = decltype(hana::length(xs))::value;
static_assert(n < len,
"hana::remove_at(xs, n) requires 'n' to be in the bounds of the sequence");
return remove_at_helper(static_cast<Xs&&>(xs),
std::make_index_sequence<n>{},
std::make_index_sequence<len - n - 1>{});
}
};
template <std::size_t n>
struct remove_at_c_t {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const
{ return hana::remove_at(static_cast<Xs&&>(xs), hana::size_c<n>); }
};
}}
# 165 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/remove_range.hpp" 1 3 4
# 13 "/usr/include/boost/hana/remove_range.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/remove_range.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/remove_range.hpp" 3 4
namespace boost { namespace hana {
# 53 "/usr/include/boost/hana/fwd/remove_range.hpp" 3 4
template <typename S, typename = void>
struct remove_range_impl : remove_range_impl<S, when<true>> { };
struct remove_range_t {
template <typename Xs, typename From, typename To>
constexpr auto operator()(Xs&& xs, From const& from, To const& to) const;
};
constexpr remove_range_t remove_range{};
# 77 "/usr/include/boost/hana/fwd/remove_range.hpp" 3 4
template <std::size_t from, std::size_t to>
struct remove_range_c_t;
template <std::size_t from, std::size_t to>
constexpr remove_range_c_t<from, to> remove_range_c{};
}}
# 14 "/usr/include/boost/hana/remove_range.hpp" 2 3 4
# 28 "/usr/include/boost/hana/remove_range.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename From, typename To>
constexpr auto remove_range_t::operator()(Xs&& xs, From const& from, To const& to) const {
using S = typename hana::tag_of<Xs>::type;
using RemoveRange = ::std::conditional_t< (hana::Sequence<S>::value && hana::IntegralConstant<From>::value && hana::IntegralConstant<To>::value), remove_range_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::remove_range(xs, from, to) requires 'xs' to be a Sequence");
static_assert(hana::IntegralConstant<From>::value,
"hana::remove_range(xs, from, to) requires 'from' to be an IntegralConstant");
static_assert(hana::IntegralConstant<To>::value,
"hana::remove_range(xs, from, to) requires 'to' to be an IntegralConstant");
return RemoveRange::apply(static_cast<Xs&&>(xs), from, to);
}
template <typename S, bool condition>
struct remove_range_impl<S, when<condition>> : default_ {
template <std::size_t offset, typename Xs, std::size_t ...before, std::size_t ...after>
static constexpr auto
remove_range_helper(Xs&& xs, std::index_sequence<before...>,
std::index_sequence<after...>)
{
return hana::make<S>(
hana::at_c<before>(static_cast<Xs&&>(xs))...,
hana::at_c<offset + after>(static_cast<Xs&&>(xs))...
);
}
template <typename Xs, typename From, typename To>
static constexpr auto apply(Xs&& xs, From const&, To const&) {
constexpr std::size_t from = From::value;
constexpr std::size_t to = To::value;
constexpr std::size_t len = decltype(hana::length(xs))::value;
constexpr std::size_t before = from == to ? len : from;
constexpr std::size_t after = from == to ? 0 : len - to;
static_assert(from <= to,
"hana::remove_range(xs, from, to) requires '[from, to)' to be a "
"valid interval, meaning that 'from <= to'");
static_assert(from == to || from >= 0,
"hana::remove_range(xs, from, to) requires 'from' to be non-negative");
static_assert(from == to || to <= len,
"hana::remove_range(xs, from, to) requires 'to <= length(xs)'");
return remove_range_helper<to>(static_cast<Xs&&>(xs),
std::make_index_sequence<before>{},
std::make_index_sequence<after>{});
}
};
template <std::size_t from, std::size_t to>
struct remove_range_c_t {
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const {
return hana::remove_range(static_cast<Xs&&>(xs),
hana::size_c<from>,
hana::size_c<to>);
}
};
}}
# 167 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/repeat.hpp" 1 3 4
# 13 "/usr/include/boost/hana/repeat.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/repeat.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/repeat.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/repeat.hpp" 3 4
template <typename N, typename = void>
struct repeat_impl : repeat_impl<N, when<true>> { };
struct repeat_t {
template <typename N, typename F>
constexpr void operator()(N const& n, F&& f) const;
};
constexpr repeat_t repeat{};
}}
# 14 "/usr/include/boost/hana/repeat.hpp" 2 3 4
# 23 "/usr/include/boost/hana/repeat.hpp" 3 4
namespace boost { namespace hana {
template <typename I, bool condition>
struct repeat_impl<I, when<condition>> : default_ {
template <typename F, std::size_t ...i>
static constexpr void repeat_helper(F&& f, std::index_sequence<i...>) {
using Swallow = std::size_t[];
(void)Swallow{0, ((void)f(), i)...};
}
template <typename N, typename F>
static constexpr auto apply(N const&, F&& f) {
static_assert(N::value >= 0, "hana::repeat(n, f) requires 'n' to be non-negative");
constexpr std::size_t n = N::value;
repeat_helper(static_cast<F&&>(f), std::make_index_sequence<n>{});
}
};
template <typename N, typename F>
constexpr void repeat_t::operator()(N const& n, F&& f) const {
using I = typename hana::tag_of<N>::type;
using Repeat = ::std::conditional_t< (hana::IntegralConstant<I>::value), repeat_impl<I>, ::boost::hana::deleted_implementation >
;
static_assert(hana::IntegralConstant<I>::value,
"hana::repeat(n, f) requires 'n' to be an IntegralConstant");
return Repeat::apply(n, static_cast<F&&>(f));
}
}}
# 168 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/replace.hpp" 1 3 4
# 13 "/usr/include/boost/hana/replace.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/replace.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/replace.hpp" 3 4
namespace boost { namespace hana {
# 52 "/usr/include/boost/hana/fwd/replace.hpp" 3 4
template <typename Xs, typename = void>
struct replace_impl : replace_impl<Xs, when<true>> { };
struct replace_t {
template <typename Xs, typename OldVal, typename NewVal>
constexpr auto operator()(Xs&& xs, OldVal&& oldval, NewVal&& newval) const;
};
constexpr replace_t replace{};
}}
# 14 "/usr/include/boost/hana/replace.hpp" 2 3 4
# 1 "/usr/include/boost/hana/replace_if.hpp" 1 3 4
# 13 "/usr/include/boost/hana/replace_if.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/replace_if.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/replace_if.hpp" 3 4
namespace boost { namespace hana {
# 51 "/usr/include/boost/hana/fwd/replace_if.hpp" 3 4
template <typename Xs, typename = void>
struct replace_if_impl : replace_if_impl<Xs, when<true>> { };
struct replace_if_t {
template <typename Xs, typename Pred, typename Value>
constexpr auto operator()(Xs&& xs, Pred&& pred, Value&& value) const;
};
constexpr replace_if_t replace_if{};
}}
# 14 "/usr/include/boost/hana/replace_if.hpp" 2 3 4
# 22 "/usr/include/boost/hana/replace_if.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred, typename Value>
constexpr auto replace_if_t::operator()(Xs&& xs, Pred&& pred, Value&& value) const {
using S = typename hana::tag_of<Xs>::type;
using ReplaceIf = ::std::conditional_t< (hana::Functor<S>::value), replace_if_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::replace_if(xs, pred, value) requires 'xs' to be a Functor");
return ReplaceIf::apply(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred),
static_cast<Value&&>(value));
}
template <typename Fun, bool condition>
struct replace_if_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename Pred, typename Value>
static constexpr auto apply(Xs&& xs, Pred&& pred, Value&& v) {
return hana::adjust_if(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred),
hana::always(static_cast<Value&&>(v))
);
}
};
}}
# 20 "/usr/include/boost/hana/replace.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename OldVal, typename NewVal>
constexpr auto replace_t::operator()(Xs&& xs, OldVal&& oldval, NewVal&& newval) const {
using S = typename hana::tag_of<Xs>::type;
using Replace = ::std::conditional_t< (hana::Functor<S>::value), replace_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Functor<S>::value,
"hana::replace(xs, oldval, newval) requires 'xs' to be a Functor");
return Replace::apply(static_cast<Xs&&>(xs),
static_cast<OldVal&&>(oldval),
static_cast<NewVal&&>(newval));
}
template <typename Fun, bool condition>
struct replace_impl<Fun, when<condition>> : default_ {
template <typename Xs, typename OldVal, typename NewVal>
static constexpr decltype(auto)
apply(Xs&& xs, OldVal&& oldval, NewVal&& newval) {
return hana::replace_if(
static_cast<Xs&&>(xs),
hana::equal.to(static_cast<OldVal&&>(oldval)),
static_cast<NewVal&&>(newval)
);
}
};
}}
# 169 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/replicate.hpp" 1 3 4
# 13 "/usr/include/boost/hana/replicate.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/replicate.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/replicate.hpp" 3 4
namespace boost { namespace hana {
# 64 "/usr/include/boost/hana/fwd/replicate.hpp" 3 4
template <typename M, typename = void>
struct replicate_impl : replicate_impl<M, when<true>> { };
template <typename M>
struct replicate_t;
template <typename M>
constexpr replicate_t<M> replicate{};
}}
# 14 "/usr/include/boost/hana/replicate.hpp" 2 3 4
# 27 "/usr/include/boost/hana/replicate.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct replicate_t {
static_assert(hana::MonadPlus<M>::value,
"hana::replicate<M>(x, n) requires 'M' to be a MonadPlus");
template <typename X, typename N>
constexpr auto operator()(X&& x, N const& n) const {
using Replicate = ::std::conditional_t< (hana::MonadPlus<M>::value && hana::IntegralConstant<N>::value), replicate_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::IntegralConstant<N>::value,
"hana::replicate<M>(x, n) requires 'n' to be an IntegralConstant");
return Replicate::apply(static_cast<X&&>(x), n);
}
};
template <typename M, bool condition>
struct replicate_impl<M, when<condition>> : default_ {
template <typename X, typename N>
static constexpr auto apply(X&& x, N const& n) {
return hana::cycle(hana::lift<M>(static_cast<X&&>(x)), n);
}
};
template <typename S>
struct replicate_impl<S, when<Sequence<S>::value>> {
template <typename X, std::size_t ...i>
static constexpr auto replicate_helper(X&& x, std::index_sequence<i...>)
{ return hana::make<S>(((void)i, x)...); }
template <typename X, typename N>
static constexpr auto apply(X&& x, N const&) {
constexpr std::size_t n = N::value;
return replicate_helper(static_cast<X&&>(x),
std::make_index_sequence<n>{});
}
};
}}
# 171 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/reverse.hpp" 1 3 4
# 13 "/usr/include/boost/hana/reverse.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/reverse.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/reverse.hpp" 3 4
namespace boost { namespace hana {
# 37 "/usr/include/boost/hana/fwd/reverse.hpp" 3 4
template <typename S, typename = void>
struct reverse_impl : reverse_impl<S, when<true>> { };
struct reverse_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
};
constexpr reverse_t reverse{};
}}
# 14 "/usr/include/boost/hana/reverse.hpp" 2 3 4
# 26 "/usr/include/boost/hana/reverse.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto reverse_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Reverse = ::std::conditional_t< (hana::Sequence<S>::value), reverse_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::reverse(xs) requires 'xs' to be a Sequence");
return Reverse::apply(static_cast<Xs&&>(xs));
}
template <typename S, bool condition>
struct reverse_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...i>
static constexpr auto reverse_helper(Xs&& xs, std::index_sequence<i...>) {
return hana::make<S>(
hana::at_c<sizeof...(i) - i - 1>(static_cast<Xs&&>(xs))...
);
}
template <typename Xs>
static constexpr auto apply(Xs&& xs) {
constexpr std::size_t N = decltype(hana::length(xs))::value;
return reverse_helper(static_cast<Xs&&>(xs), std::make_index_sequence<N>{});
}
};
}}
# 172 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/reverse_fold.hpp" 1 3 4
# 13 "/usr/include/boost/hana/reverse_fold.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/reverse_fold.hpp" 1 3 4
# 16 "/usr/include/boost/hana/fwd/reverse_fold.hpp" 3 4
namespace boost { namespace hana {
# 72 "/usr/include/boost/hana/fwd/reverse_fold.hpp" 3 4
struct reverse_fold_t {
template <typename Xs, typename S, typename F>
constexpr decltype(auto) operator()(Xs&& xs, S&& s, F&& f) const;
template <typename Xs, typename F>
constexpr decltype(auto) operator()(Xs&& xs, F&& f) const;
};
constexpr reverse_fold_t reverse_fold{};
}}
# 14 "/usr/include/boost/hana/reverse_fold.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename S, typename F>
constexpr decltype(auto) reverse_fold_t::operator()(Xs&& xs, S&& s, F&& f) const {
return hana::fold_right(static_cast<Xs&&>(xs),
static_cast<S&&>(s),
hana::flip(static_cast<F&&>(f)));
}
template <typename Xs, typename F>
constexpr decltype(auto) reverse_fold_t::operator()(Xs&& xs, F&& f) const {
return hana::fold_right(static_cast<Xs&&>(xs),
hana::flip(static_cast<F&&>(f)));
}
}}
# 173 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/scan_left.hpp" 1 3 4
# 13 "/usr/include/boost/hana/scan_left.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/scan_left.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/scan_left.hpp" 3 4
namespace boost { namespace hana {
# 90 "/usr/include/boost/hana/fwd/scan_left.hpp" 3 4
template <typename S, typename = void>
struct scan_left_impl : scan_left_impl<S, when<true>> { };
struct scan_left_t {
template <typename Xs, typename State, typename F>
constexpr auto operator()(Xs&& xs, State&& state, F const& f) const;
template <typename Xs, typename F>
constexpr auto operator()(Xs&& xs, F const& f) const;
};
constexpr scan_left_t scan_left{};
}}
# 14 "/usr/include/boost/hana/scan_left.hpp" 2 3 4
# 28 "/usr/include/boost/hana/scan_left.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr auto scan_left_t::operator()(Xs&& xs, F const& f) const {
using S = typename hana::tag_of<Xs>::type;
using ScanLeft = ::std::conditional_t< (hana::Sequence<S>::value), scan_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::scan_left(xs, f) requires 'xs' to be a Sequence");
return ScanLeft::apply(static_cast<Xs&&>(xs), f);
}
template <typename Xs, typename State, typename F>
constexpr auto scan_left_t::operator()(Xs&& xs, State&& state, F const& f) const {
using S = typename hana::tag_of<Xs>::type;
using ScanLeft = ::std::conditional_t< (hana::Sequence<S>::value), scan_left_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::scan_left(xs, state, f) requires 'xs' to be a Sequence");
return ScanLeft::apply(static_cast<Xs&&>(xs),
static_cast<State&&>(state), f);
}
template <typename S, bool condition>
struct scan_left_impl<S, when<condition>> : default_ {
template <typename Xs, typename F, std::size_t n1, std::size_t n2, std::size_t ...ns>
static constexpr auto
apply1_impl(Xs&& xs, F const& f, std::index_sequence<n1, n2, ns...>) {
static_assert(n1 == 0, "logic error in Boost.Hana: file a bug report");
return scan_left_impl::apply_impl(
static_cast<Xs&&>(xs),
hana::at_c<0>(static_cast<Xs&&>(xs)),
f, std::index_sequence<n2, ns...>{}
);
}
template <typename Xs, typename F, std::size_t n>
static constexpr auto apply1_impl(Xs&& xs, F const&, std::index_sequence<n>) {
return hana::make<S>(hana::at_c<n>(static_cast<Xs&&>(xs)));
}
template <typename Xs, typename F>
static constexpr auto apply1_impl(Xs&&, F const&, std::index_sequence<>) {
return hana::empty<S>();
}
template <typename Xs, typename F>
static constexpr auto apply(Xs&& xs, F const& f) {
constexpr std::size_t Len = decltype(hana::length(xs))::value;
return scan_left_impl::apply1_impl(static_cast<Xs&&>(xs),
f, std::make_index_sequence<Len>{});
}
template <typename Xs, typename State, typename F,
std::size_t n1, std::size_t n2, std::size_t ...ns>
static constexpr auto
apply_impl(Xs&& xs, State&& state, F const& f,
std::index_sequence<n1, n2, ns...>)
{
auto rest = scan_left_impl::apply_impl(
static_cast<Xs&&>(xs),
f(state, hana::at_c<n1>(static_cast<Xs&&>(xs))),
f, std::index_sequence<n2, ns...>{});
return hana::prepend(std::move(rest), static_cast<State&&>(state));
}
template <typename Xs, typename State, typename F, std::size_t n>
static constexpr auto
apply_impl(Xs&& xs, State&& state, F const& f, std::index_sequence<n>) {
auto new_state = f(state, hana::at_c<n>(static_cast<Xs&&>(xs)));
return hana::make<S>(static_cast<State&&>(state), std::move(new_state));
}
template <typename Xs, typename State, typename F>
static constexpr auto
apply_impl(Xs&&, State&& state, F const&, std::index_sequence<>) {
return hana::make<S>(static_cast<State&&>(state));
}
template <typename Xs, typename State, typename F>
static constexpr auto apply(Xs&& xs, State&& state, F const& f) {
constexpr std::size_t Len = decltype(hana::length(xs))::value;
return scan_left_impl::apply_impl(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
f, std::make_index_sequence<Len>{});
}
};
}}
# 174 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/scan_right.hpp" 1 3 4
# 13 "/usr/include/boost/hana/scan_right.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/scan_right.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/scan_right.hpp" 3 4
namespace boost { namespace hana {
# 90 "/usr/include/boost/hana/fwd/scan_right.hpp" 3 4
template <typename S, typename = void>
struct scan_right_impl : scan_right_impl<S, when<true>> { };
struct scan_right_t {
template <typename Xs, typename State, typename F>
constexpr auto operator()(Xs&& xs, State&& state, F const& f) const;
template <typename Xs, typename F>
constexpr auto operator()(Xs&& xs, F const& f) const;
};
constexpr scan_right_t scan_right{};
}}
# 14 "/usr/include/boost/hana/scan_right.hpp" 2 3 4
# 29 "/usr/include/boost/hana/scan_right.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename F>
constexpr auto scan_right_t::operator()(Xs&& xs, F const& f) const {
using S = typename hana::tag_of<Xs>::type;
using ScanRight = ::std::conditional_t< (hana::Sequence<S>::value), scan_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::scan_right(xs, f) requires 'xs' to be a Sequence");
return ScanRight::apply(static_cast<Xs&&>(xs), f);
}
template <typename Xs, typename State, typename F>
constexpr auto scan_right_t::operator()(Xs&& xs, State&& state, F const& f) const {
using S = typename hana::tag_of<Xs>::type;
using ScanRight = ::std::conditional_t< (hana::Sequence<S>::value), scan_right_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::scan_right(xs, state, f) requires 'xs' to be a Sequence");
return ScanRight::apply(static_cast<Xs&&>(xs),
static_cast<State&&>(state), f);
}
template <typename S, bool condition>
struct scan_right_impl<S, when<condition>> : default_ {
template <typename Xs, typename F, std::size_t n1, std::size_t n2, std::size_t ...ns>
static constexpr auto
apply1_impl(Xs&& xs, F const& f, std::index_sequence<n1, n2, ns...>) {
auto rest = scan_right_impl::apply1_impl(static_cast<Xs&&>(xs),
f, std::index_sequence<n2, ns...>{});
auto element = f(hana::at_c<n1>(static_cast<Xs&&>(xs)), hana::front(rest));
return hana::prepend(std::move(rest), std::move(element));
}
template <typename Xs, typename F, std::size_t n>
static constexpr auto apply1_impl(Xs&& xs, F const&, std::index_sequence<n>) {
return hana::make<S>(hana::at_c<n>(static_cast<Xs&&>(xs)));
}
template <typename Xs, typename F>
static constexpr auto apply1_impl(Xs&&, F const&, std::index_sequence<>) {
return hana::empty<S>();
}
template <typename Xs, typename F>
static constexpr auto apply(Xs&& xs, F const& f) {
constexpr std::size_t Len = decltype(hana::length(xs))::value;
return scan_right_impl::apply1_impl(static_cast<Xs&&>(xs),
f, std::make_index_sequence<Len>{});
}
template <typename Xs, typename State, typename F,
std::size_t n1, std::size_t n2, std::size_t ...ns>
static constexpr auto
apply_impl(Xs&& xs, State&& state, F const& f,
std::index_sequence<n1, n2, ns...>)
{
auto rest = scan_right_impl::apply_impl(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
f, std::index_sequence<n2, ns...>{});
auto element = f(hana::at_c<n1>(static_cast<Xs&&>(xs)), hana::front(rest));
return hana::prepend(std::move(rest), std::move(element));
}
template <typename Xs, typename State, typename F, std::size_t n>
static constexpr auto
apply_impl(Xs&& xs, State&& state, F const& f, std::index_sequence<n>) {
auto element = f(hana::at_c<n>(static_cast<Xs&&>(xs)), state);
return hana::make<S>(std::move(element), static_cast<State&&>(state));
}
template <typename Xs, typename State, typename F>
static constexpr auto
apply_impl(Xs&&, State&& state, F const&, std::index_sequence<>) {
return hana::make<S>(static_cast<State&&>(state));
}
template <typename Xs, typename State, typename F>
static constexpr auto apply(Xs&& xs, State&& state, F const& f) {
constexpr std::size_t Len = decltype(hana::length(xs))::value;
return scan_right_impl::apply_impl(static_cast<Xs&&>(xs),
static_cast<State&&>(state),
f, std::make_index_sequence<Len>{});
}
};
}}
# 175 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/set.hpp" 1 3 4
# 13 "/usr/include/boost/hana/set.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/set.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/set.hpp" 3 4
namespace boost { namespace hana {
# 96 "/usr/include/boost/hana/fwd/set.hpp" 3 4
template <typename ...Xs>
struct set;
struct set_tag { };
# 131 "/usr/include/boost/hana/fwd/set.hpp" 3 4
constexpr auto make_set = make<set_tag>;
# 183 "/usr/include/boost/hana/fwd/set.hpp" 3 4
constexpr auto to_set = to<set_tag>;
}}
# 14 "/usr/include/boost/hana/set.hpp" 2 3 4
# 38 "/usr/include/boost/hana/set.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/union.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/union.hpp" 3 4
namespace boost { namespace hana {
# 41 "/usr/include/boost/hana/fwd/union.hpp" 3 4
template <typename S, typename = void>
struct union_impl : union_impl<S, when<true>> { };
struct union_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr union_t union_{};
}}
# 39 "/usr/include/boost/hana/set.hpp" 2 3 4
# 53 "/usr/include/boost/hana/set.hpp" 3 4
namespace boost { namespace hana {
template <typename ...Xs>
struct set
: detail::operators::adl<set<Xs...>>
, detail::searchable_operators<set<Xs...>>
{
tuple<Xs...> storage;
using hana_tag = set_tag;
static constexpr std::size_t size = sizeof...(Xs);
explicit constexpr set(tuple<Xs...> const& xs)
: storage(xs)
{ }
explicit constexpr set(tuple<Xs...>&& xs)
: storage(static_cast<tuple<Xs...>&&>(xs))
{ }
constexpr set(set const& other) = default;
constexpr set(set&& other) = default;
};
namespace detail {
template <>
struct comparable_operators<set_tag> {
static constexpr bool value = true;
};
}
template <>
struct make_impl<set_tag> {
template <typename ...Xs>
static constexpr auto apply(Xs&& ...xs) {
# 114 "/usr/include/boost/hana/set.hpp" 3 4
return set<typename detail::decay<Xs>::type...>{
hana::make_tuple(static_cast<Xs&&>(xs)...)
};
}
};
template <>
struct equal_impl<set_tag, set_tag> {
template <typename S1, typename S2>
static constexpr auto equal_helper(S1 const& s1, S2 const& s2, hana::true_)
{ return hana::is_subset(s1, s2); }
template <typename S1, typename S2>
static constexpr auto equal_helper(S1 const&, S2 const&, hana::false_)
{ return hana::false_c; }
template <typename S1, typename S2>
static constexpr decltype(auto) apply(S1&& s1, S2&& s2) {
return equal_impl::equal_helper(s1, s2, hana::bool_c<
decltype(hana::length(s1.storage))::value ==
decltype(hana::length(s2.storage))::value
>);
}
};
template <>
struct unpack_impl<set_tag> {
template <typename Set, typename F>
static constexpr decltype(auto) apply(Set&& set, F&& f) {
return hana::unpack(static_cast<Set&&>(set).storage,
static_cast<F&&>(f));
}
};
template <>
struct find_if_impl<set_tag> {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::find_if(static_cast<Xs&&>(xs).storage, static_cast<Pred&&>(pred));
}
};
template <>
struct any_of_impl<set_tag> {
template <typename Pred>
struct any_of_helper {
Pred const& pred;
template <typename ...X>
constexpr auto operator()(X const& ...x) const {
return hana::or_(pred(x)...);
}
constexpr auto operator()() const {
return hana::false_c;
}
};
template <typename Xs, typename Pred>
static constexpr auto apply(Xs const& xs, Pred const& pred) {
return hana::unpack(xs.storage, any_of_helper<Pred>{pred});
}
};
template <>
struct is_subset_impl<set_tag, set_tag> {
template <typename Ys>
struct all_contained {
Ys const& ys;
template <typename ...X>
constexpr auto operator()(X const& ...x) const {
return hana::bool_c<detail::fast_and<
hana::value<decltype(hana::contains(ys, x))>()...
>::value>;
}
};
template <typename Xs, typename Ys>
static constexpr auto apply(Xs const& xs, Ys const& ys) {
return hana::unpack(xs, all_contained<Ys>{ys});
}
};
template <typename F>
struct to_impl<set_tag, F, when<hana::Foldable<F>::value>> {
template <typename Xs>
static constexpr decltype(auto) apply(Xs&& xs) {
return hana::fold_left(static_cast<Xs&&>(xs),
hana::make_set(),
hana::insert);
}
};
template <>
struct insert_impl<set_tag> {
template <typename Xs, typename X, typename Indices>
static constexpr auto
insert_helper(Xs&& xs, X&&, hana::true_, Indices) {
return static_cast<Xs&&>(xs);
}
template <typename Xs, typename X, std::size_t ...n>
static constexpr auto
insert_helper(Xs&& xs, X&& x, hana::false_, std::index_sequence<n...>) {
return hana::make_set(
hana::at_c<n>(static_cast<Xs&&>(xs).storage)..., static_cast<X&&>(x)
);
}
template <typename Xs, typename X>
static constexpr auto apply(Xs&& xs, X&& x) {
constexpr bool c = hana::value<decltype(hana::contains(xs, x))>();
constexpr std::size_t size = std::remove_reference<Xs>::type::size;
return insert_helper(static_cast<Xs&&>(xs), static_cast<X&&>(x),
hana::bool_c<c>, std::make_index_sequence<size>{});
}
};
template <>
struct erase_key_impl<set_tag> {
template <typename Xs, typename X>
static constexpr decltype(auto) apply(Xs&& xs, X&& x) {
return hana::unpack(
hana::remove(static_cast<Xs&&>(xs).storage,
static_cast<X&&>(x)),
hana::make_set
);
}
};
namespace detail {
template <typename Ys>
struct set_insert_if_contains {
Ys const& ys;
template <typename Result, typename Key>
static constexpr auto helper(Result&& result, Key&& key, hana::true_) {
return hana::insert(static_cast<Result&&>(result), static_cast<Key&&>(key));
}
template <typename Result, typename Key>
static constexpr auto helper(Result&& result, Key&&, hana::false_) {
return static_cast<Result&&>(result);
}
template <typename Result, typename Key>
constexpr auto operator()(Result&& result, Key&& key) const {
constexpr bool keep = hana::value<decltype(hana::contains(ys, key))>();
return set_insert_if_contains::helper(static_cast<Result&&>(result),
static_cast<Key&&>(key),
hana::bool_c<keep>);
}
};
}
template <>
struct intersection_impl<set_tag> {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs&& xs, Ys const& ys) {
return hana::fold_left(static_cast<Xs&&>(xs), hana::make_set(),
detail::set_insert_if_contains<Ys>{ys});
}
};
template <>
struct union_impl<set_tag> {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs&& xs, Ys&& ys) {
return hana::fold_left(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys),
hana::insert);
}
};
template <>
struct difference_impl<set_tag> {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs&& xs, Ys&& ys) {
return hana::fold_left(static_cast<Ys&&>(ys), static_cast<Xs&&>(xs),
hana::erase_key);
}
};
}}
# 177 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/size.hpp" 1 3 4
# 13 "/usr/include/boost/hana/size.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/size.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/size.hpp" 3 4
namespace boost { namespace hana {
# 30 "/usr/include/boost/hana/fwd/size.hpp" 3 4
constexpr auto size = hana::length;
}}
# 14 "/usr/include/boost/hana/size.hpp" 2 3 4
# 178 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/slice.hpp" 1 3 4
# 13 "/usr/include/boost/hana/slice.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/slice.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/slice.hpp" 3 4
namespace boost { namespace hana {
# 57 "/usr/include/boost/hana/fwd/slice.hpp" 3 4
template <typename S, typename = void>
struct slice_impl : slice_impl<S, when<true>> { };
struct slice_t {
template <typename Xs, typename Indices>
constexpr auto operator()(Xs&& xs, Indices&& indices) const;
};
constexpr slice_t slice{};
# 97 "/usr/include/boost/hana/fwd/slice.hpp" 3 4
template <std::size_t from, std::size_t to>
struct slice_c_t;
template <std::size_t from, std::size_t to>
constexpr slice_c_t<from, to> slice_c{};
}}
# 14 "/usr/include/boost/hana/slice.hpp" 2 3 4
# 28 "/usr/include/boost/hana/slice.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Indices>
constexpr auto slice_t::operator()(Xs&& xs, Indices&& indices) const {
using S = typename hana::tag_of<Xs>::type;
using Slice = ::std::conditional_t< (hana::Sequence<S>::value && hana::Foldable<Indices>::value), slice_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::slice(xs, indices) requires 'xs' to be a Sequence");
static_assert(hana::Foldable<Indices>::value,
"hana::slice(xs, indices) requires 'indices' to be Foldable");
return Slice::apply(static_cast<Xs&&>(xs), static_cast<Indices&&>(indices));
}
namespace detail {
template <typename Xs>
struct take_arbitrary {
Xs& xs;
using S = typename hana::tag_of<Xs>::type;
template <typename ...N>
constexpr auto operator()(N const& ...) const {
return hana::make<S>(hana::at_c<N::value>(xs)...);
}
};
}
template <typename S, bool condition>
struct slice_impl<S, when<condition>> : default_ {
template <std::size_t from, typename Xs, std::size_t ...i>
static constexpr auto from_offset(Xs&& xs, std::index_sequence<i...>) {
return hana::make<S>(hana::at_c<from + i>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename T, T from, T to>
static constexpr auto apply(Xs&& xs, hana::range<T, from, to> const&) {
return slice_impl::from_offset<from>(
static_cast<Xs&&>(xs), std::make_index_sequence<to - from>{}
);
}
template <typename Xs, typename Indices>
static constexpr auto apply(Xs const& xs, Indices const& indices) {
return hana::unpack(indices, detail::take_arbitrary<Xs const>{xs});
}
};
template <std::size_t from, std::size_t to>
struct slice_c_t {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const {
return hana::slice(static_cast<Xs&&>(xs),
hana::range_c<std::size_t, from, to>);
}
};
}}
# 179 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/sort.hpp" 1 3 4
# 13 "/usr/include/boost/hana/sort.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/sort.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/sort.hpp" 3 4
namespace boost { namespace hana {
# 88 "/usr/include/boost/hana/fwd/sort.hpp" 3 4
template <typename S, typename = void>
struct sort_impl : sort_impl<S, when<true>> { };
struct sort_t : detail::nested_by<sort_t> {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
template <typename Xs, typename Predicate>
constexpr auto operator()(Xs&& xs, Predicate&& pred) const;
};
constexpr sort_t sort{};
}}
# 14 "/usr/include/boost/hana/sort.hpp" 2 3 4
# 27 "/usr/include/boost/hana/sort.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Predicate>
constexpr auto sort_t::operator()(Xs&& xs, Predicate&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Sort = ::std::conditional_t< (hana::Sequence<S>::value), sort_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::sort(xs, predicate) requires 'xs' to be a Sequence");
return Sort::apply(static_cast<Xs&&>(xs),
static_cast<Predicate&&>(pred));
}
template <typename Xs>
constexpr auto sort_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Sort = ::std::conditional_t< (hana::Sequence<S>::value), sort_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::sort(xs) requires 'xs' to be a Sequence");
return Sort::apply(static_cast<Xs&&>(xs));
}
namespace detail {
template <typename Xs, typename Pred>
struct sort_predicate {
template <std::size_t I, std::size_t J>
using apply = decltype(std::declval<Pred>()(
hana::at_c<I>(std::declval<Xs>()),
hana::at_c<J>(std::declval<Xs>())
));
};
template <typename Pred, std::size_t Insert, bool IsInsertionPoint,
typename Left,
std::size_t ...Right>
struct insert;
template <
typename Pred, std::size_t Insert,
std::size_t ...Left,
std::size_t Right1, std::size_t Right2, std::size_t ...Right
>
struct insert<Pred, Insert, false,
std::index_sequence<Left...>,
Right1, Right2, Right...
> {
using type = typename insert<
Pred, Insert, (bool)Pred::template apply<Insert, Right2>::value,
std::index_sequence<Left..., Right1>,
Right2, Right...
>::type;
};
template <typename Pred, std::size_t Insert, std::size_t ...Left, std::size_t Last>
struct insert<Pred, Insert, false, std::index_sequence<Left...>, Last> {
using type = std::index_sequence<Left..., Last, Insert>;
};
template <typename Pred, std::size_t Insert, std::size_t ...Left, std::size_t ...Right>
struct insert<Pred, Insert, true, std::index_sequence<Left...>, Right...> {
using type = std::index_sequence<Left..., Insert, Right...>;
};
template <typename Pred, typename Result, std::size_t ...T>
struct insertion_sort_impl;
template <typename Pred,
std::size_t Result1, std::size_t ...Result,
std::size_t T, std::size_t ...Ts>
struct insertion_sort_impl<Pred, std::index_sequence<Result1, Result...>, T, Ts...> {
using type = typename insertion_sort_impl<
Pred,
typename insert<
Pred, T, (bool)Pred::template apply<T, Result1>::value,
std::index_sequence<>,
Result1, Result...
>::type,
Ts...
>::type;
};
template <typename Pred, std::size_t T, std::size_t ...Ts>
struct insertion_sort_impl<Pred, std::index_sequence<>, T, Ts...> {
using type = typename insertion_sort_impl<
Pred, std::index_sequence<T>, Ts...
>::type;
};
template <typename Pred, typename Result>
struct insertion_sort_impl<Pred, Result> {
using type = Result;
};
template <typename Pred, typename Indices>
struct sort_helper;
template <typename Pred, std::size_t ...i>
struct sort_helper<Pred, std::index_sequence<i...>> {
using type = typename insertion_sort_impl<
Pred, std::index_sequence<>, i...
>::type;
};
}
template <typename S, bool condition>
struct sort_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...i>
static constexpr auto apply_impl(Xs&& xs, std::index_sequence<i...>) {
return hana::make<S>(hana::at_c<i>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred const&) {
constexpr std::size_t Len = decltype(hana::length(xs))::value;
using Indices = typename detail::sort_helper<
detail::sort_predicate<Xs&&, Pred>,
std::make_index_sequence<Len>
>::type;
return apply_impl(static_cast<Xs&&>(xs), Indices{});
}
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return sort_impl::apply(static_cast<Xs&&>(xs), hana::less); }
};
}}
# 180 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/span.hpp" 1 3 4
# 13 "/usr/include/boost/hana/span.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/span.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/span.hpp" 3 4
namespace boost { namespace hana {
# 73 "/usr/include/boost/hana/fwd/span.hpp" 3 4
template <typename S, typename = void>
struct span_impl : span_impl<S, when<true>> { };
struct span_t : detail::nested_by<span_t> {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr span_t span{};
}}
# 14 "/usr/include/boost/hana/span.hpp" 2 3 4
# 30 "/usr/include/boost/hana/span.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto span_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using Span = ::std::conditional_t< (hana::Sequence<S>::value), span_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::span(xs, pred) requires 'xs' to be a Sequence");
return Span::apply(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct span_impl<S, when<condition>> : default_ {
template <typename Xs, std::size_t ...before, std::size_t ...after>
static constexpr auto span_helper(Xs&& xs, std::index_sequence<before...>,
std::index_sequence<after...>)
{
return hana::make_pair(
hana::make<S>(hana::at_c<before>(static_cast<Xs&&>(xs))...),
hana::make<S>(hana::at_c<sizeof...(before) + after>(static_cast<Xs&&>(xs))...)
);
}
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
using FirstUnsatisfied = decltype(
hana::unpack(static_cast<Xs&&>(xs),
detail::first_unsatisfied_index<Pred&&>{})
);
constexpr std::size_t breakpoint = FirstUnsatisfied::value;
constexpr std::size_t N = decltype(hana::length(xs))::value;
return span_helper(static_cast<Xs&&>(xs),
std::make_index_sequence<breakpoint>{},
std::make_index_sequence<N - breakpoint>{});
}
};
}}
# 181 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/suffix.hpp" 1 3 4
# 13 "/usr/include/boost/hana/suffix.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/suffix.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/suffix.hpp" 3 4
namespace boost { namespace hana {
# 60 "/usr/include/boost/hana/fwd/suffix.hpp" 3 4
template <typename M, typename = void>
struct suffix_impl : suffix_impl<M, when<true>> { };
struct suffix_t {
template <typename Xs, typename Sfx>
constexpr auto operator()(Xs&& xs, Sfx&& sfx) const;
};
constexpr suffix_t suffix{};
}}
# 14 "/usr/include/boost/hana/suffix.hpp" 2 3 4
# 24 "/usr/include/boost/hana/suffix.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Sfx>
constexpr auto suffix_t::operator()(Xs&& xs, Sfx&& sfx) const {
using M = typename hana::tag_of<Xs>::type;
using Suffix = ::std::conditional_t< (hana::MonadPlus<M>::value), suffix_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::MonadPlus<M>::value,
"hana::suffix(xs, sfx) requires 'xs' to be a MonadPlus");
return Suffix::apply(static_cast<Xs&&>(xs), static_cast<Sfx&&>(sfx));
}
template <typename M, bool condition>
struct suffix_impl<M, when<condition>> : default_ {
template <typename Xs, typename Z>
static constexpr auto apply(Xs&& xs, Z&& z) {
return hana::chain(static_cast<Xs&&>(xs),
hana::partial(hana::prepend, hana::lift<M>(static_cast<Z&&>(z))));
}
};
}}
# 183 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/sum.hpp" 1 3 4
# 25 "/usr/include/boost/hana/sum.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct sum_t {
static_assert(hana::Monoid<M>::value,
"hana::sum<M> requires 'M' to be a Monoid");
template <typename Xs>
constexpr decltype(auto) operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Sum = ::std::conditional_t< (hana::Foldable<S>::value), sum_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Foldable<S>::value,
"hana::sum<M>(xs) requires 'xs' to be Foldable");
return Sum::template apply<M>(static_cast<Xs&&>(xs));
}
};
template <typename T, bool condition>
struct sum_impl<T, when<condition>> : default_ {
template <typename M, typename Xs>
static constexpr decltype(auto) apply(Xs&& xs) {
return hana::fold_left(static_cast<Xs&&>(xs), hana::zero<M>(), hana::plus);
}
};
}}
# 184 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/symmetric_difference.hpp" 1 3 4
# 13 "/usr/include/boost/hana/symmetric_difference.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/symmetric_difference.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/symmetric_difference.hpp" 3 4
namespace boost { namespace hana {
# 42 "/usr/include/boost/hana/fwd/symmetric_difference.hpp" 3 4
template <typename S, typename = void>
struct symmetric_difference_impl : symmetric_difference_impl<S, when<true>> { };
struct symmetric_difference_t {
template <typename Xs, typename Ys>
constexpr auto operator()(Xs&& xs, Ys&& ys) const;
};
constexpr symmetric_difference_t symmetric_difference{};
}}
# 14 "/usr/include/boost/hana/symmetric_difference.hpp" 2 3 4
# 1 "/usr/include/boost/hana/union.hpp" 1 3 4
# 19 "/usr/include/boost/hana/union.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto union_t::operator()(Xs&& xs, Ys&& ys) const {
using S = typename hana::tag_of<Xs>::type;
using Union = ::std::conditional_t< (true), union_impl<S>, ::boost::hana::deleted_implementation >
;
return Union::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename S, bool condition>
struct union_impl<S, when<condition>> : default_ {
template <typename ...Args>
static constexpr auto apply(Args&& ...) = delete;
};
}}
# 19 "/usr/include/boost/hana/symmetric_difference.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename Ys>
constexpr auto symmetric_difference_t::operator()(Xs&& xs, Ys&& ys) const {
using S = typename hana::tag_of<Xs>::type;
using SymmetricDifference = ::std::conditional_t< (true), symmetric_difference_impl<S>, ::boost::hana::deleted_implementation >
;
return SymmetricDifference::apply(static_cast<Xs&&>(xs), static_cast<Ys&&>(ys));
}
template <typename S, bool condition>
struct symmetric_difference_impl<S, when<condition>> : default_ {
template <typename Xs, typename Ys>
static constexpr auto apply(Xs&& xs, Ys&& ys) {
return hana::union_(
hana::difference(xs, ys),
hana::difference(ys, xs)
);
}
};
}}
# 185 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/take_back.hpp" 1 3 4
# 13 "/usr/include/boost/hana/take_back.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/take_back.hpp" 1 3 4
# 19 "/usr/include/boost/hana/fwd/take_back.hpp" 3 4
namespace boost { namespace hana {
# 46 "/usr/include/boost/hana/fwd/take_back.hpp" 3 4
template <typename S, typename = void>
struct take_back_impl : take_back_impl<S, when<true>> { };
struct take_back_t {
template <typename Xs, typename N>
constexpr auto operator()(Xs&& xs, N const& n) const;
};
constexpr take_back_t take_back{};
}}
# 14 "/usr/include/boost/hana/take_back.hpp" 2 3 4
# 28 "/usr/include/boost/hana/take_back.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename N>
constexpr auto take_back_t::operator()(Xs&& xs, N const& n) const {
using S = typename hana::tag_of<Xs>::type;
using TakeBack = ::std::conditional_t< (hana::Sequence<S>::value && hana::IntegralConstant<N>::value), take_back_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::take_back(xs, n) requires 'xs' to be a Sequence");
static_assert(hana::IntegralConstant<N>::value,
"hana::take_back(xs, n) requires 'n' to be an IntegralConstant");
return TakeBack::apply(static_cast<Xs&&>(xs), n);
}
template <typename S, bool condition>
struct take_back_impl<S, when<condition>> : default_ {
template <std::size_t start, typename Xs, std::size_t ...n>
static constexpr auto take_back_helper(Xs&& xs, std::index_sequence<n...>) {
return hana::make<S>(hana::at_c<start + n>(static_cast<Xs&&>(xs))...);
}
template <typename Xs, typename N>
static constexpr auto apply(Xs&& xs, N const&) {
constexpr std::size_t n = N::value;
constexpr std::size_t size = decltype(hana::length(xs))::value;
constexpr std::size_t start = n < size ? size - n : 0;
return take_back_helper<start>(static_cast<Xs&&>(xs),
std::make_index_sequence<(n < size ? n : size)>{});
}
};
}}
# 186 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/take_while.hpp" 1 3 4
# 13 "/usr/include/boost/hana/take_while.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/take_while.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/take_while.hpp" 3 4
namespace boost { namespace hana {
# 44 "/usr/include/boost/hana/fwd/take_while.hpp" 3 4
template <typename S, typename = void>
struct take_while_impl : take_while_impl<S, when<true>> { };
struct take_while_t {
template <typename Xs, typename Pred>
constexpr auto operator()(Xs&& xs, Pred&& pred) const;
};
constexpr take_while_t take_while{};
}}
# 14 "/usr/include/boost/hana/take_while.hpp" 2 3 4
# 23 "/usr/include/boost/hana/take_while.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs, typename Pred>
constexpr auto take_while_t::operator()(Xs&& xs, Pred&& pred) const {
using S = typename hana::tag_of<Xs>::type;
using TakeWhile = ::std::conditional_t< (hana::Sequence<S>::value), take_while_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::take_while(xs, pred) requires 'xs' to be a Sequence");
return TakeWhile::apply(static_cast<Xs&&>(xs),
static_cast<Pred&&>(pred));
}
template <typename S, bool condition>
struct take_while_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&&) {
using FirstUnsatisfied = decltype(
hana::unpack(static_cast<Xs&&>(xs),
detail::first_unsatisfied_index<Pred&&>{})
);
return hana::take_front(static_cast<Xs&&>(xs), FirstUnsatisfied{});
}
};
}}
# 188 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/tap.hpp" 1 3 4
# 13 "/usr/include/boost/hana/tap.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/tap.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/tap.hpp" 3 4
namespace boost { namespace hana {
# 54 "/usr/include/boost/hana/fwd/tap.hpp" 3 4
template <typename M, typename = void>
struct tap_impl : tap_impl<M, when<true>> { };
template <typename M>
struct tap_t;
template <typename M>
constexpr tap_t<M> tap{};
}}
# 14 "/usr/include/boost/hana/tap.hpp" 2 3 4
# 22 "/usr/include/boost/hana/tap.hpp" 3 4
namespace boost { namespace hana {
template <typename M>
struct tap_t {
static_assert(hana::Monad<M>::value,
"hana::tap<M> requires 'M' to be a Monad");
template <typename F>
constexpr auto operator()(F&& f) const {
using Tap = ::std::conditional_t< (hana::Monad<M>::value), tap_impl<M>, ::boost::hana::deleted_implementation >
;
return Tap::apply(static_cast<F&&>(f));
}
};
namespace detail {
template <typename M>
struct tap_helper {
template <typename F, typename X>
constexpr auto operator()(F&& f, X&& x) const {
(void)static_cast<F&&>(f)(x);
return hana::lift<M>(static_cast<X&&>(x));
}
};
}
template <typename M, bool condition>
struct tap_impl<M, when<condition>> : default_ {
template <typename F>
static constexpr auto apply(F&& f)
{ return hana::partial(detail::tap_helper<M>{}, static_cast<F&&>(f)); }
};
}}
# 189 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/then.hpp" 1 3 4
# 13 "/usr/include/boost/hana/then.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/then.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/then.hpp" 3 4
namespace boost { namespace hana {
# 40 "/usr/include/boost/hana/fwd/then.hpp" 3 4
template <typename M, typename = void>
struct then_impl : then_impl<M, when<true>> { };
struct then_t {
template <typename Before, typename Xs>
constexpr decltype(auto) operator()(Before&& before, Xs&& xs) const;
};
constexpr then_t then{};
}}
# 14 "/usr/include/boost/hana/then.hpp" 2 3 4
# 22 "/usr/include/boost/hana/then.hpp" 3 4
namespace boost { namespace hana {
template <typename Before, typename Xs>
constexpr decltype(auto) then_t::operator()(Before&& before, Xs&& xs) const {
using M = typename hana::tag_of<Before>::type;
using Then = ::std::conditional_t< (hana::Monad<M>::value && hana::Monad<Xs>::value), then_impl<M>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Monad<M>::value,
"hana::then(before, xs) requires 'before' to be a Monad");
static_assert(hana::Monad<Xs>::value,
"hana::then(before, xs) requires 'xs' to be a Monad");
return Then::apply(static_cast<Before&&>(before),
static_cast<Xs&&>(xs));
}
template <typename M, bool condition>
struct then_impl<M, when<condition>> : default_ {
template <typename Xs, typename Ys>
static constexpr decltype(auto) apply(Xs&& xs, Ys&& ys) {
return hana::chain(static_cast<Xs&&>(xs),
hana::always(static_cast<Ys&&>(ys)));
}
};
}}
# 190 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/traits.hpp" 1 3 4
# 22 "/usr/include/boost/hana/traits.hpp" 3 4
namespace boost { namespace hana { namespace traits {
namespace detail {
template <template <typename ...> class F>
struct hana_trait {
template <typename ...T>
constexpr auto operator()(T const& ...) const {
using Result = typename F<typename T::type...>::type;
return hana::integral_c<typename Result::value_type, Result::value>;
}
};
}
constexpr auto is_void = detail::hana_trait<std::is_void>{};
constexpr auto is_null_pointer = detail::hana_trait<std::is_null_pointer>{};
constexpr auto is_integral = detail::hana_trait<std::is_integral>{};
constexpr auto is_floating_point = detail::hana_trait<std::is_floating_point>{};
constexpr auto is_array = detail::hana_trait<std::is_array>{};
constexpr auto is_enum = detail::hana_trait<std::is_enum>{};
constexpr auto is_union = detail::hana_trait<std::is_union>{};
constexpr auto is_class = detail::hana_trait<std::is_class>{};
constexpr auto is_function = detail::hana_trait<std::is_function>{};
constexpr auto is_pointer = detail::hana_trait<std::is_pointer>{};
constexpr auto is_lvalue_reference = detail::hana_trait<std::is_lvalue_reference>{};
constexpr auto is_rvalue_reference = detail::hana_trait<std::is_rvalue_reference>{};
constexpr auto is_member_object_pointer = detail::hana_trait<std::is_member_object_pointer>{};
constexpr auto is_member_function_pointer = detail::hana_trait<std::is_member_function_pointer>{};
constexpr auto is_fundamental = detail::hana_trait<std::is_fundamental>{};
constexpr auto is_arithmetic = detail::hana_trait<std::is_arithmetic>{};
constexpr auto is_scalar = detail::hana_trait<std::is_scalar>{};
constexpr auto is_object = detail::hana_trait<std::is_object>{};
constexpr auto is_compound = detail::hana_trait<std::is_compound>{};
constexpr auto is_reference = detail::hana_trait<std::is_reference>{};
constexpr auto is_member_pointer = detail::hana_trait<std::is_member_pointer>{};
constexpr auto is_const = detail::hana_trait<std::is_const>{};
constexpr auto is_volatile = detail::hana_trait<std::is_volatile>{};
constexpr auto is_trivial = detail::hana_trait<std::is_trivial>{};
constexpr auto is_trivially_copyable = detail::hana_trait<std::is_trivially_copyable>{};
constexpr auto is_standard_layout = detail::hana_trait<std::is_standard_layout>{};
constexpr auto is_pod = detail::hana_trait<std::is_pod>{};
constexpr auto is_literal_type = detail::hana_trait<std::is_literal_type>{};
constexpr auto is_empty = detail::hana_trait<std::is_empty>{};
constexpr auto is_polymorphic = detail::hana_trait<std::is_polymorphic>{};
constexpr auto is_abstract = detail::hana_trait<std::is_abstract>{};
constexpr auto is_signed = detail::hana_trait<std::is_signed>{};
constexpr auto is_unsigned = detail::hana_trait<std::is_unsigned>{};
constexpr auto is_constructible = detail::hana_trait<std::is_constructible>{};
constexpr auto is_trivially_constructible = detail::hana_trait<std::is_trivially_constructible>{};
constexpr auto is_nothrow_constructible = detail::hana_trait<std::is_nothrow_constructible>{};
constexpr auto is_default_constructible = detail::hana_trait<std::is_default_constructible>{};
constexpr auto is_trivially_default_constructible = detail::hana_trait<std::is_trivially_default_constructible>{};
constexpr auto is_nothrow_default_constructible = detail::hana_trait<std::is_nothrow_default_constructible>{};
constexpr auto is_copy_constructible = detail::hana_trait<std::is_copy_constructible>{};
constexpr auto is_trivially_copy_constructible = detail::hana_trait<std::is_trivially_copy_constructible>{};
constexpr auto is_nothrow_copy_constructible = detail::hana_trait<std::is_nothrow_copy_constructible>{};
constexpr auto is_move_constructible = detail::hana_trait<std::is_move_constructible>{};
constexpr auto is_trivially_move_constructible = detail::hana_trait<std::is_trivially_move_constructible>{};
constexpr auto is_nothrow_move_constructible = detail::hana_trait<std::is_nothrow_move_constructible>{};
constexpr auto is_assignable = detail::hana_trait<std::is_assignable>{};
constexpr auto is_trivially_assignable = detail::hana_trait<std::is_trivially_assignable>{};
constexpr auto is_nothrow_assignable = detail::hana_trait<std::is_nothrow_assignable>{};
constexpr auto is_copy_assignable = detail::hana_trait<std::is_copy_assignable>{};
constexpr auto is_trivially_copy_assignable = detail::hana_trait<std::is_trivially_copy_assignable>{};
constexpr auto is_nothrow_copy_assignable = detail::hana_trait<std::is_nothrow_copy_assignable>{};
constexpr auto is_move_assignable = detail::hana_trait<std::is_move_assignable>{};
constexpr auto is_trivially_move_assignable = detail::hana_trait<std::is_trivially_move_assignable>{};
constexpr auto is_nothrow_move_assignable = detail::hana_trait<std::is_nothrow_move_assignable>{};
constexpr auto is_destructible = detail::hana_trait<std::is_destructible>{};
constexpr auto is_trivially_destructible = detail::hana_trait<std::is_trivially_destructible>{};
constexpr auto is_nothrow_destructible = detail::hana_trait<std::is_nothrow_destructible>{};
constexpr auto has_virtual_destructor = detail::hana_trait<std::has_virtual_destructor>{};
constexpr auto alignment_of = detail::hana_trait<std::alignment_of>{};
constexpr auto rank = detail::hana_trait<std::rank>{};
constexpr struct extent_t {
template <typename T, typename N>
constexpr auto operator()(T const&, N const&) const {
constexpr unsigned n = N::value;
using Result = typename std::extent<typename T::type, n>::type;
return hana::integral_c<typename Result::value_type, Result::value>;
}
template <typename T>
constexpr auto operator()(T const& t) const
{ return (*this)(t, hana::uint_c<0>); }
} extent{};
constexpr auto is_same = detail::hana_trait<std::is_same>{};
constexpr auto is_base_of = detail::hana_trait<std::is_base_of>{};
constexpr auto is_convertible = detail::hana_trait<std::is_convertible>{};
constexpr auto remove_cv = metafunction<std::remove_cv>;
constexpr auto remove_const = metafunction<std::remove_const>;
constexpr auto remove_volatile = metafunction<std::remove_volatile>;
constexpr auto add_cv = metafunction<std::add_cv>;
constexpr auto add_const = metafunction<std::add_const>;
constexpr auto add_volatile = metafunction<std::add_volatile>;
constexpr auto remove_reference = metafunction<std::remove_reference>;
constexpr auto add_lvalue_reference = metafunction<std::add_lvalue_reference>;
constexpr auto add_rvalue_reference = metafunction<std::add_rvalue_reference>;
constexpr auto remove_pointer = metafunction<std::remove_pointer>;
constexpr auto add_pointer = metafunction<std::add_pointer>;
constexpr auto make_signed = metafunction<std::make_signed>;
constexpr auto make_unsigned = metafunction<std::make_unsigned>;
constexpr auto remove_extent = metafunction<std::remove_extent>;
constexpr auto remove_all_extents = metafunction<std::remove_all_extents>;
constexpr struct aligned_storage_t {
template <typename Len, typename Align>
constexpr auto operator()(Len const&, Align const&) const {
constexpr std::size_t len = Len::value;
constexpr std::size_t align = Align::value;
using Result = typename std::aligned_storage<len, align>::type;
return hana::type_c<Result>;
}
template <typename Len>
constexpr auto operator()(Len const&) const {
constexpr std::size_t len = Len::value;
using Result = typename std::aligned_storage<len>::type;
return hana::type_c<Result>;
}
} aligned_storage{};
constexpr struct aligned_union_t {
template <typename Len, typename ...T>
constexpr auto operator()(Len const&, T const&...) const {
constexpr std::size_t len = Len::value;
using Result = typename std::aligned_union<len, typename T::type...>::type;
return hana::type_c<Result>;
}
} aligned_union{};
constexpr auto decay = metafunction<std::decay>;
constexpr auto common_type = metafunction<std::common_type>;
constexpr auto underlying_type = metafunction<std::underlying_type>;
constexpr auto result_of = metafunction<std::result_of>;
struct declval_t {
template <typename T>
typename std::add_rvalue_reference<
typename T::type
>::type operator()(T const&) const;
};
constexpr declval_t declval{};
} }}
# 191 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/unfold_left.hpp" 1 3 4
# 13 "/usr/include/boost/hana/unfold_left.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/unfold_left.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/unfold_left.hpp" 3 4
namespace boost { namespace hana {
# 74 "/usr/include/boost/hana/fwd/unfold_left.hpp" 3 4
template <typename S, typename = void>
struct unfold_left_impl : unfold_left_impl<S, when<true>> { };
template <typename S>
struct unfold_left_t;
template <typename S>
constexpr unfold_left_t<S> unfold_left{};
}}
# 14 "/usr/include/boost/hana/unfold_left.hpp" 2 3 4
# 26 "/usr/include/boost/hana/unfold_left.hpp" 3 4
namespace boost { namespace hana {
template <typename S>
struct unfold_left_t {
static_assert(hana::Sequence<S>::value,
"hana::unfold_left<S> requires 'S' to be a Sequence");
template <typename State, typename F>
constexpr auto operator()(State&& state, F&& f) const {
return unfold_left_impl<S>::apply(
static_cast<State&&>(state),
static_cast<F&&>(f)
);
}
};
template <typename S, bool condition>
struct unfold_left_impl<S, when<condition>> : default_ {
struct unfold_left_helper {
template <typename F, typename P>
constexpr auto operator()(F&& f, P&& p) const {
return hana::append(
unfold_left_impl::apply(
hana::first(static_cast<P&&>(p)),
static_cast<F&&>(f)
),
hana::second(static_cast<P&&>(p))
);
}
};
template <typename Init, typename F>
static constexpr auto apply(Init&& init, F&& f) {
decltype(auto) elt = f(static_cast<Init&&>(init));
return hana::maybe(empty<S>(),
hana::partial(unfold_left_helper{}, static_cast<F&&>(f)),
static_cast<decltype(elt)&&>(elt)
);
}
};
}}
# 195 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/unfold_right.hpp" 1 3 4
# 13 "/usr/include/boost/hana/unfold_right.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/unfold_right.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/unfold_right.hpp" 3 4
namespace boost { namespace hana {
# 74 "/usr/include/boost/hana/fwd/unfold_right.hpp" 3 4
template <typename S, typename = void>
struct unfold_right_impl : unfold_right_impl<S, when<true>> { };
template <typename S>
struct unfold_right_t;
template <typename S>
constexpr unfold_right_t<S> unfold_right{};
}}
# 14 "/usr/include/boost/hana/unfold_right.hpp" 2 3 4
# 26 "/usr/include/boost/hana/unfold_right.hpp" 3 4
namespace boost { namespace hana {
template <typename S>
struct unfold_right_t {
static_assert(hana::Sequence<S>::value,
"hana::unfold_right<S> requires 'S' to be a Sequence");
template <typename State, typename F>
constexpr auto operator()(State&& state, F&& f) const {
return unfold_right_impl<S>::apply(
static_cast<State&&>(state),
static_cast<F&&>(f)
);
}
};
template <typename S, bool condition>
struct unfold_right_impl<S, when<condition>> : default_ {
struct unfold_right_helper {
template <typename F, typename P>
constexpr auto operator()(F&& f, P&& p) const {
return hana::prepend(
unfold_right_impl::apply(
hana::second(static_cast<P&&>(p)),
static_cast<F&&>(f)
),
hana::first(static_cast<P&&>(p))
);
}
};
template <typename Init, typename F>
static constexpr auto apply(Init&& init, F&& f) {
decltype(auto) elt = f(static_cast<Init&&>(init));
return hana::maybe(hana::empty<S>(),
hana::partial(unfold_right_helper{}, static_cast<F&&>(f)),
static_cast<decltype(elt)&&>(elt)
);
}
};
}}
# 196 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/unique.hpp" 1 3 4
# 13 "/usr/include/boost/hana/unique.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/unique.hpp" 1 3 4
# 18 "/usr/include/boost/hana/fwd/unique.hpp" 3 4
namespace boost { namespace hana {
# 76 "/usr/include/boost/hana/fwd/unique.hpp" 3 4
template <typename S, typename = void>
struct unique_impl : unique_impl<S, when<true>> { };
struct unique_t : detail::nested_by<unique_t> {
template <typename Xs>
constexpr auto operator()(Xs&& xs) const;
template <typename Xs, typename Predicate>
constexpr auto operator()(Xs&& xs, Predicate&& predicate) const;
};
constexpr unique_t unique{};
}}
# 14 "/usr/include/boost/hana/unique.hpp" 2 3 4
# 25 "/usr/include/boost/hana/unique.hpp" 3 4
namespace boost { namespace hana {
template <typename Xs>
constexpr auto unique_t::operator()(Xs&& xs) const {
using S = typename hana::tag_of<Xs>::type;
using Unique = ::std::conditional_t< (hana::Sequence<S>::value), unique_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::unique(xs) requires 'xs' to be a Sequence");
return Unique::apply(static_cast<Xs&&>(xs));
}
template <typename Xs, typename Predicate>
constexpr auto unique_t::operator()(Xs&& xs, Predicate&& predicate) const {
using S = typename hana::tag_of<Xs>::type;
using Unique = ::std::conditional_t< (hana::Sequence<S>::value), unique_impl<S>, ::boost::hana::deleted_implementation >
;
static_assert(hana::Sequence<S>::value,
"hana::unique(xs, predicate) requires 'xs' to be a Sequence");
return Unique::apply(static_cast<Xs&&>(xs),
static_cast<Predicate&&>(predicate));
}
template <typename S, bool condition>
struct unique_impl<S, when<condition>> : default_ {
template <typename Xs, typename Pred>
static constexpr auto apply(Xs&& xs, Pred&& pred) {
return hana::transform(
hana::group(static_cast<Xs&&>(xs), static_cast<Pred&&>(pred)),
hana::front
);
}
template <typename Xs>
static constexpr auto apply(Xs&& xs)
{ return unique_impl::apply(static_cast<Xs&&>(xs), hana::equal); }
};
}}
# 198 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/zip.hpp" 1 3 4
# 13 "/usr/include/boost/hana/zip.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/zip.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/zip.hpp" 3 4
namespace boost { namespace hana {
# 49 "/usr/include/boost/hana/fwd/zip.hpp" 3 4
template <typename S, typename = void>
struct zip_impl : zip_impl<S, when<true>> { };
struct zip_t {
template <typename Xs, typename ...Ys>
constexpr auto operator()(Xs&& xs, Ys&& ...ys) const;
};
constexpr zip_t zip{};
}}
# 14 "/usr/include/boost/hana/zip.hpp" 2 3 4
# 1 "/usr/include/boost/hana/zip_with.hpp" 1 3 4
# 13 "/usr/include/boost/hana/zip_with.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/zip_with.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/zip_with.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/zip_with.hpp" 3 4
template <typename S, typename = void>
struct zip_with_impl : zip_with_impl<S, when<true>> { };
struct zip_with_t {
template <typename F, typename Xs, typename ...Ys>
constexpr auto operator()(F&& f, Xs&& xs, Ys&& ...ys) const;
};
constexpr zip_with_t zip_with{};
}}
# 14 "/usr/include/boost/hana/zip_with.hpp" 2 3 4
# 27 "/usr/include/boost/hana/zip_with.hpp" 3 4
namespace boost { namespace hana {
template <typename F, typename Xs, typename ...Ys>
constexpr auto zip_with_t::operator()(F&& f, Xs&& xs, Ys&& ...ys) const {
static_assert(detail::fast_and<
hana::Sequence<Xs>::value, hana::Sequence<Ys>::value...
>::value,
"hana::zip_with(f, xs, ys...) requires 'xs' and 'ys...' to be Sequences");
return zip_with_impl<typename hana::tag_of<Xs>::type>::apply(
static_cast<F&&>(f),
static_cast<Xs&&>(xs),
static_cast<Ys&&>(ys)...
);
}
template <typename S>
struct zip_with_impl<S, when<Sequence<S>::value>> {
template <std::size_t N, typename F, typename ...Xs>
static constexpr decltype(auto) transverse(F&& f, Xs&& ...xs) {
return static_cast<F&&>(f)(hana::at_c<N>(static_cast<Xs&&>(xs))...);
}
template <std::size_t ...N, typename F, typename ...Xs>
static constexpr auto
zip_helper(std::index_sequence<N...>, F&& f, Xs&& ...xs) {
return hana::make<S>(transverse<N>(f, xs...)...);
}
template <typename F, typename X, typename ...Xs>
static constexpr auto
apply(F&& f, X&& x, Xs&& ...xs) {
constexpr std::size_t N = decltype(hana::length(x))::value;
return zip_helper(std::make_index_sequence<N>{},
static_cast<F&&>(f),
static_cast<X&&>(x), static_cast<Xs&&>(xs)...);
}
};
}}
# 21 "/usr/include/boost/hana/zip.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename ...Ys>
constexpr auto zip_t::operator()(Xs&& xs, Ys&& ...ys) const {
static_assert(detail::fast_and<
hana::Sequence<Xs>::value, hana::Sequence<Ys>::value...
>::value,
"hana::zip(xs, ys...) requires 'xs' and 'ys...' to be Sequences");
return zip_impl<typename hana::tag_of<Xs>::type>::apply(
static_cast<Xs&&>(xs),
static_cast<Ys&&>(ys)...
);
}
template <typename S, bool condition>
struct zip_impl<S, when<condition>> : default_ {
template <typename ...Xs>
static constexpr decltype(auto) apply(Xs&& ...xs) {
return hana::zip_with(hana::make_tuple, static_cast<Xs&&>(xs)...);
}
};
}}
# 204 "/usr/include/boost/hana.hpp" 2 3 4
# 1 "/usr/include/boost/hana/zip_shortest.hpp" 1 3 4
# 13 "/usr/include/boost/hana/zip_shortest.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/zip_shortest.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/zip_shortest.hpp" 3 4
namespace boost { namespace hana {
# 49 "/usr/include/boost/hana/fwd/zip_shortest.hpp" 3 4
template <typename S, typename = void>
struct zip_shortest_impl : zip_shortest_impl<S, when<true>> { };
struct zip_shortest_t {
template <typename Xs, typename ...Ys>
constexpr auto operator()(Xs&& xs, Ys&& ...ys) const;
};
constexpr zip_shortest_t zip_shortest{};
}}
# 14 "/usr/include/boost/hana/zip_shortest.hpp" 2 3 4
# 1 "/usr/include/boost/hana/zip_shortest_with.hpp" 1 3 4
# 13 "/usr/include/boost/hana/zip_shortest_with.hpp" 3 4
# 1 "/usr/include/boost/hana/fwd/zip_shortest_with.hpp" 1 3 4
# 17 "/usr/include/boost/hana/fwd/zip_shortest_with.hpp" 3 4
namespace boost { namespace hana {
# 50 "/usr/include/boost/hana/fwd/zip_shortest_with.hpp" 3 4
template <typename S, typename = void>
struct zip_shortest_with_impl : zip_shortest_with_impl<S, when<true>> { };
struct zip_shortest_with_t {
template <typename F, typename Xs, typename ...Ys>
constexpr auto operator()(F&& f, Xs&& xs, Ys&& ...ys) const;
};
constexpr zip_shortest_with_t zip_shortest_with{};
}}
# 14 "/usr/include/boost/hana/zip_shortest_with.hpp" 2 3 4
# 28 "/usr/include/boost/hana/zip_shortest_with.hpp" 3 4
namespace boost { namespace hana {
template <typename F, typename Xs, typename ...Ys>
constexpr auto
zip_shortest_with_t::operator()(F&& f, Xs&& xs, Ys&& ...ys) const {
static_assert(detail::fast_and<
hana::Sequence<Xs>::value, hana::Sequence<Ys>::value...
>::value,
"hana::zip_shortest_with(f, xs, ys...) requires 'xs' and 'ys...' to be Sequences");
return zip_shortest_with_impl<typename hana::tag_of<Xs>::type>::apply(
static_cast<F&&>(f),
static_cast<Xs&&>(xs),
static_cast<Ys&&>(ys)...
);
}
template <typename S, bool condition>
struct zip_shortest_with_impl<S, when<condition>> : default_ {
template <typename F, typename ...Xs>
static constexpr decltype(auto) apply(F&& f, Xs&& ...xs) {
constexpr std::size_t lengths[] = {
decltype(hana::length(xs))::value...
};
constexpr std::size_t min = *detail::min_element(lengths, lengths + sizeof...(xs));
return hana::zip_with(static_cast<F&&>(f),
hana::take_front(static_cast<Xs&&>(xs), hana::size_c<min>)...
);
}
};
}}
# 21 "/usr/include/boost/hana/zip_shortest.hpp" 2 3 4
namespace boost { namespace hana {
template <typename Xs, typename ...Ys>
constexpr auto zip_shortest_t::operator()(Xs&& xs, Ys&& ...ys) const {
static_assert(detail::fast_and<
hana::Sequence<Xs>::value, hana::Sequence<Ys>::value...
>::value,
"hana::zip_shortest(xs, ys...) requires 'xs' and 'ys...' to be Sequences");
return zip_shortest_impl<typename hana::tag_of<Xs>::type>::apply(
static_cast<Xs&&>(xs),
static_cast<Ys&&>(ys)...
);
}
template <typename S, bool condition>
struct zip_shortest_impl<S, when<condition>> : default_ {
template <typename ...Xs>
static constexpr decltype(auto) apply(Xs&& ...xs) {
return hana::zip_shortest_with(hana::make_tuple,
static_cast<Xs&&>(xs)...);
}
};
}}
# 205 "/usr/include/boost/hana.hpp" 2 3 4
# 2 "tuple_test.cc" 2
# 1 "/usr/include/boost/type_index.hpp" 1 3 4
# 17 "/usr/include/boost/type_index.hpp" 3 4
# 1 "/usr/include/boost/config.hpp" 1 3 4
# 30 "/usr/include/boost/config.hpp" 3 4
# 1 "/usr/include/boost/config/user.hpp" 1 3 4
# 31 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/select_compiler_config.hpp" 1 3 4
# 36 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4
# 40 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/select_stdlib_config.hpp" 1 3 4
# 45 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4
# 78 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 3 4
# 1 "/usr/include/unistd.h" 1 3 4
# 27 "/usr/include/unistd.h" 3 4
extern "C" {
# 205 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4
# 206 "/usr/include/unistd.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4
# 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4
# 210 "/usr/include/unistd.h" 2 3 4
# 229 "/usr/include/unistd.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 230 "/usr/include/unistd.h" 2 3 4
# 270 "/usr/include/unistd.h" 3 4
typedef __intptr_t intptr_t;
typedef __socklen_t socklen_t;
# 290 "/usr/include/unistd.h" 3 4
extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1)));
extern int euidaccess (const char *__name, int __type)
throw () __attribute__ ((__nonnull__ (1)));
extern int eaccess (const char *__name, int __type)
throw () __attribute__ ((__nonnull__ (1)));
extern int faccessat (int __fd, const char *__file, int __type, int __flag)
throw () __attribute__ ((__nonnull__ (2))) ;
# 337 "/usr/include/unistd.h" 3 4
extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
# 348 "/usr/include/unistd.h" 3 4
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
throw ();
extern int close (int __fd);
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
extern ssize_t write (int __fd, const void *__buf, size_t __n) ;
# 379 "/usr/include/unistd.h" 3 4
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
__off_t __offset) ;
extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
__off_t __offset) ;
# 407 "/usr/include/unistd.h" 3 4
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset) ;
extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
__off64_t __offset) ;
extern int pipe (int __pipedes[2]) throw () ;
extern int pipe2 (int __pipedes[2], int __flags) throw () ;
# 435 "/usr/include/unistd.h" 3 4
extern unsigned int alarm (unsigned int __seconds) throw ();
# 447 "/usr/include/unistd.h" 3 4
extern unsigned int sleep (unsigned int __seconds);
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
throw ();
extern int usleep (__useconds_t __useconds);
# 472 "/usr/include/unistd.h" 3 4
extern int pause (void);
extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ;
extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchownat (int __fd, const char *__file, __uid_t __owner,
__gid_t __group, int __flag)
throw () __attribute__ ((__nonnull__ (2))) ;
extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchdir (int __fd) throw () ;
# 514 "/usr/include/unistd.h" 3 4
extern char *getcwd (char *__buf, size_t __size) throw () ;
extern char *get_current_dir_name (void) throw ();
extern char *getwd (char *__buf)
throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
extern int dup (int __fd) throw () ;
extern int dup2 (int __fd, int __fd2) throw ();
extern int dup3 (int __fd, int __fd2, int __flags) throw ();
extern char **__environ;
extern char **environ;
extern int execve (const char *__path, char *const __argv[],
char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
throw () __attribute__ ((__nonnull__ (2)));
extern int execv (const char *__path, char *const __argv[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execle (const char *__path, const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execl (const char *__path, const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execvp (const char *__file, char *const __argv[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execlp (const char *__file, const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execvpe (const char *__file, char *const __argv[],
char *const __envp[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nice (int __inc) throw () ;
extern void _exit (int __status) __attribute__ ((__noreturn__));
# 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4
# 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4
enum
{
_PC_LINK_MAX,
_PC_MAX_CANON,
_PC_MAX_INPUT,
_PC_NAME_MAX,
_PC_PATH_MAX,
_PC_PIPE_BUF,
_PC_CHOWN_RESTRICTED,
_PC_NO_TRUNC,
_PC_VDISABLE,
_PC_SYNC_IO,
_PC_ASYNC_IO,
_PC_PRIO_IO,
_PC_SOCK_MAXBUF,
_PC_FILESIZEBITS,
_PC_REC_INCR_XFER_SIZE,
_PC_REC_MAX_XFER_SIZE,
_PC_REC_MIN_XFER_SIZE,
_PC_REC_XFER_ALIGN,
_PC_ALLOC_SIZE_MIN,
_PC_SYMLINK_MAX,
_PC_2_SYMLINKS
};
enum
{
_SC_ARG_MAX,
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_NGROUPS_MAX,
_SC_OPEN_MAX,
_SC_STREAM_MAX,
_SC_TZNAME_MAX,
_SC_JOB_CONTROL,
_SC_SAVED_IDS,
_SC_REALTIME_SIGNALS,
_SC_PRIORITY_SCHEDULING,
_SC_TIMERS,
_SC_ASYNCHRONOUS_IO,
_SC_PRIORITIZED_IO,
_SC_SYNCHRONIZED_IO,
_SC_FSYNC,
_SC_MAPPED_FILES,
_SC_MEMLOCK,
_SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION,
_SC_MESSAGE_PASSING,
_SC_SEMAPHORES,
_SC_SHARED_MEMORY_OBJECTS,
_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
_SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX,
_SC_MQ_PRIO_MAX,
_SC_VERSION,
_SC_PAGESIZE,
_SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX,
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_TIMER_MAX,
_SC_BC_BASE_MAX,
_SC_BC_DIM_MAX,
_SC_BC_SCALE_MAX,
_SC_BC_STRING_MAX,
_SC_COLL_WEIGHTS_MAX,
_SC_EQUIV_CLASS_MAX,
_SC_EXPR_NEST_MAX,
_SC_LINE_MAX,
_SC_RE_DUP_MAX,
_SC_CHARCLASS_NAME_MAX,
_SC_2_VERSION,
_SC_2_C_BIND,
_SC_2_C_DEV,
_SC_2_FORT_DEV,
_SC_2_FORT_RUN,
_SC_2_SW_DEV,
_SC_2_LOCALEDEF,
_SC_PII,
_SC_PII_XTI,
_SC_PII_SOCKET,
_SC_PII_INTERNET,
_SC_PII_OSI,
_SC_POLL,
_SC_SELECT,
_SC_UIO_MAXIOV,
_SC_IOV_MAX = _SC_UIO_MAXIOV,
_SC_PII_INTERNET_STREAM,
_SC_PII_INTERNET_DGRAM,
_SC_PII_OSI_COTS,
_SC_PII_OSI_CLTS,
_SC_PII_OSI_M,
_SC_T_IOV_MAX,
_SC_THREADS,
_SC_THREAD_SAFE_FUNCTIONS,
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX,
_SC_TTY_NAME_MAX,
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
_SC_THREAD_ATTR_STACKADDR,
_SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_PRIORITY_SCHEDULING,
_SC_THREAD_PRIO_INHERIT,
_SC_THREAD_PRIO_PROTECT,
_SC_THREAD_PROCESS_SHARED,
_SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN,
_SC_PHYS_PAGES,
_SC_AVPHYS_PAGES,
_SC_ATEXIT_MAX,
_SC_PASS_MAX,
_SC_XOPEN_VERSION,
_SC_XOPEN_XCU_VERSION,
_SC_XOPEN_UNIX,
_SC_XOPEN_CRYPT,
_SC_XOPEN_ENH_I18N,
_SC_XOPEN_SHM,
_SC_2_CHAR_TERM,
_SC_2_C_VERSION,
_SC_2_UPE,
_SC_XOPEN_XPG2,
_SC_XOPEN_XPG3,
_SC_XOPEN_XPG4,
_SC_CHAR_BIT,
_SC_CHAR_MAX,
_SC_CHAR_MIN,
_SC_INT_MAX,
_SC_INT_MIN,
_SC_LONG_BIT,
_SC_WORD_BIT,
_SC_MB_LEN_MAX,
_SC_NZERO,
_SC_SSIZE_MAX,
_SC_SCHAR_MAX,
_SC_SCHAR_MIN,
_SC_SHRT_MAX,
_SC_SHRT_MIN,
_SC_UCHAR_MAX,
_SC_UINT_MAX,
_SC_ULONG_MAX,
_SC_USHRT_MAX,
_SC_NL_ARGMAX,
_SC_NL_LANGMAX,
_SC_NL_MSGMAX,
_SC_NL_NMAX,
_SC_NL_SETMAX,
_SC_NL_TEXTMAX,
_SC_XBS5_ILP32_OFF32,
_SC_XBS5_ILP32_OFFBIG,
_SC_XBS5_LP64_OFF64,
_SC_XBS5_LPBIG_OFFBIG,
_SC_XOPEN_LEGACY,
_SC_XOPEN_REALTIME,
_SC_XOPEN_REALTIME_THREADS,
_SC_ADVISORY_INFO,
_SC_BARRIERS,
_SC_BASE,
_SC_C_LANG_SUPPORT,
_SC_C_LANG_SUPPORT_R,
_SC_CLOCK_SELECTION,
_SC_CPUTIME,
_SC_THREAD_CPUTIME,
_SC_DEVICE_IO,
_SC_DEVICE_SPECIFIC,
_SC_DEVICE_SPECIFIC_R,
_SC_FD_MGMT,
_SC_FIFO,
_SC_PIPE,
_SC_FILE_ATTRIBUTES,
_SC_FILE_LOCKING,
_SC_FILE_SYSTEM,
_SC_MONOTONIC_CLOCK,
_SC_MULTI_PROCESS,
_SC_SINGLE_PROCESS,
_SC_NETWORKING,
_SC_READER_WRITER_LOCKS,
_SC_SPIN_LOCKS,
_SC_REGEXP,
_SC_REGEX_VERSION,
_SC_SHELL,
_SC_SIGNALS,
_SC_SPAWN,
_SC_SPORADIC_SERVER,
_SC_THREAD_SPORADIC_SERVER,
_SC_SYSTEM_DATABASE,
_SC_SYSTEM_DATABASE_R,
_SC_TIMEOUTS,
_SC_TYPED_MEMORY_OBJECTS,
_SC_USER_GROUPS,
_SC_USER_GROUPS_R,
_SC_2_PBS,
_SC_2_PBS_ACCOUNTING,
_SC_2_PBS_LOCATE,
_SC_2_PBS_MESSAGE,
_SC_2_PBS_TRACK,
_SC_SYMLOOP_MAX,
_SC_STREAMS,
_SC_2_PBS_CHECKPOINT,
_SC_V6_ILP32_OFF32,
_SC_V6_ILP32_OFFBIG,
_SC_V6_LP64_OFF64,
_SC_V6_LPBIG_OFFBIG,
_SC_HOST_NAME_MAX,
_SC_TRACE,
_SC_TRACE_EVENT_FILTER,
_SC_TRACE_INHERIT,
_SC_TRACE_LOG,
_SC_LEVEL1_ICACHE_SIZE,
_SC_LEVEL1_ICACHE_ASSOC,
_SC_LEVEL1_ICACHE_LINESIZE,
_SC_LEVEL1_DCACHE_SIZE,
_SC_LEVEL1_DCACHE_ASSOC,
_SC_LEVEL1_DCACHE_LINESIZE,
_SC_LEVEL2_CACHE_SIZE,
_SC_LEVEL2_CACHE_ASSOC,
_SC_LEVEL2_CACHE_LINESIZE,
_SC_LEVEL3_CACHE_SIZE,
_SC_LEVEL3_CACHE_ASSOC,
_SC_LEVEL3_CACHE_LINESIZE,
_SC_LEVEL4_CACHE_SIZE,
_SC_LEVEL4_CACHE_ASSOC,
_SC_LEVEL4_CACHE_LINESIZE,
_SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
_SC_RAW_SOCKETS,
_SC_V7_ILP32_OFF32,
_SC_V7_ILP32_OFFBIG,
_SC_V7_LP64_OFF64,
_SC_V7_LPBIG_OFFBIG,
_SC_SS_REPL_MAX,
_SC_TRACE_EVENT_NAME_MAX,
_SC_TRACE_NAME_MAX,
_SC_TRACE_SYS_MAX,
_SC_TRACE_USER_EVENT_MAX,
_SC_XOPEN_STREAMS,
_SC_THREAD_ROBUST_PRIO_INHERIT,
_SC_THREAD_ROBUST_PRIO_PROTECT
};
enum
{
_CS_PATH,
_CS_V6_WIDTH_RESTRICTED_ENVS,
_CS_GNU_LIBC_VERSION,
_CS_GNU_LIBPTHREAD_VERSION,
_CS_V5_WIDTH_RESTRICTED_ENVS,
_CS_V7_WIDTH_RESTRICTED_ENVS,
_CS_LFS_CFLAGS = 1000,
_CS_LFS_LDFLAGS,
_CS_LFS_LIBS,
_CS_LFS_LINTFLAGS,
_CS_LFS64_CFLAGS,
_CS_LFS64_LDFLAGS,
_CS_LFS64_LIBS,
_CS_LFS64_LINTFLAGS,
_CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
_CS_XBS5_ILP32_OFF32_LDFLAGS,
_CS_XBS5_ILP32_OFF32_LIBS,
_CS_XBS5_ILP32_OFF32_LINTFLAGS,
_CS_XBS5_ILP32_OFFBIG_CFLAGS,
_CS_XBS5_ILP32_OFFBIG_LDFLAGS,
_CS_XBS5_ILP32_OFFBIG_LIBS,
_CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
_CS_XBS5_LP64_OFF64_CFLAGS,
_CS_XBS5_LP64_OFF64_LDFLAGS,
_CS_XBS5_LP64_OFF64_LIBS,
_CS_XBS5_LP64_OFF64_LINTFLAGS,
_CS_XBS5_LPBIG_OFFBIG_CFLAGS,
_CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
_CS_XBS5_LPBIG_OFFBIG_LIBS,
_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
_CS_POSIX_V6_ILP32_OFF32_CFLAGS,
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
_CS_POSIX_V6_ILP32_OFF32_LIBS,
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_LIBS,
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
_CS_POSIX_V6_LP64_OFF64_CFLAGS,
_CS_POSIX_V6_LP64_OFF64_LDFLAGS,
_CS_POSIX_V6_LP64_OFF64_LIBS,
_CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
_CS_POSIX_V7_ILP32_OFF32_CFLAGS,
_CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
_CS_POSIX_V7_ILP32_OFF32_LIBS,
_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_LIBS,
_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
_CS_POSIX_V7_LP64_OFF64_CFLAGS,
_CS_POSIX_V7_LP64_OFF64_LDFLAGS,
_CS_POSIX_V7_LP64_OFF64_LIBS,
_CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
_CS_V6_ENV,
_CS_V7_ENV
};
# 613 "/usr/include/unistd.h" 2 3 4
extern long int pathconf (const char *__path, int __name)
throw () __attribute__ ((__nonnull__ (1)));
extern long int fpathconf (int __fd, int __name) throw ();
extern long int sysconf (int __name) throw ();
extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
extern __pid_t getpid (void) throw ();
extern __pid_t getppid (void) throw ();
extern __pid_t getpgrp (void) throw ();
extern __pid_t __getpgid (__pid_t __pid) throw ();
extern __pid_t getpgid (__pid_t __pid) throw ();
extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
# 663 "/usr/include/unistd.h" 3 4
extern int setpgrp (void) throw ();
extern __pid_t setsid (void) throw ();
extern __pid_t getsid (__pid_t __pid) throw ();
extern __uid_t getuid (void) throw ();
extern __uid_t geteuid (void) throw ();
extern __gid_t getgid (void) throw ();
extern __gid_t getegid (void) throw ();
extern int getgroups (int __size, __gid_t __list[]) throw () ;
extern int group_member (__gid_t __gid) throw ();
extern int setuid (__uid_t __uid) throw () ;
extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () ;
extern int seteuid (__uid_t __uid) throw () ;
extern int setgid (__gid_t __gid) throw () ;
extern int setregid (__gid_t __rgid, __gid_t __egid) throw () ;
extern int setegid (__gid_t __gid) throw () ;
extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
throw ();
extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
throw ();
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
throw () ;
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
throw () ;
extern __pid_t fork (void) throw ();
extern __pid_t vfork (void) throw ();
extern char *ttyname (int __fd) throw ();
extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2))) ;
extern int isatty (int __fd) throw ();
extern int ttyslot (void) throw ();
extern int link (const char *__from, const char *__to)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern int linkat (int __fromfd, const char *__from, int __tofd,
const char *__to, int __flags)
throw () __attribute__ ((__nonnull__ (2, 4))) ;
extern int symlink (const char *__from, const char *__to)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern ssize_t readlink (const char *__restrict __path,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern int symlinkat (const char *__from, int __tofd,
const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern ssize_t readlinkat (int __fd, const char *__restrict __path,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (2, 3))) ;
extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int unlinkat (int __fd, const char *__name, int __flag)
throw () __attribute__ ((__nonnull__ (2)));
extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1)));
extern __pid_t tcgetpgrp (int __fd) throw ();
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
extern char *getlogin (void);
extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
extern int setlogin (const char *__name) throw () __attribute__ ((__nonnull__ (1)));
# 873 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/getopt.h" 1 3 4
# 48 "/usr/include/getopt.h" 3 4
extern "C" {
# 57 "/usr/include/getopt.h" 3 4
extern char *optarg;
# 71 "/usr/include/getopt.h" 3 4
extern int optind;
extern int opterr;
extern int optopt;
# 150 "/usr/include/getopt.h" 3 4
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
throw ();
# 185 "/usr/include/getopt.h" 3 4
}
# 874 "/usr/include/unistd.h" 2 3 4
extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1)));
extern int sethostname (const char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int sethostid (long int __id) throw () ;
extern int getdomainname (char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int setdomainname (const char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int vhangup (void) throw ();
extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) ;
extern int profil (unsigned short int *__sample_buffer, size_t __size,
size_t __offset, unsigned int __scale)
throw () __attribute__ ((__nonnull__ (1)));
extern int acct (const char *__name) throw ();
extern char *getusershell (void) throw ();
extern void endusershell (void) throw ();
extern void setusershell (void) throw ();
extern int daemon (int __nochdir, int __noclose) throw () ;
extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
extern int fsync (int __fd);
extern int syncfs (int __fd) throw ();
extern long int gethostid (void);
extern void sync (void) throw ();
extern int getpagesize (void) throw () __attribute__ ((__const__));
extern int getdtablesize (void) throw ();
# 995 "/usr/include/unistd.h" 3 4
extern int truncate (const char *__file, __off_t __length)
throw () __attribute__ ((__nonnull__ (1))) ;
# 1007 "/usr/include/unistd.h" 3 4
extern int truncate64 (const char *__file, __off64_t __length)
throw () __attribute__ ((__nonnull__ (1))) ;
# 1018 "/usr/include/unistd.h" 3 4
extern int ftruncate (int __fd, __off_t __length) throw () ;
# 1028 "/usr/include/unistd.h" 3 4
extern int ftruncate64 (int __fd, __off64_t __length) throw () ;
# 1039 "/usr/include/unistd.h" 3 4
extern int brk (void *__addr) throw () ;
extern void *sbrk (intptr_t __delta) throw ();
# 1060 "/usr/include/unistd.h" 3 4
extern long int syscall (long int __sysno, ...) throw ();
# 1083 "/usr/include/unistd.h" 3 4
extern int lockf (int __fd, int __cmd, __off_t __len) ;
# 1093 "/usr/include/unistd.h" 3 4
extern int lockf64 (int __fd, int __cmd, __off64_t __len) ;
# 1114 "/usr/include/unistd.h" 3 4
extern int fdatasync (int __fildes);
extern char *crypt (const char *__key, const char *__salt)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void encrypt (char *__glibc_block, int __edflag)
throw () __attribute__ ((__nonnull__ (1)));
extern void swab (const void *__restrict __from, void *__restrict __to,
ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
# 1166 "/usr/include/unistd.h" 3 4
}
# 79 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 2 3 4
# 49 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/select_platform_config.hpp" 1 3 4
# 54 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4
# 15 "/usr/include/boost/config/platform/linux.hpp" 3 4
# 1 "/usr/include/c++/6/cstdlib" 1 3 4
# 39 "/usr/include/c++/6/cstdlib" 3 4
# 40 "/usr/include/c++/6/cstdlib" 3
# 16 "/usr/include/boost/config/platform/linux.hpp" 2 3 4
# 74 "/usr/include/boost/config/platform/linux.hpp" 3 4
# 1 "/usr/include/boost/config/posix_features.hpp" 1 3 4
# 75 "/usr/include/boost/config/platform/linux.hpp" 2 3 4
# 58 "/usr/include/boost/config.hpp" 2 3 4
# 1 "/usr/include/boost/config/suffix.hpp" 1 3 4
# 34 "/usr/include/boost/config/suffix.hpp" 3 4
# 35 "/usr/include/boost/config/suffix.hpp" 3
# 484 "/usr/include/boost/config/suffix.hpp" 3
namespace boost{
__extension__ typedef long long long_long_type;
__extension__ typedef unsigned long long ulong_long_type;
}
namespace boost{
__extension__ typedef __int128 int128_type;
__extension__ typedef unsigned __int128 uint128_type;
}
# 62 "/usr/include/boost/config.hpp" 2 3 4
# 18 "/usr/include/boost/type_index.hpp" 2 3 4
# 29 "/usr/include/boost/type_index.hpp" 3 4
# 1 "/usr/include/boost/type_index/stl_type_index.hpp" 1 3 4
# 22 "/usr/include/boost/type_index/stl_type_index.hpp" 3 4
# 1 "/usr/include/boost/type_index/type_index_facade.hpp" 1 3 4
# 13 "/usr/include/boost/type_index/type_index_facade.hpp" 3 4
# 1 "/usr/include/c++/6/string" 1 3 4
# 36 "/usr/include/c++/6/string" 3 4
# 37 "/usr/include/c++/6/string" 3
# 1 "/usr/include/c++/6/bits/stringfwd.h" 1 3
# 37 "/usr/include/c++/6/bits/stringfwd.h" 3
# 38 "/usr/include/c++/6/bits/stringfwd.h" 3
# 1 "/usr/include/c++/6/bits/memoryfwd.h" 1 3
# 46 "/usr/include/c++/6/bits/memoryfwd.h" 3
# 47 "/usr/include/c++/6/bits/memoryfwd.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 63 "/usr/include/c++/6/bits/memoryfwd.h" 3
template<typename>
class allocator;
template<>
class allocator<void>;
template<typename, typename>
struct uses_allocator;
}
# 41 "/usr/include/c++/6/bits/stringfwd.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<class _CharT>
struct char_traits;
template<> struct char_traits<char>;
template<> struct char_traits<wchar_t>;
template<> struct char_traits<char16_t>;
template<> struct char_traits<char32_t>;
namespace __cxx11 {
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
typedef basic_string<char> string;
typedef basic_string<wchar_t> wstring;
typedef basic_string<char16_t> u16string;
typedef basic_string<char32_t> u32string;
}
}
# 40 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/char_traits.h" 1 3
# 37 "/usr/include/c++/6/bits/char_traits.h" 3
# 38 "/usr/include/c++/6/bits/char_traits.h" 3
# 1 "/usr/include/c++/6/bits/stl_algobase.h" 1 3
# 60 "/usr/include/c++/6/bits/stl_algobase.h" 3
# 1 "/usr/include/c++/6/bits/functexcept.h" 1 3
# 40 "/usr/include/c++/6/bits/functexcept.h" 3
# 1 "/usr/include/c++/6/bits/exception_defines.h" 1 3
# 41 "/usr/include/c++/6/bits/functexcept.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
void
__throw_bad_exception(void) __attribute__((__noreturn__));
void
__throw_bad_alloc(void) __attribute__((__noreturn__));
void
__throw_bad_cast(void) __attribute__((__noreturn__));
void
__throw_bad_typeid(void) __attribute__((__noreturn__));
void
__throw_logic_error(const char*) __attribute__((__noreturn__));
void
__throw_domain_error(const char*) __attribute__((__noreturn__));
void
__throw_invalid_argument(const char*) __attribute__((__noreturn__));
void
__throw_length_error(const char*) __attribute__((__noreturn__));
void
__throw_out_of_range(const char*) __attribute__((__noreturn__));
void
__throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__))
__attribute__((__format__(__gnu_printf__, 1, 2)));
void
__throw_runtime_error(const char*) __attribute__((__noreturn__));
void
__throw_range_error(const char*) __attribute__((__noreturn__));
void
__throw_overflow_error(const char*) __attribute__((__noreturn__));
void
__throw_underflow_error(const char*) __attribute__((__noreturn__));
void
__throw_ios_failure(const char*) __attribute__((__noreturn__));
void
__throw_system_error(int) __attribute__((__noreturn__));
void
__throw_future_error(int) __attribute__((__noreturn__));
void
__throw_bad_function_call() __attribute__((__noreturn__));
}
# 61 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/bits/cpp_type_traits.h" 1 3
# 35 "/usr/include/c++/6/bits/cpp_type_traits.h" 3
# 36 "/usr/include/c++/6/bits/cpp_type_traits.h" 3
# 67 "/usr/include/c++/6/bits/cpp_type_traits.h" 3
extern "C++" {
namespace std __attribute__ ((__visibility__ ("default")))
{
struct __true_type { };
struct __false_type { };
template<bool>
struct __truth_type
{ typedef __false_type __type; };
template<>
struct __truth_type<true>
{ typedef __true_type __type; };
template<class _Sp, class _Tp>
struct __traitor
{
enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
typedef typename __truth_type<__value>::__type __type;
};
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_void
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_void<void>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_integer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_integer<bool>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char16_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char32_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
# 278 "/usr/include/c++/6/bits/cpp_type_traits.h" 3
template<typename _Tp>
struct __is_floating
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_floating<float>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<long double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_pointer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __is_pointer<_Tp*>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_arithmetic
: public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
{ };
template<typename _Tp>
struct __is_scalar
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
{ };
template<typename _Tp>
struct __is_char
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_char<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_char<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_byte
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_byte<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_move_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Iterator>
inline _Iterator
__miter_base(_Iterator __it)
{ return __it; }
}
}
# 62 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/ext/type_traits.h" 1 3
# 32 "/usr/include/c++/6/ext/type_traits.h" 3
# 33 "/usr/include/c++/6/ext/type_traits.h" 3
extern "C++" {
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
template<bool, typename>
struct __enable_if
{ };
template<typename _Tp>
struct __enable_if<true, _Tp>
{ typedef _Tp __type; };
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct __conditional_type
{ typedef _Iftrue __type; };
template<typename _Iftrue, typename _Iffalse>
struct __conditional_type<false, _Iftrue, _Iffalse>
{ typedef _Iffalse __type; };
template<typename _Tp>
struct __add_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __add_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __add_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __add_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __add_unsigned<long long>
{ typedef unsigned long long __type; };
template<>
struct __add_unsigned<bool>;
template<>
struct __add_unsigned<wchar_t>;
template<typename _Tp>
struct __remove_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __remove_unsigned<char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned short>
{ typedef short __type; };
template<>
struct __remove_unsigned<unsigned int>
{ typedef int __type; };
template<>
struct __remove_unsigned<unsigned long>
{ typedef long __type; };
template<>
struct __remove_unsigned<unsigned long long>
{ typedef long long __type; };
template<>
struct __remove_unsigned<bool>;
template<>
struct __remove_unsigned<wchar_t>;
template<typename _Type>
inline bool
__is_null_pointer(_Type* __ptr)
{ return __ptr == 0; }
template<typename _Type>
inline bool
__is_null_pointer(_Type)
{ return false; }
inline bool
__is_null_pointer(std::nullptr_t)
{ return true; }
template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
struct __promote
{ typedef double __type; };
template<typename _Tp>
struct __promote<_Tp, false>
{ };
template<>
struct __promote<long double>
{ typedef long double __type; };
template<>
struct __promote<double>
{ typedef double __type; };
template<>
struct __promote<float>
{ typedef float __type; };
template<typename _Tp, typename _Up,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type>
struct __promote_2
{
typedef __typeof__(_Tp2() + _Up2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type,
typename _Vp2 = typename __promote<_Vp>::__type>
struct __promote_3
{
typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type,
typename _Vp2 = typename __promote<_Vp>::__type,
typename _Wp2 = typename __promote<_Wp>::__type>
struct __promote_4
{
typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
};
}
}
# 63 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/ext/numeric_traits.h" 1 3
# 32 "/usr/include/c++/6/ext/numeric_traits.h" 3
# 33 "/usr/include/c++/6/ext/numeric_traits.h" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
# 54 "/usr/include/c++/6/ext/numeric_traits.h" 3
template<typename _Value>
struct __numeric_traits_integer
{
static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0);
static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0);
static const bool __is_signed = ((_Value)(-1) < 0);
static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0));
};
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__min;
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__max;
template<typename _Value>
const bool __numeric_traits_integer<_Value>::__is_signed;
template<typename _Value>
const int __numeric_traits_integer<_Value>::__digits;
# 99 "/usr/include/c++/6/ext/numeric_traits.h" 3
template<typename _Value>
struct __numeric_traits_floating
{
static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136);
static const bool __is_signed = true;
static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18);
static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932);
};
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_digits10;
template<typename _Value>
const bool __numeric_traits_floating<_Value>::__is_signed;
template<typename _Value>
const int __numeric_traits_floating<_Value>::__digits10;
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_exponent10;
template<typename _Value>
struct __numeric_traits
: public __conditional_type<std::__is_integer<_Value>::__value,
__numeric_traits_integer<_Value>,
__numeric_traits_floating<_Value> >::__type
{ };
}
# 64 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 1 3
# 62 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
# 63 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 89 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
struct input_iterator_tag { };
struct output_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 { };
# 116 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
typename _Pointer = _Tp*, typename _Reference = _Tp&>
struct iterator
{
typedef _Category iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
typedef _Reference reference;
};
# 143 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
template<typename _Iterator, typename = __void_t<>>
struct __iterator_traits { };
template<typename _Iterator>
struct __iterator_traits<_Iterator,
__void_t<typename _Iterator::iterator_category,
typename _Iterator::value_type,
typename _Iterator::difference_type,
typename _Iterator::pointer,
typename _Iterator::reference>>
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
template<typename _Iterator>
struct iterator_traits
: public __iterator_traits<_Iterator> { };
# 177 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
template<typename _Tp>
struct iterator_traits<_Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template<typename _Tp>
struct iterator_traits<const _Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{ return typename iterator_traits<_Iter>::iterator_category(); }
# 230 "/usr/include/c++/6/bits/stl_iterator_base_types.h" 3
template<typename _InIter>
using _RequireInputIter = typename
enable_if<is_convertible<typename
iterator_traits<_InIter>::iterator_category,
input_iterator_tag>::value>::type;
}
# 66 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 1 3
# 62 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 3
# 63 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 3
# 1 "/usr/include/c++/6/debug/assertions.h" 1 3
# 66 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template <typename> struct _List_iterator;
template <typename> struct _List_const_iterator;
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last,
input_iterator_tag)
{
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last)
{
++__first;
++__n;
}
return __n;
}
template<typename _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
return __last - __first;
}
template<typename _Tp>
ptrdiff_t
__distance(std::_List_iterator<_Tp>,
std::_List_iterator<_Tp>,
input_iterator_tag);
template<typename _Tp>
ptrdiff_t
__distance(std::_List_const_iterator<_Tp>,
std::_List_const_iterator<_Tp>,
input_iterator_tag);
# 133 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
return std::__distance(__first, __last,
std::__iterator_category(__first));
}
template<typename _InputIterator, typename _Distance>
inline void
__advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{
;
while (__n--)
++__i;
}
template<typename _BidirectionalIterator, typename _Distance>
inline void
__advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
if (__n > 0)
while (__n--)
++__i;
else
while (__n++)
--__i;
}
template<typename _RandomAccessIterator, typename _Distance>
inline void
__advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
__i += __n;
}
# 192 "/usr/include/c++/6/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator, typename _Distance>
inline void
advance(_InputIterator& __i, _Distance __n)
{
typename iterator_traits<_InputIterator>::difference_type __d = __n;
std::__advance(__i, __d, std::__iterator_category(__i));
}
template<typename _ForwardIterator>
inline _ForwardIterator
next(_ForwardIterator __x, typename
iterator_traits<_ForwardIterator>::difference_type __n = 1)
{
std::advance(__x, __n);
return __x;
}
template<typename _BidirectionalIterator>
inline _BidirectionalIterator
prev(_BidirectionalIterator __x, typename
iterator_traits<_BidirectionalIterator>::difference_type __n = 1)
{
std::advance(__x, -__n);
return __x;
}
}
# 67 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/bits/stl_iterator.h" 1 3
# 66 "/usr/include/c++/6/bits/stl_iterator.h" 3
# 1 "/usr/include/c++/6/bits/ptr_traits.h" 1 3
# 37 "/usr/include/c++/6/bits/ptr_traits.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
class __undefined;
template<typename _Tp>
struct __get_first_arg
{ using type = __undefined; };
template<template<typename, typename...> class _Template, typename _Tp,
typename... _Types>
struct __get_first_arg<_Template<_Tp, _Types...>>
{ using type = _Tp; };
template<typename _Tp>
using __get_first_arg_t = typename __get_first_arg<_Tp>::type;
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 _Tp, typename _Up>
using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type;
template<typename _Tp>
using __make_not_void
= typename conditional<is_void<_Tp>::value, __undefined, _Tp>::type;
template<typename _Ptr>
struct pointer_traits
{
private:
template<typename _Tp>
using __element_type = typename _Tp::element_type;
template<typename _Tp>
using __difference_type = typename _Tp::difference_type;
template<typename _Tp, typename _Up, typename = void>
struct __rebind : __replace_first_arg<_Tp, _Up> { };
template<typename _Tp, typename _Up>
struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>>>
{ using type = typename _Tp::template rebind<_Up>; };
public:
using pointer = _Ptr;
using element_type
= __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>;
using difference_type
= __detected_or_t<ptrdiff_t, __difference_type, _Ptr>;
template<typename _Up>
using rebind = typename __rebind<_Ptr, _Up>::type;
static _Ptr
pointer_to(__make_not_void<element_type>& __e)
{ return _Ptr::pointer_to(__e); }
static_assert(!is_same<element_type, __undefined>::value,
"pointer type defines element_type or is like SomePointer<T, Args>");
};
template<typename _Tp>
struct pointer_traits<_Tp*>
{
typedef _Tp* pointer;
typedef _Tp element_type;
typedef ptrdiff_t difference_type;
template<typename _Up>
using rebind = _Up*;
static pointer
pointer_to(__make_not_void<element_type>& __r) noexcept
{ return std::addressof(__r); }
};
template<typename _Ptr, typename _Tp>
using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>;
}
# 67 "/usr/include/c++/6/bits/stl_iterator.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 96 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Iterator>
class reverse_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator current;
typedef iterator_traits<_Iterator> __traits_type;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::pointer pointer;
typedef typename __traits_type::reference reference;
reverse_iterator() : current() { }
explicit
reverse_iterator(iterator_type __x) : current(__x) { }
reverse_iterator(const reverse_iterator& __x)
: current(__x.current) { }
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) { }
iterator_type
base() const
{ return current; }
# 160 "/usr/include/c++/6/bits/stl_iterator.h" 3
reference
operator*() const
{
_Iterator __tmp = current;
return *--__tmp;
}
pointer
operator->() const
{ return &(operator*()); }
reverse_iterator&
operator++()
{
--current;
return *this;
}
reverse_iterator
operator++(int)
{
reverse_iterator __tmp = *this;
--current;
return __tmp;
}
reverse_iterator&
operator--()
{
++current;
return *this;
}
reverse_iterator
operator--(int)
{
reverse_iterator __tmp = *this;
++current;
return __tmp;
}
reverse_iterator
operator+(difference_type __n) const
{ return reverse_iterator(current - __n); }
reverse_iterator&
operator+=(difference_type __n)
{
current -= __n;
return *this;
}
reverse_iterator
operator-(difference_type __n) const
{ return reverse_iterator(current + __n); }
reverse_iterator&
operator-=(difference_type __n)
{
current += __n;
return *this;
}
reference
operator[](difference_type __n) const
{ return *(*this + __n); }
};
# 290 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Iterator>
inline bool
operator==(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
inline bool
operator<(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() < __x.base(); }
template<typename _Iterator>
inline bool
operator!=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
inline bool
operator>(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _Iterator>
inline bool
operator<=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
inline bool
operator>=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline auto
operator-(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
-> decltype(__x.base() - __y.base())
{ return __y.base() - __x.base(); }
template<typename _Iterator>
inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
const reverse_iterator<_Iterator>& __x)
{ return reverse_iterator<_Iterator>(__x.base() - __n); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator==(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __x.base() == __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y.base() < __x.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator!=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x == __y); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y < __x; }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__y < __x); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x < __y); }
template<typename _IteratorL, typename _IteratorR>
inline auto
operator-(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
-> decltype(__y.base() - __x.base())
{ return __y.base() - __x.base(); }
template<typename _Iterator>
inline reverse_iterator<_Iterator>
__make_reverse_iterator(_Iterator __i)
{ return reverse_iterator<_Iterator>(__i); }
template<typename _Iterator>
inline reverse_iterator<_Iterator>
make_reverse_iterator(_Iterator __i)
{ return reverse_iterator<_Iterator>(__i); }
template<typename _Iterator>
auto
__niter_base(reverse_iterator<_Iterator> __it)
-> decltype(__make_reverse_iterator(__niter_base(__it.base())))
{ return __make_reverse_iterator(__niter_base(__it.base())); }
template<typename _Iterator>
struct __is_move_iterator<reverse_iterator<_Iterator> >
: __is_move_iterator<_Iterator>
{ };
template<typename _Iterator>
auto
__miter_base(reverse_iterator<_Iterator> __it)
-> decltype(__make_reverse_iterator(__miter_base(__it.base())))
{ return __make_reverse_iterator(__miter_base(__it.base())); }
# 448 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container>
class back_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
typedef _Container container_type;
explicit
back_insert_iterator(_Container& __x)
: container(std::__addressof(__x)) { }
# 483 "/usr/include/c++/6/bits/stl_iterator.h" 3
back_insert_iterator&
operator=(const typename _Container::value_type& __value)
{
container->push_back(__value);
return *this;
}
back_insert_iterator&
operator=(typename _Container::value_type&& __value)
{
container->push_back(std::move(__value));
return *this;
}
back_insert_iterator&
operator*()
{ return *this; }
back_insert_iterator&
operator++()
{ return *this; }
back_insert_iterator
operator++(int)
{ return *this; }
};
# 525 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container>
inline back_insert_iterator<_Container>
back_inserter(_Container& __x)
{ return back_insert_iterator<_Container>(__x); }
# 540 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container>
class front_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
typedef _Container container_type;
explicit front_insert_iterator(_Container& __x)
: container(std::__addressof(__x)) { }
# 574 "/usr/include/c++/6/bits/stl_iterator.h" 3
front_insert_iterator&
operator=(const typename _Container::value_type& __value)
{
container->push_front(__value);
return *this;
}
front_insert_iterator&
operator=(typename _Container::value_type&& __value)
{
container->push_front(std::move(__value));
return *this;
}
front_insert_iterator&
operator*()
{ return *this; }
front_insert_iterator&
operator++()
{ return *this; }
front_insert_iterator
operator++(int)
{ return *this; }
};
# 616 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container>
inline front_insert_iterator<_Container>
front_inserter(_Container& __x)
{ return front_insert_iterator<_Container>(__x); }
# 635 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container>
class insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
typename _Container::iterator iter;
public:
typedef _Container container_type;
insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(std::__addressof(__x)), iter(__i) {}
# 686 "/usr/include/c++/6/bits/stl_iterator.h" 3
insert_iterator&
operator=(const typename _Container::value_type& __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
insert_iterator&
operator=(typename _Container::value_type&& __value)
{
iter = container->insert(iter, std::move(__value));
++iter;
return *this;
}
insert_iterator&
operator*()
{ return *this; }
insert_iterator&
operator++()
{ return *this; }
insert_iterator&
operator++(int)
{ return *this; }
};
# 730 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Container, typename _Iterator>
inline insert_iterator<_Container>
inserter(_Container& __x, _Iterator __i)
{
return insert_iterator<_Container>(__x,
typename _Container::iterator(__i));
}
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
# 754 "/usr/include/c++/6/bits/stl_iterator.h" 3
using std::iterator_traits;
using std::iterator;
template<typename _Iterator, typename _Container>
class __normal_iterator
{
protected:
_Iterator _M_current;
typedef iterator_traits<_Iterator> __traits_type;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::reference reference;
typedef typename __traits_type::pointer pointer;
constexpr __normal_iterator() noexcept
: _M_current(_Iterator()) { }
explicit
__normal_iterator(const _Iterator& __i) noexcept
: _M_current(__i) { }
template<typename _Iter>
__normal_iterator(const __normal_iterator<_Iter,
typename __enable_if<
(std::__are_same<_Iter, typename _Container::pointer>::__value),
_Container>::__type>& __i) noexcept
: _M_current(__i.base()) { }
reference
operator*() const noexcept
{ return *_M_current; }
pointer
operator->() const noexcept
{ return _M_current; }
__normal_iterator&
operator++() noexcept
{
++_M_current;
return *this;
}
__normal_iterator
operator++(int) noexcept
{ return __normal_iterator(_M_current++); }
__normal_iterator&
operator--() noexcept
{
--_M_current;
return *this;
}
__normal_iterator
operator--(int) noexcept
{ return __normal_iterator(_M_current--); }
reference
operator[](difference_type __n) const noexcept
{ return _M_current[__n]; }
__normal_iterator&
operator+=(difference_type __n) noexcept
{ _M_current += __n; return *this; }
__normal_iterator
operator+(difference_type __n) const noexcept
{ return __normal_iterator(_M_current + __n); }
__normal_iterator&
operator-=(difference_type __n) noexcept
{ _M_current -= __n; return *this; }
__normal_iterator
operator-(difference_type __n) const noexcept
{ return __normal_iterator(_M_current - __n); }
const _Iterator&
base() const noexcept
{ return _M_current; }
};
# 854 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() == __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() == __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() != __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() != __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() < __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() < __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() > __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() > __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() <= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() <= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
noexcept
{ return __lhs.base() >= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() >= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline auto
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept
-> decltype(__lhs.base() - __rhs.base())
{ return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
inline typename __normal_iterator<_Iterator, _Container>::difference_type
operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
noexcept
{ return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container>
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
__n, const __normal_iterator<_Iterator, _Container>& __i)
noexcept
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
}
namespace std __attribute__ ((__visibility__ ("default")))
{
template<typename _Iterator, typename _Container>
_Iterator
__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it)
{ return __it.base(); }
}
namespace std __attribute__ ((__visibility__ ("default")))
{
# 1006 "/usr/include/c++/6/bits/stl_iterator.h" 3
template<typename _Iterator>
class move_iterator
{
protected:
_Iterator _M_current;
typedef iterator_traits<_Iterator> __traits_type;
typedef typename __traits_type::reference __base_ref;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
typedef _Iterator pointer;
typedef typename conditional<is_reference<__base_ref>::value,
typename remove_reference<__base_ref>::type&&,
__base_ref>::type reference;
move_iterator()
: _M_current() { }
explicit
move_iterator(iterator_type __i)
: _M_current(__i) { }
template<typename _Iter>
move_iterator(const move_iterator<_Iter>& __i)
: _M_current(__i.base()) { }
iterator_type
base() const
{ return _M_current; }
reference
operator*() const
{ return static_cast<reference>(*_M_current); }
pointer
operator->() const
{ return _M_current; }
move_iterator&
operator++()
{
++_M_current;
return *this;
}
move_iterator
operator++(int)
{
move_iterator __tmp = *this;
++_M_current;
return __tmp;
}
move_iterator&
operator--()
{
--_M_current;
return *this;
}
move_iterator
operator--(int)
{
move_iterator __tmp = *this;
--_M_current;
return __tmp;
}
move_iterator
operator+(difference_type __n) const
{ return move_iterator(_M_current + __n); }
move_iterator&
operator+=(difference_type __n)
{
_M_current += __n;
return *this;
}
move_iterator
operator-(difference_type __n) const
{ return move_iterator(_M_current - __n); }
move_iterator&
operator-=(difference_type __n)
{
_M_current -= __n;
return *this;
}
reference
operator[](difference_type __n) const
{ return std::move(_M_current[__n]); }
};
template<typename _IteratorL, typename _IteratorR>
inline bool
operator==(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
inline bool
operator==(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator!=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
inline bool
operator!=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __x.base() < __y.base(); }
template<typename _Iterator>
inline bool
operator<(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __x.base() < __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
inline bool
operator<=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __y < __x; }
template<typename _Iterator>
inline bool
operator>(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline bool
operator>=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__x < __y); }
template<typename _IteratorL, typename _IteratorR>
inline auto
operator-(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
-> decltype(__x.base() - __y.base())
{ return __x.base() - __y.base(); }
template<typename _Iterator>
inline auto
operator-(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
-> decltype(__x.base() - __y.base())
{ return __x.base() - __y.base(); }
template<typename _Iterator>
inline move_iterator<_Iterator>
operator+(typename move_iterator<_Iterator>::difference_type __n,
const move_iterator<_Iterator>& __x)
{ return __x + __n; }
template<typename _Iterator>
inline move_iterator<_Iterator>
make_move_iterator(_Iterator __i)
{ return move_iterator<_Iterator>(__i); }
template<typename _Iterator, typename _ReturnType
= typename conditional<__move_if_noexcept_cond
<typename iterator_traits<_Iterator>::value_type>::value,
_Iterator, move_iterator<_Iterator>>::type>
inline _ReturnType
__make_move_if_noexcept_iterator(_Iterator __i)
{ return _ReturnType(__i); }
template<typename _Tp, typename _ReturnType
= typename conditional<__move_if_noexcept_cond<_Tp>::value,
const _Tp*, move_iterator<_Tp*>>::type>
inline _ReturnType
__make_move_if_noexcept_iterator(_Tp* __i)
{ return _ReturnType(__i); }
template<typename _Iterator>
auto
__niter_base(move_iterator<_Iterator> __it)
-> decltype(make_move_iterator(__niter_base(__it.base())))
{ return make_move_iterator(__niter_base(__it.base())); }
template<typename _Iterator>
struct __is_move_iterator<move_iterator<_Iterator> >
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Iterator>
auto
__miter_base(move_iterator<_Iterator> __it)
-> decltype(__miter_base(__it.base()))
{ return __miter_base(__it.base()); }
}
# 68 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/debug/debug.h" 1 3
# 48 "/usr/include/c++/6/debug/debug.h" 3
namespace std
{
namespace __debug { }
}
namespace __gnu_debug
{
using namespace std::__debug;
}
# 70 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/6/bits/predefined_ops.h" 1 3
# 33 "/usr/include/c++/6/bits/predefined_ops.h" 3
namespace __gnu_cxx
{
namespace __ops
{
struct _Iter_less_iter
{
template<typename _Iterator1, typename _Iterator2>
constexpr
bool
operator()(_Iterator1 __it1, _Iterator2 __it2) const
{ return *__it1 < *__it2; }
};
constexpr
inline _Iter_less_iter
__iter_less_iter()
{ return _Iter_less_iter(); }
struct _Iter_less_val
{
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val) const
{ return *__it < __val; }
};
inline _Iter_less_val
__iter_less_val()
{ return _Iter_less_val(); }
inline _Iter_less_val
__iter_comp_val(_Iter_less_iter)
{ return _Iter_less_val(); }
struct _Val_less_iter
{
template<typename _Value, typename _Iterator>
bool
operator()(_Value& __val, _Iterator __it) const
{ return __val < *__it; }
};
inline _Val_less_iter
__val_less_iter()
{ return _Val_less_iter(); }
inline _Val_less_iter
__val_comp_iter(_Iter_less_iter)
{ return _Val_less_iter(); }
struct _Iter_equal_to_iter
{
template<typename _Iterator1, typename _Iterator2>
bool
operator()(_Iterator1 __it1, _Iterator2 __it2) const
{ return *__it1 == *__it2; }
};
inline _Iter_equal_to_iter
__iter_equal_to_iter()
{ return _Iter_equal_to_iter(); }
struct _Iter_equal_to_val
{
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val) const
{ return *__it == __val; }
};
inline _Iter_equal_to_val
__iter_equal_to_val()
{ return _Iter_equal_to_val(); }
inline _Iter_equal_to_val
__iter_comp_val(_Iter_equal_to_iter)
{ return _Iter_equal_to_val(); }
template<typename _Compare>
struct _Iter_comp_iter
{
_Compare _M_comp;
explicit constexpr
_Iter_comp_iter(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Iterator1, typename _Iterator2>
constexpr
bool
operator()(_Iterator1 __it1, _Iterator2 __it2)
{ return bool(_M_comp(*__it1, *__it2)); }
};
template<typename _Compare>
constexpr
inline _Iter_comp_iter<_Compare>
__iter_comp_iter(_Compare __comp)
{ return _Iter_comp_iter<_Compare>(__comp); }
template<typename _Compare>
struct _Iter_comp_val
{
_Compare _M_comp;
explicit
_Iter_comp_val(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val)
{ return bool(_M_comp(*__it, __val)); }
};
template<typename _Compare>
inline _Iter_comp_val<_Compare>
__iter_comp_val(_Compare __comp)
{ return _Iter_comp_val<_Compare>(__comp); }
template<typename _Compare>
inline _Iter_comp_val<_Compare>
__iter_comp_val(_Iter_comp_iter<_Compare> __comp)
{ return _Iter_comp_val<_Compare>(__comp._M_comp); }
template<typename _Compare>
struct _Val_comp_iter
{
_Compare _M_comp;
explicit
_Val_comp_iter(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Value, typename _Iterator>
bool
operator()(_Value& __val, _Iterator __it)
{ return bool(_M_comp(__val, *__it)); }
};
template<typename _Compare>
inline _Val_comp_iter<_Compare>
__val_comp_iter(_Compare __comp)
{ return _Val_comp_iter<_Compare>(__comp); }
template<typename _Compare>
inline _Val_comp_iter<_Compare>
__val_comp_iter(_Iter_comp_iter<_Compare> __comp)
{ return _Val_comp_iter<_Compare>(__comp._M_comp); }
template<typename _Value>
struct _Iter_equals_val
{
_Value& _M_value;
explicit
_Iter_equals_val(_Value& __value)
: _M_value(__value)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return *__it == _M_value; }
};
template<typename _Value>
inline _Iter_equals_val<_Value>
__iter_equals_val(_Value& __val)
{ return _Iter_equals_val<_Value>(__val); }
template<typename _Iterator1>
struct _Iter_equals_iter
{
_Iterator1 _M_it1;
explicit
_Iter_equals_iter(_Iterator1 __it1)
: _M_it1(__it1)
{ }
template<typename _Iterator2>
bool
operator()(_Iterator2 __it2)
{ return *__it2 == *_M_it1; }
};
template<typename _Iterator>
inline _Iter_equals_iter<_Iterator>
__iter_comp_iter(_Iter_equal_to_iter, _Iterator __it)
{ return _Iter_equals_iter<_Iterator>(__it); }
template<typename _Predicate>
struct _Iter_pred
{
_Predicate _M_pred;
explicit
_Iter_pred(_Predicate __pred)
: _M_pred(__pred)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return bool(_M_pred(*__it)); }
};
template<typename _Predicate>
inline _Iter_pred<_Predicate>
__pred_iter(_Predicate __pred)
{ return _Iter_pred<_Predicate>(__pred); }
template<typename _Compare, typename _Value>
struct _Iter_comp_to_val
{
_Compare _M_comp;
_Value& _M_value;
_Iter_comp_to_val(_Compare __comp, _Value& __value)
: _M_comp(__comp), _M_value(__value)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return bool(_M_comp(*__it, _M_value)); }
};
template<typename _Compare, typename _Value>
_Iter_comp_to_val<_Compare, _Value>
__iter_comp_val(_Compare __comp, _Value &__val)
{ return _Iter_comp_to_val<_Compare, _Value>(__comp, __val); }
template<typename _Compare, typename _Iterator1>
struct _Iter_comp_to_iter
{
_Compare _M_comp;
_Iterator1 _M_it1;
_Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1)
: _M_comp(__comp), _M_it1(__it1)
{ }
template<typename _Iterator2>
bool
operator()(_Iterator2 __it2)
{ return bool(_M_comp(*__it2, *_M_it1)); }
};
template<typename _Compare, typename _Iterator>
inline _Iter_comp_to_iter<_Compare, _Iterator>
__iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it)
{ return _Iter_comp_to_iter<_Compare, _Iterator>(__comp._M_comp, __it); }
template<typename _Predicate>
struct _Iter_negate
{
_Predicate _M_pred;
explicit
_Iter_negate(_Predicate __pred)
: _M_pred(__pred)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return !bool(_M_pred(*__it)); }
};
template<typename _Predicate>
inline _Iter_negate<_Predicate>
__negate(_Iter_pred<_Predicate> __pred)
{ return _Iter_negate<_Predicate>(__pred._M_pred); }
}
}
# 72 "/usr/include/c++/6/bits/stl_algobase.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 118 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
# 148 "/usr/include/c++/6/bits/stl_algobase.h" 3
swap(*__a, *__b);
}
# 164 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2)
{
;
for (; __first1 != __last1; ++__first1, (void)++__first2)
std::iter_swap(__first1, __first2);
return __first2;
}
# 192 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _Tp>
constexpr
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
if (__b < __a)
return __b;
return __a;
}
# 216 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _Tp>
constexpr
inline const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
if (__a < __b)
return __b;
return __a;
}
# 240 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
constexpr
inline const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
if (__comp(__b, __a))
return __b;
return __a;
}
# 262 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
constexpr
inline const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
if (__comp(__a, __b))
return __b;
return __a;
}
template<typename _Iterator>
inline _Iterator
__niter_base(_Iterator __it)
{ return __it; }
template<bool, bool, typename>
struct __copy_move
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, (void)++__first)
*__result = *__first;
return __result;
}
};
template<typename _Category>
struct __copy_move<true, false, _Category>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, (void)++__first)
*__result = std::move(*__first);
return __result;
}
};
template<>
struct __copy_move<false, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = *__first;
++__first;
++__result;
}
return __result;
}
};
template<>
struct __copy_move<true, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = std::move(*__first);
++__first;
++__result;
}
return __result;
}
};
template<bool _IsMove>
struct __copy_move<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
using __assignable = conditional<_IsMove,
is_move_assignable<_Tp>,
is_copy_assignable<_Tp>>;
static_assert( __assignable::type::value, "type is not assignable" );
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
return __result + _Num;
}
};
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
typedef typename iterator_traits<_II>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueTypeI)
&& __is_pointer<_II>::__value
&& __is_pointer<_OI>::__value
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
return std::__copy_move<_IsMove, __simple,
_Category>::__copy_m(__first, __last, __result);
}
template<typename _CharT>
struct char_traits;
template<typename _CharT, typename _Traits>
class istreambuf_iterator;
template<typename _CharT, typename _Traits>
class ostreambuf_iterator;
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(_CharT*, _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(const _CharT*, const _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a2(_II __first, _II __last, _OI __result)
{
return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
std::__niter_base(__last),
std::__niter_base(__result)));
}
# 444 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II, typename _OI>
inline _OI
copy(_II __first, _II __last, _OI __result)
{
;
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
# 477 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II, typename _OI>
inline _OI
move(_II __first, _II __last, _OI __result)
{
;
return std::__copy_move_a2<true>(std::__miter_base(__first),
std::__miter_base(__last), __result);
}
template<bool, bool, typename>
struct __copy_move_backward
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
};
template<typename _Category>
struct __copy_move_backward<true, false, _Category>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = std::move(*--__last);
return __result;
}
};
template<>
struct __copy_move_backward<false, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
};
template<>
struct __copy_move_backward<true, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = std::move(*--__last);
return __result;
}
};
template<bool _IsMove>
struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
using __assignable = conditional<_IsMove,
is_move_assignable<_Tp>,
is_copy_assignable<_Tp>>;
static_assert( __assignable::type::value, "type is not assignable" );
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename iterator_traits<_BI1>::value_type _ValueType1;
typedef typename iterator_traits<_BI2>::value_type _ValueType2;
typedef typename iterator_traits<_BI1>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueType1)
&& __is_pointer<_BI1>::__value
&& __is_pointer<_BI2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__copy_move_backward<_IsMove, __simple,
_Category>::__copy_move_b(__first,
__last,
__result);
}
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
{
return _BI2(std::__copy_move_backward_a<_IsMove>
(std::__niter_base(__first), std::__niter_base(__last),
std::__niter_base(__result)));
}
# 620 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
;
return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
# 656 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _BI1, typename _BI2>
inline _BI2
move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
;
return std::__copy_move_backward_a2<true>(std::__miter_base(__first),
std::__miter_base(__last),
__result);
}
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
for (; __first != __last; ++__first)
*__first = __value;
}
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
const _Tp __tmp = __value;
for (; __first != __last; ++__first)
*__first = __tmp;
}
template<typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
__fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
{
const _Tp __tmp = __c;
if (const size_t __len = __last - __first)
__builtin_memset(__first, static_cast<unsigned char>(__tmp), __len);
}
# 722 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
inline void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
;
std::__fill_a(std::__niter_base(__first), std::__niter_base(__last),
__value);
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __value;
return __first;
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
const _Tp __tmp = __value;
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __tmp;
return __first;
}
template<typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
__fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
{
std::__fill_a(__first, __first + __n, __c);
return __first + __n;
}
# 782 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _OI, typename _Size, typename _Tp>
inline _OI
fill_n(_OI __first, _Size __n, const _Tp& __value)
{
return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
}
template<bool _BoolType>
struct __equal
{
template<typename _II1, typename _II2>
static bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
for (; __first1 != __last1; ++__first1, (void)++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
};
template<>
struct __equal<true>
{
template<typename _Tp>
static bool
equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
{
if (const size_t __len = (__last1 - __first1))
return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len);
return true;
}
};
template<typename _II1, typename _II2>
inline bool
__equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple = ((__is_integer<_ValueType1>::__value
|| __is_pointer<_ValueType1>::__value)
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
template<typename, typename>
struct __lc_rai
{
template<typename _II1, typename _II2>
static _II1
__newlast1(_II1, _II1 __last1, _II2, _II2)
{ return __last1; }
template<typename _II>
static bool
__cnd2(_II __first, _II __last)
{ return __first != __last; }
};
template<>
struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
{
template<typename _RAI1, typename _RAI2>
static _RAI1
__newlast1(_RAI1 __first1, _RAI1 __last1,
_RAI2 __first2, _RAI2 __last2)
{
const typename iterator_traits<_RAI1>::difference_type
__diff1 = __last1 - __first1;
const typename iterator_traits<_RAI2>::difference_type
__diff2 = __last2 - __first2;
return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
}
template<typename _RAI>
static bool
__cnd2(_RAI, _RAI)
{ return true; }
};
template<typename _II1, typename _II2, typename _Compare>
bool
__lexicographical_compare_impl(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2,
_Compare __comp)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
__last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, (void)++__first2)
{
if (__comp(__first1, __first2))
return true;
if (__comp(__first2, __first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
template<bool _BoolType>
struct __lexicographical_compare
{
template<typename _II1, typename _II2>
static bool __lc(_II1, _II1, _II2, _II2);
};
template<bool _BoolType>
template<typename _II1, typename _II2>
bool
__lexicographical_compare<_BoolType>::
__lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
return std::__lexicographical_compare_impl(__first1, __last1,
__first2, __last2,
__gnu_cxx::__ops::__iter_less_iter());
}
template<>
struct __lexicographical_compare<true>
{
template<typename _Tp, typename _Up>
static bool
__lc(const _Tp* __first1, const _Tp* __last1,
const _Up* __first2, const _Up* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
if (const size_t __len = std::min(__len1, __len2))
if (int __result = __builtin_memcmp(__first1, __first2, __len))
return __result < 0;
return __len1 < __len2;
}
};
template<typename _II1, typename _II2>
inline bool
__lexicographical_compare_aux(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple =
(__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
&& !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
&& !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value);
return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
__first2, __last2);
}
template<typename _ForwardIterator, typename _Tp, typename _Compare>
_ForwardIterator
__lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
_DistanceType __len = std::distance(__first, __last);
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__comp(__middle, __val))
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
# 982 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
inline _ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
;
return std::__lower_bound(__first, __last, __val,
__gnu_cxx::__ops::__iter_less_val());
}
inline constexpr int
__lg(int __n)
{ return sizeof(int) * 8 - 1 - __builtin_clz(__n); }
inline constexpr unsigned
__lg(unsigned __n)
{ return sizeof(int) * 8 - 1 - __builtin_clz(__n); }
inline constexpr long
__lg(long __n)
{ return sizeof(long) * 8 - 1 - __builtin_clzl(__n); }
inline constexpr unsigned long
__lg(unsigned long __n)
{ return sizeof(long) * 8 - 1 - __builtin_clzl(__n); }
inline constexpr long long
__lg(long long __n)
{ return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); }
inline constexpr unsigned long long
__lg(unsigned long long __n)
{ return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); }
# 1039 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
;
return std::__equal_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2));
}
# 1071 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _BinaryPredicate __binary_pred)
{
;
for (; __first1 != __last1; ++__first1, (void)++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return true;
}
# 1104 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
;
;
using _RATag = random_access_iterator_tag;
using _Cat1 = typename iterator_traits<_II1>::iterator_category;
using _Cat2 = typename iterator_traits<_II2>::iterator_category;
using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>;
if (_RAIters())
{
auto __d1 = std::distance(__first1, __last1);
auto __d2 = std::distance(__first2, __last2);
if (__d1 != __d2)
return false;
return std::equal(__first1, __last1, __first2);
}
for (; __first1 != __last1 && __first2 != __last2;
++__first1, (void)++__first2)
if (!(*__first1 == *__first2))
return false;
return __first1 == __last1 && __first2 == __last2;
}
# 1153 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
{
;
;
using _RATag = random_access_iterator_tag;
using _Cat1 = typename iterator_traits<_IIter1>::iterator_category;
using _Cat2 = typename iterator_traits<_IIter2>::iterator_category;
using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>;
if (_RAIters())
{
auto __d1 = std::distance(__first1, __last1);
auto __d2 = std::distance(__first2, __last2);
if (__d1 != __d2)
return false;
return std::equal(__first1, __last1, __first2,
__binary_pred);
}
for (; __first1 != __last1 && __first2 != __last2;
++__first1, (void)++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return __first1 == __last1 && __first2 == __last2;
}
# 1201 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II1, typename _II2>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
;
;
return std::__lexicographical_compare_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2),
std::__niter_base(__last2));
}
# 1237 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _II1, typename _II2, typename _Compare>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2, _Compare __comp)
{
;
;
return std::__lexicographical_compare_impl
(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_comp_iter(__comp));
}
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
__mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
while (__first1 != __last1 && __binary_pred(__first1, __first2))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
# 1280 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{
;
return std::__mismatch(__first1, __last1, __first2,
__gnu_cxx::__ops::__iter_equal_to_iter());
}
# 1313 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
;
return std::__mismatch(__first1, __last1, __first2,
__gnu_cxx::__ops::__iter_comp_iter(__binary_pred));
}
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
__mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __binary_pred)
{
while (__first1 != __last1 && __first2 != __last2
&& __binary_pred(__first1, __first2))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
# 1360 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
;
;
return std::__mismatch(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_equal_to_iter());
}
# 1395 "/usr/include/c++/6/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __binary_pred)
{
;
;
return std::__mismatch(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_comp_iter(__binary_pred));
}
}
# 40 "/usr/include/c++/6/bits/char_traits.h" 2 3
# 1 "/usr/include/c++/6/bits/postypes.h" 1 3
# 38 "/usr/include/c++/6/bits/postypes.h" 3
# 39 "/usr/include/c++/6/bits/postypes.h" 3
# 1 "/usr/include/c++/6/cwchar" 1 3
# 39 "/usr/include/c++/6/cwchar" 3
# 40 "/usr/include/c++/6/cwchar" 3
# 1 "/usr/include/wchar.h" 1 3 4
# 39 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h" 1 3 4
# 40 "/usr/include/wchar.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4
# 42 "/usr/include/wchar.h" 2 3 4
# 51 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 357 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 52 "/usr/include/wchar.h" 2 3 4
# 104 "/usr/include/wchar.h" 3 4
typedef __mbstate_t mbstate_t;
# 132 "/usr/include/wchar.h" 3 4
extern "C" {
struct tm;
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern wchar_t *wcscat (wchar_t *__restrict __dest,
const wchar_t *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern wchar_t *wcsncat (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw ();
extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
size_t __n) throw ();
extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
__locale_t __loc) throw ();
extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
size_t __n, __locale_t __loc) throw ();
extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw ();
extern size_t wcsxfrm (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n) throw ();
extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2,
__locale_t __loc) throw ();
extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
size_t __n, __locale_t __loc) throw ();
extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__));
extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc)
throw () __asm ("wcschr") __attribute__ ((__pure__));
extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
throw () __asm ("wcschr") __attribute__ ((__pure__));
extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc)
throw () __asm ("wcsrchr") __attribute__ ((__pure__));
extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
throw () __asm ("wcsrchr") __attribute__ ((__pure__));
extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc)
throw () __attribute__ ((__pure__));
extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
throw () __attribute__ ((__pure__));
extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept)
throw () __attribute__ ((__pure__));
extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept)
throw () __asm ("wcspbrk") __attribute__ ((__pure__));
extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs,
const wchar_t *__accept)
throw () __asm ("wcspbrk") __attribute__ ((__pure__));
extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle)
throw () __asm ("wcsstr") __attribute__ ((__pure__));
extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack,
const wchar_t *__needle)
throw () __asm ("wcsstr") __attribute__ ((__pure__));
extern wchar_t *wcstok (wchar_t *__restrict __s,
const wchar_t *__restrict __delim,
wchar_t **__restrict __ptr) throw ();
extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__));
extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle)
throw () __asm ("wcswcs") __attribute__ ((__pure__));
extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack,
const wchar_t *__needle)
throw () __asm ("wcswcs") __attribute__ ((__pure__));
# 309 "/usr/include/wchar.h" 3 4
extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
throw () __attribute__ ((__pure__));
extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n)
throw () __asm ("wmemchr") __attribute__ ((__pure__));
extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c,
size_t __n)
throw () __asm ("wmemchr") __attribute__ ((__pure__));
extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n) throw ();
extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
throw ();
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ();
extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n)
throw ();
extern wint_t btowc (int __c) throw ();
extern int wctob (wint_t __c) throw ();
extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__));
extern size_t mbrtowc (wchar_t *__restrict __pwc,
const char *__restrict __s, size_t __n,
mbstate_t *__restrict __p) throw ();
extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
mbstate_t *__restrict __ps) throw ();
extern size_t __mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) throw ();
extern size_t mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) throw ();
# 408 "/usr/include/wchar.h" 3 4
extern size_t mbsrtowcs (wchar_t *__restrict __dst,
const char **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern size_t wcsrtombs (char *__restrict __dst,
const wchar_t **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
const char **__restrict __src, size_t __nmc,
size_t __len, mbstate_t *__restrict __ps) throw ();
extern size_t wcsnrtombs (char *__restrict __dst,
const wchar_t **__restrict __src,
size_t __nwc, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern int wcwidth (wchar_t __c) throw ();
extern int wcswidth (const wchar_t *__s, size_t __n) throw ();
extern double wcstod (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern float wcstof (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern long double wcstold (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern long int wcstol (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base) throw ();
extern unsigned long int wcstoul (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern long long int wcstoll (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ();
__extension__
extern long long int wcstoq (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ();
# 533 "/usr/include/wchar.h" 3 4
extern long int wcstol_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base,
__locale_t __loc) throw ();
extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) throw ();
__extension__
extern long long int wcstoll_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) throw ();
__extension__
extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc)
throw ();
extern double wcstod_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
throw ();
extern float wcstof_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
throw ();
extern long double wcstold_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
__locale_t __loc) throw ();
extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src) throw ();
extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
throw ();
extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw ();
extern int fwide (__FILE *__fp, int __mode) throw ();
extern int fwprintf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...)
;
extern int wprintf (const wchar_t *__restrict __format, ...)
;
extern int swprintf (wchar_t *__restrict __s, size_t __n,
const wchar_t *__restrict __format, ...)
throw () ;
extern int vfwprintf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
;
extern int vwprintf (const wchar_t *__restrict __format,
__gnuc_va_list __arg)
;
extern int vswprintf (wchar_t *__restrict __s, size_t __n,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int fwscanf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...)
;
extern int wscanf (const wchar_t *__restrict __format, ...)
;
extern int swscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format, ...)
throw () ;
# 683 "/usr/include/wchar.h" 3 4
extern int vfwscanf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
;
extern int vwscanf (const wchar_t *__restrict __format,
__gnuc_va_list __arg)
;
extern int vswscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
# 739 "/usr/include/wchar.h" 3 4
extern wint_t fgetwc (__FILE *__stream);
extern wint_t getwc (__FILE *__stream);
extern wint_t getwchar (void);
extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
extern wint_t putwc (wchar_t __wc, __FILE *__stream);
extern wint_t putwchar (wchar_t __wc);
extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream);
extern int fputws (const wchar_t *__restrict __ws,
__FILE *__restrict __stream);
extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
# 804 "/usr/include/wchar.h" 3 4
extern wint_t getwc_unlocked (__FILE *__stream);
extern wint_t getwchar_unlocked (void);
extern wint_t fgetwc_unlocked (__FILE *__stream);
extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
# 830 "/usr/include/wchar.h" 3 4
extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
extern wint_t putwchar_unlocked (wchar_t __wc);
# 840 "/usr/include/wchar.h" 3 4
extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream);
extern int fputws_unlocked (const wchar_t *__restrict __ws,
__FILE *__restrict __stream);
extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp) throw ();
extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp,
__locale_t __loc) throw ();
# 894 "/usr/include/wchar.h" 3 4
}
# 45 "/usr/include/c++/6/cwchar" 2 3
# 62 "/usr/include/c++/6/cwchar" 3
namespace std
{
using ::mbstate_t;
}
# 135 "/usr/include/c++/6/cwchar" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
using ::wint_t;
using ::btowc;
using ::fgetwc;
using ::fgetws;
using ::fputwc;
using ::fputws;
using ::fwide;
using ::fwprintf;
using ::fwscanf;
using ::getwc;
using ::getwchar;
using ::mbrlen;
using ::mbrtowc;
using ::mbsinit;
using ::mbsrtowcs;
using ::putwc;
using ::putwchar;
using ::swprintf;
using ::swscanf;
using ::ungetwc;
using ::vfwprintf;
using ::vfwscanf;
using ::vswprintf;
using ::vswscanf;
using ::vwprintf;
using ::vwscanf;
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
using ::wcsftime;
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
using ::wcsncpy;
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
using ::wcstof;
using ::wcstok;
using ::wcstol;
using ::wcstoul;
using ::wcsxfrm;
using ::wctob;
using ::wmemcmp;
using ::wmemcpy;
using ::wmemmove;
using ::wmemset;
using ::wprintf;
using ::wscanf;
using ::wcschr;
using ::wcspbrk;
using ::wcsrchr;
using ::wcsstr;
using ::wmemchr;
# 232 "/usr/include/c++/6/cwchar" 3
}
namespace __gnu_cxx
{
using ::wcstold;
# 257 "/usr/include/c++/6/cwchar" 3
using ::wcstoll;
using ::wcstoull;
}
namespace std
{
using ::__gnu_cxx::wcstold;
using ::__gnu_cxx::wcstoll;
using ::__gnu_cxx::wcstoull;
}
# 277 "/usr/include/c++/6/cwchar" 3
namespace std
{
using std::wcstof;
using std::vfwscanf;
using std::vswscanf;
using std::vwscanf;
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
}
# 41 "/usr/include/c++/6/bits/postypes.h" 2 3
# 68 "/usr/include/c++/6/bits/postypes.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 88 "/usr/include/c++/6/bits/postypes.h" 3
typedef long streamoff;
# 98 "/usr/include/c++/6/bits/postypes.h" 3
typedef ptrdiff_t streamsize;
# 111 "/usr/include/c++/6/bits/postypes.h" 3
template<typename _StateT>
class fpos
{
private:
streamoff _M_off;
_StateT _M_state;
public:
fpos()
: _M_off(0), _M_state() { }
# 133 "/usr/include/c++/6/bits/postypes.h" 3
fpos(streamoff __off)
: _M_off(__off), _M_state() { }
operator streamoff() const { return _M_off; }
void
state(_StateT __st)
{ _M_state = __st; }
_StateT
state() const
{ return _M_state; }
fpos&
operator+=(streamoff __off)
{
_M_off += __off;
return *this;
}
fpos&
operator-=(streamoff __off)
{
_M_off -= __off;
return *this;
}
fpos
operator+(streamoff __off) const
{
fpos __pos(*this);
__pos += __off;
return __pos;
}
fpos
operator-(streamoff __off) const
{
fpos __pos(*this);
__pos -= __off;
return __pos;
}
streamoff
operator-(const fpos& __other) const
{ return _M_off - __other._M_off; }
};
template<typename _StateT>
inline bool
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) == streamoff(__rhs); }
template<typename _StateT>
inline bool
operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) != streamoff(__rhs); }
typedef fpos<mbstate_t> streampos;
typedef fpos<mbstate_t> wstreampos;
typedef fpos<mbstate_t> u16streampos;
typedef fpos<mbstate_t> u32streampos;
}
# 41 "/usr/include/c++/6/bits/char_traits.h" 2 3
# 1 "/usr/include/c++/6/cwchar" 1 3
# 39 "/usr/include/c++/6/cwchar" 3
# 40 "/usr/include/c++/6/cwchar" 3
# 1 "/usr/include/wchar.h" 1 3 4
# 45 "/usr/include/c++/6/cwchar" 2 3
# 42 "/usr/include/c++/6/bits/char_traits.h" 2 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
# 57 "/usr/include/c++/6/bits/char_traits.h" 3
template<typename _CharT>
struct _Char_types
{
typedef unsigned long int_type;
typedef std::streampos pos_type;
typedef std::streamoff off_type;
typedef std::mbstate_t state_type;
};
# 82 "/usr/include/c++/6/bits/char_traits.h" 3
template<typename _CharT>
struct char_traits
{
typedef _CharT char_type;
typedef typename _Char_types<_CharT>::int_type int_type;
typedef typename _Char_types<_CharT>::pos_type pos_type;
typedef typename _Char_types<_CharT>::off_type off_type;
typedef typename _Char_types<_CharT>::state_type state_type;
static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
static constexpr bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
static constexpr bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
static int
compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
static std::size_t
length(const char_type* __s);
static const char_type*
find(const char_type* __s, std::size_t __n, const char_type& __a);
static char_type*
move(char_type* __s1, const char_type* __s2, std::size_t __n);
static char_type*
copy(char_type* __s1, const char_type* __s2, std::size_t __n);
static char_type*
assign(char_type* __s, std::size_t __n, char_type __a);
static constexpr char_type
to_char_type(const int_type& __c)
{ return static_cast<char_type>(__c); }
static constexpr int_type
to_int_type(const char_type& __c)
{ return static_cast<int_type>(__c); }
static constexpr bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static constexpr int_type
eof()
{ return static_cast<int_type>(-1); }
static constexpr int_type
not_eof(const int_type& __c)
{ return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
};
template<typename _CharT>
int
char_traits<_CharT>::
compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
{
for (std::size_t __i = 0; __i < __n; ++__i)
if (lt(__s1[__i], __s2[__i]))
return -1;
else if (lt(__s2[__i], __s1[__i]))
return 1;
return 0;
}
template<typename _CharT>
std::size_t
char_traits<_CharT>::
length(const char_type* __p)
{
std::size_t __i = 0;
while (!eq(__p[__i], char_type()))
++__i;
return __i;
}
template<typename _CharT>
const typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
find(const char_type* __s, std::size_t __n, const char_type& __a)
{
for (std::size_t __i = 0; __i < __n; ++__i)
if (eq(__s[__i], __a))
return __s + __i;
return 0;
}
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
move(char_type* __s1, const char_type* __s2, std::size_t __n)
{
return static_cast<_CharT*>(__builtin_memmove(__s1, __s2,
__n * sizeof(char_type)));
}
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
copy(char_type* __s1, const char_type* __s2, std::size_t __n)
{
std::copy(__s2, __s2 + __n, __s1);
return __s1;
}
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
assign(char_type* __s, std::size_t __n, char_type __a)
{
std::fill_n(__s, __n, __a);
return __s;
}
}
namespace std __attribute__ ((__visibility__ ("default")))
{
# 226 "/usr/include/c++/6/bits/char_traits.h" 3
template<class _CharT>
struct char_traits : public __gnu_cxx::char_traits<_CharT>
{ };
template<>
struct char_traits<char>
{
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2) noexcept
{ __c1 = __c2; }
static constexpr bool
eq(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr bool
lt(const char_type& __c1, const char_type& __c2) noexcept
{
return (static_cast<unsigned char>(__c1)
< static_cast<unsigned char>(__c2));
}
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return 0;
return __builtin_memcmp(__s1, __s2, __n);
}
static size_t
length(const char_type* __s)
{ return __builtin_strlen(__s); }
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{
if (__n == 0)
return 0;
return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
}
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n));
}
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
}
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
if (__n == 0)
return __s;
return static_cast<char_type*>(__builtin_memset(__s, __a, __n));
}
static constexpr char_type
to_char_type(const int_type& __c) noexcept
{ return static_cast<char_type>(__c); }
static constexpr int_type
to_int_type(const char_type& __c) noexcept
{ return static_cast<int_type>(static_cast<unsigned char>(__c)); }
static constexpr bool
eq_int_type(const int_type& __c1, const int_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr int_type
eof() noexcept
{ return static_cast<int_type>(-1); }
static constexpr int_type
not_eof(const int_type& __c) noexcept
{ return (__c == eof()) ? 0 : __c; }
};
template<>
struct char_traits<wchar_t>
{
typedef wchar_t char_type;
typedef wint_t int_type;
typedef streamoff off_type;
typedef wstreampos pos_type;
typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2) noexcept
{ __c1 = __c2; }
static constexpr bool
eq(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr bool
lt(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 < __c2; }
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return 0;
return wmemcmp(__s1, __s2, __n);
}
static size_t
length(const char_type* __s)
{ return wcslen(__s); }
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{
if (__n == 0)
return 0;
return wmemchr(__s, __a, __n);
}
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return wmemmove(__s1, __s2, __n);
}
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return wmemcpy(__s1, __s2, __n);
}
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
if (__n == 0)
return __s;
return wmemset(__s, __a, __n);
}
static constexpr char_type
to_char_type(const int_type& __c) noexcept
{ return char_type(__c); }
static constexpr int_type
to_int_type(const char_type& __c) noexcept
{ return int_type(__c); }
static constexpr bool
eq_int_type(const int_type& __c1, const int_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr int_type
eof() noexcept
{ return static_cast<int_type>((0xffffffffu)); }
static constexpr int_type
not_eof(const int_type& __c) noexcept
{ return eq_int_type(__c, eof()) ? 0 : __c; }
};
}
# 1 "/usr/include/c++/6/cstdint" 1 3
# 32 "/usr/include/c++/6/cstdint" 3
# 33 "/usr/include/c++/6/cstdint" 3
# 41 "/usr/include/c++/6/cstdint" 3
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h" 1 3 4
# 9 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h" 3 4
# 1 "/usr/include/stdint.h" 1 3 4
# 27 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 28 "/usr/include/stdint.h" 2 3 4
# 48 "/usr/include/stdint.h" 3 4
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
# 65 "/usr/include/stdint.h" 3 4
typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;
typedef long int int_least64_t;
typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;
typedef unsigned long int uint_least64_t;
# 90 "/usr/include/stdint.h" 3 4
typedef signed char int_fast8_t;
typedef long int int_fast16_t;
typedef long int int_fast32_t;
typedef long int int_fast64_t;
# 103 "/usr/include/stdint.h" 3 4
typedef unsigned char uint_fast8_t;
typedef unsigned long int uint_fast16_t;
typedef unsigned long int uint_fast32_t;
typedef unsigned long int uint_fast64_t;
# 122 "/usr/include/stdint.h" 3 4
typedef unsigned long int uintptr_t;
# 134 "/usr/include/stdint.h" 3 4
typedef long int intmax_t;
typedef unsigned long int uintmax_t;
# 10 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h" 2 3 4
# 42 "/usr/include/c++/6/cstdint" 2 3
namespace std
{
using ::int8_t;
using ::int16_t;
using ::int32_t;
using ::int64_t;
using ::int_fast8_t;
using ::int_fast16_t;
using ::int_fast32_t;
using ::int_fast64_t;
using ::int_least8_t;
using ::int_least16_t;
using ::int_least32_t;
using ::int_least64_t;
using ::intmax_t;
using ::intptr_t;
using ::uint8_t;
using ::uint16_t;
using ::uint32_t;
using ::uint64_t;
using ::uint_fast8_t;
using ::uint_fast16_t;
using ::uint_fast32_t;
using ::uint_fast64_t;
using ::uint_least8_t;
using ::uint_least16_t;
using ::uint_least32_t;
using ::uint_least64_t;
using ::uintmax_t;
using ::uintptr_t;
}
# 421 "/usr/include/c++/6/bits/char_traits.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<>
struct char_traits<char16_t>
{
typedef char16_t char_type;
typedef uint_least16_t int_type;
typedef streamoff off_type;
typedef u16streampos pos_type;
typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2) noexcept
{ __c1 = __c2; }
static constexpr bool
eq(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr bool
lt(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 < __c2; }
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{
for (size_t __i = 0; __i < __n; ++__i)
if (lt(__s1[__i], __s2[__i]))
return -1;
else if (lt(__s2[__i], __s1[__i]))
return 1;
return 0;
}
static size_t
length(const char_type* __s)
{
size_t __i = 0;
while (!eq(__s[__i], char_type()))
++__i;
return __i;
}
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{
for (size_t __i = 0; __i < __n; ++__i)
if (eq(__s[__i], __a))
return __s + __i;
return 0;
}
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return (static_cast<char_type*>
(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
}
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return (static_cast<char_type*>
(__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
}
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
for (size_t __i = 0; __i < __n; ++__i)
assign(__s[__i], __a);
return __s;
}
static constexpr char_type
to_char_type(const int_type& __c) noexcept
{ return char_type(__c); }
static constexpr int_type
to_int_type(const char_type& __c) noexcept
{ return int_type(__c); }
static constexpr bool
eq_int_type(const int_type& __c1, const int_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr int_type
eof() noexcept
{ return static_cast<int_type>(-1); }
static constexpr int_type
not_eof(const int_type& __c) noexcept
{ return eq_int_type(__c, eof()) ? 0 : __c; }
};
template<>
struct char_traits<char32_t>
{
typedef char32_t char_type;
typedef uint_least32_t int_type;
typedef streamoff off_type;
typedef u32streampos pos_type;
typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2) noexcept
{ __c1 = __c2; }
static constexpr bool
eq(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr bool
lt(const char_type& __c1, const char_type& __c2) noexcept
{ return __c1 < __c2; }
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{
for (size_t __i = 0; __i < __n; ++__i)
if (lt(__s1[__i], __s2[__i]))
return -1;
else if (lt(__s2[__i], __s1[__i]))
return 1;
return 0;
}
static size_t
length(const char_type* __s)
{
size_t __i = 0;
while (!eq(__s[__i], char_type()))
++__i;
return __i;
}
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{
for (size_t __i = 0; __i < __n; ++__i)
if (eq(__s[__i], __a))
return __s + __i;
return 0;
}
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return (static_cast<char_type*>
(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
}
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{
if (__n == 0)
return __s1;
return (static_cast<char_type*>
(__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
}
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
for (size_t __i = 0; __i < __n; ++__i)
assign(__s[__i], __a);
return __s;
}
static constexpr char_type
to_char_type(const int_type& __c) noexcept
{ return char_type(__c); }
static constexpr int_type
to_int_type(const char_type& __c) noexcept
{ return int_type(__c); }
static constexpr bool
eq_int_type(const int_type& __c1, const int_type& __c2) noexcept
{ return __c1 == __c2; }
static constexpr int_type
eof() noexcept
{ return static_cast<int_type>(-1); }
static constexpr int_type
not_eof(const int_type& __c) noexcept
{ return eq_int_type(__c, eof()) ? 0 : __c; }
};
}
# 41 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/allocator.h" 1 3
# 46 "/usr/include/c++/6/bits/allocator.h" 3
# 1 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++allocator.h" 1 3
# 33 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++allocator.h" 3
# 1 "/usr/include/c++/6/ext/new_allocator.h" 1 3
# 33 "/usr/include/c++/6/ext/new_allocator.h" 3
# 1 "/usr/include/c++/6/new" 1 3
# 37 "/usr/include/c++/6/new" 3
# 38 "/usr/include/c++/6/new" 3
# 1 "/usr/include/c++/6/exception" 1 3
# 33 "/usr/include/c++/6/exception" 3
# 34 "/usr/include/c++/6/exception" 3
#pragma GCC visibility push(default)
# 1 "/usr/include/c++/6/bits/atomic_lockfree_defines.h" 1 3
# 33 "/usr/include/c++/6/bits/atomic_lockfree_defines.h" 3
# 34 "/usr/include/c++/6/bits/atomic_lockfree_defines.h" 3
# 39 "/usr/include/c++/6/exception" 2 3
extern "C++" {
namespace std
{
# 60 "/usr/include/c++/6/exception" 3
class exception
{
public:
exception() noexcept { }
virtual ~exception() noexcept;
virtual const char*
what() const noexcept;
};
class bad_exception : public exception
{
public:
bad_exception() noexcept { }
virtual ~bad_exception() noexcept;
virtual const char*
what() const noexcept;
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) noexcept;
terminate_handler get_terminate() noexcept;
void terminate() noexcept __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) noexcept;
unexpected_handler get_unexpected() noexcept;
void unexpected() __attribute__ ((__noreturn__));
# 129 "/usr/include/c++/6/exception" 3
bool uncaught_exception() noexcept __attribute__ ((__pure__));
# 138 "/usr/include/c++/6/exception" 3
}
namespace __gnu_cxx
{
# 160 "/usr/include/c++/6/exception" 3
void __verbose_terminate_handler();
}
}
#pragma GCC visibility pop
# 1 "/usr/include/c++/6/bits/exception_ptr.h" 1 3
# 34 "/usr/include/c++/6/bits/exception_ptr.h" 3
#pragma GCC visibility push(default)
# 43 "/usr/include/c++/6/bits/exception_ptr.h" 3
extern "C++" {
namespace std
{
class type_info;
namespace __exception_ptr
{
class exception_ptr;
}
using __exception_ptr::exception_ptr;
exception_ptr current_exception() noexcept;
void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
namespace __exception_ptr
{
using std::rethrow_exception;
class exception_ptr
{
void* _M_exception_object;
explicit exception_ptr(void* __e) noexcept;
void _M_addref() noexcept;
void _M_release() noexcept;
void *_M_get() const noexcept __attribute__ ((__pure__));
friend exception_ptr std::current_exception() noexcept;
friend void std::rethrow_exception(exception_ptr);
public:
exception_ptr() noexcept;
exception_ptr(const exception_ptr&) noexcept;
exception_ptr(nullptr_t) noexcept
: _M_exception_object(0)
{ }
exception_ptr(exception_ptr&& __o) noexcept
: _M_exception_object(__o._M_exception_object)
{ __o._M_exception_object = 0; }
# 113 "/usr/include/c++/6/bits/exception_ptr.h" 3
exception_ptr&
operator=(const exception_ptr&) noexcept;
exception_ptr&
operator=(exception_ptr&& __o) noexcept
{
exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
return *this;
}
~exception_ptr() noexcept;
void
swap(exception_ptr&) noexcept;
# 140 "/usr/include/c++/6/bits/exception_ptr.h" 3
explicit operator bool() const
{ return _M_exception_object; }
friend bool
operator==(const exception_ptr&, const exception_ptr&)
noexcept __attribute__ ((__pure__));
const class std::type_info*
__cxa_exception_type() const noexcept
__attribute__ ((__pure__));
};
bool
operator==(const exception_ptr&, const exception_ptr&)
noexcept __attribute__ ((__pure__));
bool
operator!=(const exception_ptr&, const exception_ptr&)
noexcept __attribute__ ((__pure__));
inline void
swap(exception_ptr& __lhs, exception_ptr& __rhs)
{ __lhs.swap(__rhs); }
}
template<typename _Ex>
exception_ptr
make_exception_ptr(_Ex __ex) noexcept
{
try
{
throw __ex;
}
catch(...)
{
return current_exception();
}
}
template<typename _Ex>
exception_ptr
copy_exception(_Ex __ex) noexcept __attribute__ ((__deprecated__));
template<typename _Ex>
exception_ptr
copy_exception(_Ex __ex) noexcept
{ return std::make_exception_ptr<_Ex>(__ex); }
}
}
#pragma GCC visibility pop
# 171 "/usr/include/c++/6/exception" 2 3
# 1 "/usr/include/c++/6/bits/nested_exception.h" 1 3
# 33 "/usr/include/c++/6/bits/nested_exception.h" 3
#pragma GCC visibility push(default)
# 46 "/usr/include/c++/6/bits/nested_exception.h" 3
extern "C++" {
namespace std
{
class nested_exception
{
exception_ptr _M_ptr;
public:
nested_exception() noexcept : _M_ptr(current_exception()) { }
nested_exception(const nested_exception&) noexcept = default;
nested_exception& operator=(const nested_exception&) noexcept = default;
virtual ~nested_exception() noexcept;
[[noreturn]]
void
rethrow_nested() const
{
if (_M_ptr)
rethrow_exception(_M_ptr);
std::terminate();
}
exception_ptr
nested_ptr() const noexcept
{ return _M_ptr; }
};
template<typename _Except>
struct _Nested_exception : public _Except, public nested_exception
{
explicit _Nested_exception(const _Except& __ex)
: _Except(__ex)
{ }
explicit _Nested_exception(_Except&& __ex)
: _Except(static_cast<_Except&&>(__ex))
{ }
};
template<typename _Tp>
inline void
__throw_with_nested_impl(_Tp&& __t, true_type)
{
using _Up = typename remove_reference<_Tp>::type;
throw _Nested_exception<_Up>{std::forward<_Tp>(__t)};
}
template<typename _Tp>
inline void
__throw_with_nested_impl(_Tp&& __t, false_type)
{ throw std::forward<_Tp>(__t); }
template<typename _Tp>
[[noreturn]]
inline void
throw_with_nested(_Tp&& __t)
{
using _Up = typename decay<_Tp>::type;
using _CopyConstructible
= __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>;
static_assert(_CopyConstructible::value,
"throw_with_nested argument must be CopyConstructible");
using __nest = __and_<is_class<_Up>, __bool_constant<!__is_final(_Up)>,
__not_<is_base_of<nested_exception, _Up>>>;
std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{});
}
template<typename _Tp>
using __rethrow_if_nested_cond = typename enable_if<
__and_<is_polymorphic<_Tp>,
__or_<__not_<is_base_of<nested_exception, _Tp>>,
is_convertible<_Tp*, nested_exception*>>>::value
>::type;
template<typename _Ex>
inline __rethrow_if_nested_cond<_Ex>
__rethrow_if_nested_impl(const _Ex* __ptr)
{
if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr))
__ne_ptr->rethrow_nested();
}
inline void
__rethrow_if_nested_impl(const void*)
{ }
template<typename _Ex>
inline void
rethrow_if_nested(const _Ex& __ex)
{ std::__rethrow_if_nested_impl(std::__addressof(__ex)); }
}
}
#pragma GCC visibility pop
# 172 "/usr/include/c++/6/exception" 2 3
# 41 "/usr/include/c++/6/new" 2 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
virtual ~bad_alloc() throw();
virtual const char* what() const throw();
};
class bad_array_new_length : public bad_alloc
{
public:
bad_array_new_length() throw() { };
virtual ~bad_array_new_length() throw();
virtual const char* what() const throw();
};
struct nothrow_t
{
explicit nothrow_t() = default;
};
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler) throw();
new_handler get_new_handler() noexcept;
}
# 116 "/usr/include/c++/6/new" 3
void* operator new(std::size_t)
__attribute__((__externally_visible__));
void* operator new[](std::size_t)
__attribute__((__externally_visible__));
void operator delete(void*) noexcept
__attribute__((__externally_visible__));
void operator delete[](void*) noexcept
__attribute__((__externally_visible__));
void operator delete(void*, std::size_t) noexcept
__attribute__((__externally_visible__));
void operator delete[](void*, std::size_t) noexcept
__attribute__((__externally_visible__));
void* operator new(std::size_t, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
void* operator new[](std::size_t, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
void operator delete(void*, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
void operator delete[](void*, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
void operator delete(void*, std::size_t, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
void operator delete[](void*, std::size_t, const std::nothrow_t&) noexcept
__attribute__((__externally_visible__));
inline void* operator new(std::size_t, void* __p) noexcept
{ return __p; }
inline void* operator new[](std::size_t, void* __p) noexcept
{ return __p; }
inline void operator delete (void*, void*) noexcept { }
inline void operator delete[](void*, void*) noexcept { }
}
#pragma GCC visibility pop
# 34 "/usr/include/c++/6/ext/new_allocator.h" 2 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
using std::size_t;
using std::ptrdiff_t;
# 57 "/usr/include/c++/6/ext/new_allocator.h" 3
template<typename _Tp>
class new_allocator
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef new_allocator<_Tp1> other; };
typedef std::true_type propagate_on_container_move_assignment;
new_allocator() noexcept { }
new_allocator(const new_allocator&) noexcept { }
template<typename _Tp1>
new_allocator(const new_allocator<_Tp1>&) noexcept { }
~new_allocator() noexcept { }
pointer
address(reference __x) const noexcept
{ return std::__addressof(__x); }
const_pointer
address(const_reference __x) const noexcept
{ return std::__addressof(__x); }
pointer
allocate(size_type __n, const void* = 0)
{
if (__n > this->max_size())
std::__throw_bad_alloc();
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
}
void
deallocate(pointer __p, size_type)
{ ::operator delete(__p); }
size_type
max_size() const noexcept
{ return size_t(-1) / sizeof(_Tp); }
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
template<typename _Up>
void
destroy(_Up* __p) { __p->~_Up(); }
# 135 "/usr/include/c++/6/ext/new_allocator.h" 3
};
template<typename _Tp>
inline bool
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return true; }
template<typename _Tp>
inline bool
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return false; }
}
# 34 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++allocator.h" 2 3
namespace std
{
# 47 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++allocator.h" 3
template<typename _Tp>
using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
}
# 47 "/usr/include/c++/6/bits/allocator.h" 2 3
# 57 "/usr/include/c++/6/bits/allocator.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<>
class allocator<void>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
typedef true_type propagate_on_container_move_assignment;
typedef true_type is_always_equal;
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
template<typename _Up>
void
destroy(_Up* __p) { __p->~_Up(); }
};
# 107 "/usr/include/c++/6/bits/allocator.h" 3
template<typename _Tp>
class allocator: public __allocator_base<_Tp>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
typedef true_type propagate_on_container_move_assignment;
typedef true_type is_always_equal;
allocator() throw() { }
allocator(const allocator& __a) throw()
: __allocator_base<_Tp>(__a) { }
template<typename _Tp1>
allocator(const allocator<_Tp1>&) throw() { }
~allocator() throw() { }
};
template<typename _T1, typename _T2>
inline bool
operator==(const allocator<_T1>&, const allocator<_T2>&)
noexcept
{ return true; }
template<typename _Tp>
inline bool
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
noexcept
{ return true; }
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
noexcept
{ return false; }
template<typename _Tp>
inline bool
operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
noexcept
{ return false; }
extern template class allocator<char>;
extern template class allocator<wchar_t>;
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_swap
{ static void _S_do_it(_Alloc&, _Alloc&) noexcept { } };
template<typename _Alloc>
struct __alloc_swap<_Alloc, false>
{
static void
_S_do_it(_Alloc& __one, _Alloc& __two) noexcept
{
if (__one != __two)
swap(__one, __two);
}
};
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_neq
{
static bool
_S_do_it(const _Alloc&, const _Alloc&)
{ return false; }
};
template<typename _Alloc>
struct __alloc_neq<_Alloc, false>
{
static bool
_S_do_it(const _Alloc& __one, const _Alloc& __two)
{ return __one != __two; }
};
template<typename _Tp, bool
= __or_<is_copy_constructible<typename _Tp::value_type>,
is_nothrow_move_constructible<typename _Tp::value_type>>::value>
struct __shrink_to_fit_aux
{ static bool _S_do_it(_Tp&) noexcept { return false; } };
template<typename _Tp>
struct __shrink_to_fit_aux<_Tp, true>
{
static bool
_S_do_it(_Tp& __c) noexcept
{
try
{
_Tp(__make_move_if_noexcept_iterator(__c.begin()),
__make_move_if_noexcept_iterator(__c.end()),
__c.get_allocator()).swap(__c);
return true;
}
catch(...)
{ return false; }
}
};
}
# 42 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/localefwd.h" 1 3
# 37 "/usr/include/c++/6/bits/localefwd.h" 3
# 38 "/usr/include/c++/6/bits/localefwd.h" 3
# 1 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++locale.h" 1 3
# 39 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++locale.h" 3
# 40 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++locale.h" 3
# 1 "/usr/include/c++/6/clocale" 1 3
# 39 "/usr/include/c++/6/clocale" 3
# 40 "/usr/include/c++/6/clocale" 3
# 1 "/usr/include/locale.h" 1 3 4
# 28 "/usr/include/locale.h" 3 4
# 1 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" 1 3 4
# 29 "/usr/include/locale.h" 2 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/locale.h" 1 3 4
# 30 "/usr/include/locale.h" 2 3 4
extern "C" {
# 50 "/usr/include/locale.h" 3 4
struct lconv
{
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_n_cs_precedes;
char int_n_sep_by_space;
char int_p_sign_posn;
char int_n_sign_posn;
# 120 "/usr/include/locale.h" 3 4
};
extern char *setlocale (int __category, const char *__locale) throw ();
extern struct lconv *localeconv (void) throw ();
# 151 "/usr/include/locale.h" 3 4
extern __locale_t newlocale (int __category_mask, const char *__locale,
__locale_t __base) throw ();
# 186 "/usr/include/locale.h" 3 4
extern __locale_t duplocale (__locale_t __dataset) throw ();
extern void freelocale (__locale_t __dataset) throw ();
extern __locale_t uselocale (__locale_t __dataset) throw ();
}
# 43 "/usr/include/c++/6/clocale" 2 3
# 51 "/usr/include/c++/6/clocale" 3
namespace std
{
using ::lconv;
using ::setlocale;
using ::localeconv;
}
# 42 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++locale.h" 2 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
extern "C" __typeof(uselocale) __uselocale;
}
namespace std __attribute__ ((__visibility__ ("default")))
{
typedef __locale_t __c_locale;
inline int
__convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
char* __out,
const int __size __attribute__ ((__unused__)),
const char* __fmt, ...)
{
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
# 88 "/usr/include/x86_64-linux-gnu/c++/6/bits/c++locale.h" 3
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
__builtin_va_end(__args);
__gnu_cxx::__uselocale(__old);
return __ret;
}
}
# 41 "/usr/include/c++/6/bits/localefwd.h" 2 3
# 1 "/usr/include/c++/6/iosfwd" 1 3
# 36 "/usr/include/c++/6/iosfwd" 3
# 37 "/usr/include/c++/6/iosfwd" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 74 "/usr/include/c++/6/iosfwd" 3
class ios_base;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_streambuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_istream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ostream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_iostream;
namespace __cxx11 {
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringbuf;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_istringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_ostringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringstream;
}
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_filebuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ifstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ofstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_fstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
typedef basic_ios<char> ios;
typedef basic_streambuf<char> streambuf;
typedef basic_istream<char> istream;
typedef basic_ostream<char> ostream;
typedef basic_iostream<char> iostream;
typedef basic_stringbuf<char> stringbuf;
typedef basic_istringstream<char> istringstream;
typedef basic_ostringstream<char> ostringstream;
typedef basic_stringstream<char> stringstream;
typedef basic_filebuf<char> filebuf;
typedef basic_ifstream<char> ifstream;
typedef basic_ofstream<char> ofstream;
typedef basic_fstream<char> fstream;
typedef basic_ios<wchar_t> wios;
typedef basic_streambuf<wchar_t> wstreambuf;
typedef basic_istream<wchar_t> wistream;
typedef basic_ostream<wchar_t> wostream;
typedef basic_iostream<wchar_t> wiostream;
typedef basic_stringbuf<wchar_t> wstringbuf;
typedef basic_istringstream<wchar_t> wistringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
typedef basic_stringstream<wchar_t> wstringstream;
typedef basic_filebuf<wchar_t> wfilebuf;
typedef basic_ifstream<wchar_t> wifstream;
typedef basic_ofstream<wchar_t> wofstream;
typedef basic_fstream<wchar_t> wfstream;
}
# 42 "/usr/include/c++/6/bits/localefwd.h" 2 3
# 1 "/usr/include/c++/6/cctype" 1 3
# 39 "/usr/include/c++/6/cctype" 3
# 40 "/usr/include/c++/6/cctype" 3
# 1 "/usr/include/ctype.h" 1 3 4
# 28 "/usr/include/ctype.h" 3 4
extern "C" {
# 46 "/usr/include/ctype.h" 3 4
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))
};
# 79 "/usr/include/ctype.h" 3 4
extern const unsigned short int **__ctype_b_loc (void)
throw () __attribute__ ((__const__));
extern const __int32_t **__ctype_tolower_loc (void)
throw () __attribute__ ((__const__));
extern const __int32_t **__ctype_toupper_loc (void)
throw () __attribute__ ((__const__));
# 104 "/usr/include/ctype.h" 3 4
extern int isalnum (int) throw ();
extern int isalpha (int) throw ();
extern int iscntrl (int) throw ();
extern int isdigit (int) throw ();
extern int islower (int) throw ();
extern int isgraph (int) throw ();
extern int isprint (int) throw ();
extern int ispunct (int) throw ();
extern int isspace (int) throw ();
extern int isupper (int) throw ();
extern int isxdigit (int) throw ();
extern int tolower (int __c) throw ();
extern int toupper (int __c) throw ();
extern int isblank (int) throw ();
extern int isctype (int __c, int __mask) throw ();
extern int isascii (int __c) throw ();
extern int toascii (int __c) throw ();
extern int _toupper (int) throw ();
extern int _tolower (int) throw ();
# 271 "/usr/include/ctype.h" 3 4
extern int isalnum_l (int, __locale_t) throw ();
extern int isalpha_l (int, __locale_t) throw ();
extern int iscntrl_l (int, __locale_t) throw ();
extern int isdigit_l (int, __locale_t) throw ();
extern int islower_l (int, __locale_t) throw ();
extern int isgraph_l (int, __locale_t) throw ();
extern int isprint_l (int, __locale_t) throw ();
extern int ispunct_l (int, __locale_t) throw ();
extern int isspace_l (int, __locale_t) throw ();
extern int isupper_l (int, __locale_t) throw ();
extern int isxdigit_l (int, __locale_t) throw ();
extern int isblank_l (int, __locale_t) throw ();
extern int __tolower_l (int __c, __locale_t __l) throw ();
extern int tolower_l (int __c, __locale_t __l) throw ();
extern int __toupper_l (int __c, __locale_t __l) throw ();
extern int toupper_l (int __c, __locale_t __l) throw ();
# 347 "/usr/include/ctype.h" 3 4
}
# 43 "/usr/include/c++/6/cctype" 2 3
# 62 "/usr/include/c++/6/cctype" 3
namespace std
{
using ::isalnum;
using ::isalpha;
using ::iscntrl;
using ::isdigit;
using ::isgraph;
using ::islower;
using ::isprint;
using ::ispunct;
using ::isspace;
using ::isupper;
using ::isxdigit;
using ::tolower;
using ::toupper;
}
namespace std
{
using ::isblank;
}
# 43 "/usr/include/c++/6/bits/localefwd.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 55 "/usr/include/c++/6/bits/localefwd.h" 3
class locale;
template<typename _Facet>
bool
has_facet(const locale&) throw();
template<typename _Facet>
const _Facet&
use_facet(const locale&);
template<typename _CharT>
bool
isspace(_CharT, const locale&);
template<typename _CharT>
bool
isprint(_CharT, const locale&);
template<typename _CharT>
bool
iscntrl(_CharT, const locale&);
template<typename _CharT>
bool
isupper(_CharT, const locale&);
template<typename _CharT>
bool
islower(_CharT, const locale&);
template<typename _CharT>
bool
isalpha(_CharT, const locale&);
template<typename _CharT>
bool
isdigit(_CharT, const locale&);
template<typename _CharT>
bool
ispunct(_CharT, const locale&);
template<typename _CharT>
bool
isxdigit(_CharT, const locale&);
template<typename _CharT>
bool
isalnum(_CharT, const locale&);
template<typename _CharT>
bool
isgraph(_CharT, const locale&);
template<typename _CharT>
bool
isblank(_CharT, const locale&);
template<typename _CharT>
_CharT
toupper(_CharT, const locale&);
template<typename _CharT>
_CharT
tolower(_CharT, const locale&);
class ctype_base;
template<typename _CharT>
class ctype;
template<> class ctype<char>;
template<> class ctype<wchar_t>;
template<typename _CharT>
class ctype_byname;
class codecvt_base;
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt;
template<> class codecvt<char, char, mbstate_t>;
template<> class codecvt<wchar_t, char, mbstate_t>;
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt_byname;
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class num_get;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class num_put;
namespace __cxx11 {
template<typename _CharT> class numpunct;
template<typename _CharT> class numpunct_byname;
}
namespace __cxx11 {
template<typename _CharT>
class collate;
template<typename _CharT>
class collate_byname;
}
class time_base;
namespace __cxx11 {
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class time_get;
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class time_get_byname;
}
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class time_put;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class time_put_byname;
class money_base;
namespace __cxx11 {
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class money_get;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class money_put;
}
namespace __cxx11 {
template<typename _CharT, bool _Intl = false>
class moneypunct;
template<typename _CharT, bool _Intl = false>
class moneypunct_byname;
}
class messages_base;
namespace __cxx11 {
template<typename _CharT>
class messages;
template<typename _CharT>
class messages_byname;
}
}
# 44 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/ostream_insert.h" 1 3
# 33 "/usr/include/c++/6/bits/ostream_insert.h" 3
# 34 "/usr/include/c++/6/bits/ostream_insert.h" 3
# 1 "/usr/include/c++/6/bits/cxxabi_forced.h" 1 3
# 34 "/usr/include/c++/6/bits/cxxabi_forced.h" 3
# 35 "/usr/include/c++/6/bits/cxxabi_forced.h" 3
#pragma GCC visibility push(default)
namespace __cxxabiv1
{
class __forced_unwind
{
virtual ~__forced_unwind() throw();
virtual void __pure_dummy() = 0;
};
}
#pragma GCC visibility pop
# 37 "/usr/include/c++/6/bits/ostream_insert.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<typename _CharT, typename _Traits>
inline void
__ostream_write(basic_ostream<_CharT, _Traits>& __out,
const _CharT* __s, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
const streamsize __put = __out.rdbuf()->sputn(__s, __n);
if (__put != __n)
__out.setstate(__ios_base::badbit);
}
template<typename _CharT, typename _Traits>
inline void
__ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
const _CharT __c = __out.fill();
for (; __n > 0; --__n)
{
const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
if (_Traits::eq_int_type(__put, _Traits::eof()))
{
__out.setstate(__ios_base::badbit);
break;
}
}
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
__ostream_insert(basic_ostream<_CharT, _Traits>& __out,
const _CharT* __s, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
try
{
const streamsize __w = __out.width();
if (__w > __n)
{
const bool __left = ((__out.flags()
& __ios_base::adjustfield)
== __ios_base::left);
if (!__left)
__ostream_fill(__out, __w - __n);
if (__out.good())
__ostream_write(__out, __s, __n);
if (__left && __out.good())
__ostream_fill(__out, __w - __n);
}
else
__ostream_write(__out, __s, __n);
__out.width(0);
}
catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(__ios_base::badbit);
throw;
}
catch(...)
{ __out._M_setstate(__ios_base::badbit); }
}
return __out;
}
extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
extern template wostream& __ostream_insert(wostream&, const wchar_t*,
streamsize);
}
# 45 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/stl_function.h" 1 3
# 63 "/usr/include/c++/6/bits/stl_function.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 104 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Arg, typename _Result>
struct unary_function
{
typedef _Arg argument_type;
typedef _Result result_type;
};
template<typename _Arg1, typename _Arg2, typename _Result>
struct binary_function
{
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
typedef _Result result_type;
};
# 144 "/usr/include/c++/6/bits/stl_function.h" 3
struct __is_transparent;
template<typename _Tp = void>
struct plus;
template<typename _Tp = void>
struct minus;
template<typename _Tp = void>
struct multiplies;
template<typename _Tp = void>
struct divides;
template<typename _Tp = void>
struct modulus;
template<typename _Tp = void>
struct negate;
template<typename _Tp>
struct plus : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x + __y; }
};
template<typename _Tp>
struct minus : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x - __y; }
};
template<typename _Tp>
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x * __y; }
};
template<typename _Tp>
struct divides : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x / __y; }
};
template<typename _Tp>
struct modulus : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x % __y; }
};
template<typename _Tp>
struct negate : public unary_function<_Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x) const
{ return -__x; }
};
template<>
struct plus<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) + std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct minus<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) - std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct multiplies<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) * std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct divides<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) / std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct modulus<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) % std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct negate<void>
{
template <typename _Tp>
constexpr
auto
operator()(_Tp&& __t) const
noexcept(noexcept(-std::forward<_Tp>(__t)))
-> decltype(-std::forward<_Tp>(__t))
{ return -std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
# 330 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Tp = void>
struct equal_to;
template<typename _Tp = void>
struct not_equal_to;
template<typename _Tp = void>
struct greater;
template<typename _Tp = void>
struct less;
template<typename _Tp = void>
struct greater_equal;
template<typename _Tp = void>
struct less_equal;
template<typename _Tp>
struct equal_to : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x == __y; }
};
template<typename _Tp>
struct not_equal_to : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x != __y; }
};
template<typename _Tp>
struct greater : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x > __y; }
};
template<typename _Tp>
struct less : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x < __y; }
};
template<typename _Tp>
struct greater_equal : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x >= __y; }
};
template<typename _Tp>
struct less_equal : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x <= __y; }
};
template<>
struct equal_to<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) == std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct not_equal_to<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) != std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct greater<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct less<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) < std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct greater_equal<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct less_equal<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
# 512 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Tp = void>
struct logical_and;
template<typename _Tp = void>
struct logical_or;
template<typename _Tp = void>
struct logical_not;
template<typename _Tp>
struct logical_and : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x && __y; }
};
template<typename _Tp>
struct logical_or : public binary_function<_Tp, _Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x || __y; }
};
template<typename _Tp>
struct logical_not : public unary_function<_Tp, bool>
{
constexpr
bool
operator()(const _Tp& __x) const
{ return !__x; }
};
template<>
struct logical_and<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) && std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct logical_or<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) || std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template<>
struct logical_not<void>
{
template <typename _Tp>
constexpr
auto
operator()(_Tp&& __t) const
noexcept(noexcept(!std::forward<_Tp>(__t)))
-> decltype(!std::forward<_Tp>(__t))
{ return !std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
template<typename _Tp = void>
struct bit_and;
template<typename _Tp = void>
struct bit_or;
template<typename _Tp = void>
struct bit_xor;
template<typename _Tp = void>
struct bit_not;
template<typename _Tp>
struct bit_and : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x & __y; }
};
template<typename _Tp>
struct bit_or : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x | __y; }
};
template<typename _Tp>
struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x ^ __y; }
};
template<typename _Tp>
struct bit_not : public unary_function<_Tp, _Tp>
{
constexpr
_Tp
operator()(const _Tp& __x) const
{ return ~__x; }
};
template <>
struct bit_and<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) & std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_or<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) | std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_xor<void>
{
template <typename _Tp, typename _Up>
constexpr
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_not<void>
{
template <typename _Tp>
constexpr
auto
operator()(_Tp&& __t) const
noexcept(noexcept(~std::forward<_Tp>(__t)))
-> decltype(~std::forward<_Tp>(__t))
{ return ~std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
# 740 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Predicate>
class unary_negate
: public unary_function<typename _Predicate::argument_type, bool>
{
protected:
_Predicate _M_pred;
public:
constexpr
explicit
unary_negate(const _Predicate& __x) : _M_pred(__x) { }
constexpr
bool
operator()(const typename _Predicate::argument_type& __x) const
{ return !_M_pred(__x); }
};
template<typename _Predicate>
constexpr
inline unary_negate<_Predicate>
not1(const _Predicate& __pred)
{ return unary_negate<_Predicate>(__pred); }
template<typename _Predicate>
class binary_negate
: public binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type, bool>
{
protected:
_Predicate _M_pred;
public:
constexpr
explicit
binary_negate(const _Predicate& __x) : _M_pred(__x) { }
constexpr
bool
operator()(const typename _Predicate::first_argument_type& __x,
const typename _Predicate::second_argument_type& __y) const
{ return !_M_pred(__x, __y); }
};
template<typename _Predicate>
constexpr
inline binary_negate<_Predicate>
not2(const _Predicate& __pred)
{ return binary_negate<_Predicate>(__pred); }
# 817 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Arg, typename _Result>
class pointer_to_unary_function : public unary_function<_Arg, _Result>
{
protected:
_Result (*_M_ptr)(_Arg);
public:
pointer_to_unary_function() { }
explicit
pointer_to_unary_function(_Result (*__x)(_Arg))
: _M_ptr(__x) { }
_Result
operator()(_Arg __x) const
{ return _M_ptr(__x); }
};
template<typename _Arg, typename _Result>
inline pointer_to_unary_function<_Arg, _Result>
ptr_fun(_Result (*__x)(_Arg))
{ return pointer_to_unary_function<_Arg, _Result>(__x); }
template<typename _Arg1, typename _Arg2, typename _Result>
class pointer_to_binary_function
: public binary_function<_Arg1, _Arg2, _Result>
{
protected:
_Result (*_M_ptr)(_Arg1, _Arg2);
public:
pointer_to_binary_function() { }
explicit
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
: _M_ptr(__x) { }
_Result
operator()(_Arg1 __x, _Arg2 __y) const
{ return _M_ptr(__x, __y); }
};
template<typename _Arg1, typename _Arg2, typename _Result>
inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
ptr_fun(_Result (*__x)(_Arg1, _Arg2))
{ return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
template<typename _Tp>
struct _Identity
: public unary_function<_Tp,_Tp>
{
_Tp&
operator()(_Tp& __x) const
{ return __x; }
const _Tp&
operator()(const _Tp& __x) const
{ return __x; }
};
template<typename _Pair>
struct _Select1st
: public unary_function<_Pair, typename _Pair::first_type>
{
typename _Pair::first_type&
operator()(_Pair& __x) const
{ return __x.first; }
const typename _Pair::first_type&
operator()(const _Pair& __x) const
{ return __x.first; }
template<typename _Pair2>
typename _Pair2::first_type&
operator()(_Pair2& __x) const
{ return __x.first; }
template<typename _Pair2>
const typename _Pair2::first_type&
operator()(const _Pair2& __x) const
{ return __x.first; }
};
template<typename _Pair>
struct _Select2nd
: public unary_function<_Pair, typename _Pair::second_type>
{
typename _Pair::second_type&
operator()(_Pair& __x) const
{ return __x.second; }
const typename _Pair::second_type&
operator()(const _Pair& __x) const
{ return __x.second; }
};
# 937 "/usr/include/c++/6/bits/stl_function.h" 3
template<typename _Ret, typename _Tp>
class mem_fun_t : public unary_function<_Tp*, _Ret>
{
public:
explicit
mem_fun_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
_Ret
operator()(_Tp* __p) const
{ return (__p->*_M_f)(); }
private:
_Ret (_Tp::*_M_f)();
};
template<typename _Ret, typename _Tp>
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
{
public:
explicit
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp* __p) const
{ return (__p->*_M_f)(); }
private:
_Ret (_Tp::*_M_f)() const;
};
template<typename _Ret, typename _Tp>
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
mem_fun_ref_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
_Ret
operator()(_Tp& __r) const
{ return (__r.*_M_f)(); }
private:
_Ret (_Tp::*_M_f)();
};
template<typename _Ret, typename _Tp>
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp& __r) const
{ return (__r.*_M_f)(); }
private:
_Ret (_Tp::*_M_f)() const;
};
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
{
public:
explicit
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
_Ret
operator()(_Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg);
};
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
_Ret
operator()(_Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg);
};
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
template<typename _Ret, typename _Tp>
inline mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)())
{ return mem_fun_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline const_mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)())
{ return mem_fun_ref_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline const_mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
}
# 1 "/usr/include/c++/6/backward/binders.h" 1 3
# 60 "/usr/include/c++/6/backward/binders.h" 3
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
namespace std __attribute__ ((__visibility__ ("default")))
{
# 107 "/usr/include/c++/6/backward/binders.h" 3
template<typename _Operation>
class binder1st
: public unary_function<typename _Operation::second_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::first_argument_type value;
public:
binder1st(const _Operation& __x,
const typename _Operation::first_argument_type& __y)
: op(__x), value(__y) { }
typename _Operation::result_type
operator()(const typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
typename _Operation::result_type
operator()(typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
} __attribute__ ((__deprecated__));
template<typename _Operation, typename _Tp>
inline binder1st<_Operation>
bind1st(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::first_argument_type _Arg1_type;
return binder1st<_Operation>(__fn, _Arg1_type(__x));
}
template<typename _Operation>
class binder2nd
: public unary_function<typename _Operation::first_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::second_argument_type value;
public:
binder2nd(const _Operation& __x,
const typename _Operation::second_argument_type& __y)
: op(__x), value(__y) { }
typename _Operation::result_type
operator()(const typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
typename _Operation::result_type
operator()(typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
} __attribute__ ((__deprecated__));
template<typename _Operation, typename _Tp>
inline binder2nd<_Operation>
bind2nd(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::second_argument_type _Arg2_type;
return binder2nd<_Operation>(__fn, _Arg2_type(__x));
}
}
#pragma GCC diagnostic pop
# 1128 "/usr/include/c++/6/bits/stl_function.h" 2 3
# 49 "/usr/include/c++/6/string" 2 3
# 1 "/usr/include/c++/6/bits/range_access.h" 1 3
# 33 "/usr/include/c++/6/bits/range_access.h" 3
# 34 "/usr/include/c++/6/bits/range_access.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
template<typename _Container>
inline auto
begin(_Container& __cont) -> decltype(__cont.begin())
{ return __cont.begin(); }
template<typename _Container>
inline auto
begin(const _Container& __cont) -> decltype(__cont.begin())
{ return __cont.begin(); }
template<typename _Container>
inline auto
end(_Container& __cont) -> decltype(__cont.end())
{ return __cont.end(); }
template<typename _Container>
inline auto
end(const _Container& __cont) -> decltype(__cont.end())
{ return __cont.end(); }
template<typename _Tp, size_t _Nm>
inline constexpr _Tp*
begin(_Tp (&__arr)[_Nm])
{ return __arr; }
template<typename _Tp, size_t _Nm>
inline constexpr _Tp*
end(_Tp (&__arr)[_Nm])
{ return __arr + _Nm; }
template<typename _Tp> class valarray;
template<typename _Tp> _Tp* begin(valarray<_Tp>&);
template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
template<typename _Tp> _Tp* end(valarray<_Tp>&);
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
template<typename _Container>
inline constexpr auto
cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))
-> decltype(std::begin(__cont))
{ return std::begin(__cont); }
template<typename _Container>
inline constexpr auto
cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))
-> decltype(std::end(__cont))
{ return std::end(__cont); }
template<typename _Container>
inline auto
rbegin(_Container& __cont) -> decltype(__cont.rbegin())
{ return __cont.rbegin(); }
template<typename _Container>
inline auto
rbegin(const _Container& __cont) -> decltype(__cont.rbegin())
{ return __cont.rbegin(); }
template<typename _Container>
inline auto
rend(_Container& __cont) -> decltype(__cont.rend())
{ return __cont.rend(); }
template<typename _Container>
inline auto
rend(const _Container& __cont) -> decltype(__cont.rend())
{ return __cont.rend(); }
template<typename _Tp, size_t _Nm>
inline reverse_iterator<_Tp*>
rbegin(_Tp (&__arr)[_Nm])
{ return reverse_iterator<_Tp*>(__arr + _Nm); }
template<typename _Tp, size_t _Nm>
inline reverse_iterator<_Tp*>
rend(_Tp (&__arr)[_Nm])
{ return reverse_iterator<_Tp*>(__arr); }
template<typename _Tp>
inline reverse_iterator<const _Tp*>
rbegin(initializer_list<_Tp> __il)
{ return reverse_iterator<const _Tp*>(__il.end()); }
template<typename _Tp>
inline reverse_iterator<const _Tp*>
rend(initializer_list<_Tp> __il)
{ return reverse_iterator<const _Tp*>(_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment