diff --git a/inst/i/b/hana/accessors.hpp b/inst/i/b/hana/accessors.hpp deleted file mode 100644 index 43b898cd5..000000000 --- a/inst/i/b/hana/accessors.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*! -@file -Defines `boost::hana::accessors`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_ACCESSORS_HPP -#define BOOST_HANA_ACCESSORS_HPP - -#include - -#include -#include -#include - - -namespace boost { namespace hana { - template - struct accessors_t { - #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS - static_assert(hana::Struct::value, - "hana::accessors requires 'S' to be a Struct"); - #endif - - constexpr decltype(auto) operator()() const { - using Accessors = BOOST_HANA_DISPATCH_IF(accessors_impl, - hana::Struct::value - ); - - return Accessors::apply(); - } - }; - - template - struct accessors_impl> : default_ { - template - static constexpr auto apply(Args&& ...) = delete; - }; - - namespace struct_detail { - template - struct is_valid { static constexpr bool value = true; }; - } - - template - struct accessors_impl::value - >> - : S::hana_accessors_impl - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_ACCESSORS_HPP diff --git a/inst/i/b/hana/at.hpp b/inst/i/b/hana/at.hpp deleted file mode 100644 index 383788a45..000000000 --- a/inst/i/b/hana/at.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*! -@file -Defines `boost::hana::at` and `boost::hana::at_c`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_AT_HPP -#define BOOST_HANA_AT_HPP - -#include - -#include -#include -#include -#include -#include - -#include - - -namespace boost { namespace hana { - //! @cond - template - constexpr decltype(auto) at_t::operator()(Xs&& xs, N const& n) const { - using It = typename hana::tag_of::type; - using At = BOOST_HANA_DISPATCH_IF(at_impl, - hana::Iterable::value - ); - - #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS - static_assert(hana::Iterable::value, - "hana::at(xs, n) requires 'xs' to be an Iterable"); - - static_assert(hana::IntegralConstant::value, - "hana::at(xs, n) requires 'n' to be an IntegralConstant"); - #endif - - return At::apply(static_cast(xs), n); - } - //! @endcond - - template - struct at_impl> : default_ { - template - static constexpr auto apply(Args&& ...) = delete; - }; - - template - constexpr decltype(auto) at_c(Xs&& xs) { - return hana::at(static_cast(xs), hana::size_t{}); - } -}} // end namespace boost::hana - -#endif // !BOOST_HANA_AT_HPP diff --git a/inst/i/b/hana/basic_tuple.hpp b/inst/i/b/hana/basic_tuple.hpp deleted file mode 100644 index c3881d4ae..000000000 --- a/inst/i/b/hana/basic_tuple.hpp +++ /dev/null @@ -1,264 +0,0 @@ -/*! -@file -Defines `boost::hana::basic_tuple`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_BASIC_TUPLE_HPP -#define BOOST_HANA_BASIC_TUPLE_HPP - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -namespace boost { namespace hana { - namespace detail { - ////////////////////////////////////////////////////////////////////// - // basic_tuple_impl - ////////////////////////////////////////////////////////////////////// - template struct bti; // basic_tuple_index - - struct from_other { }; - - template -#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE - struct __declspec(empty_bases) basic_tuple_impl; -#else - struct basic_tuple_impl; -#endif - - template -#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE - struct __declspec(empty_bases) basic_tuple_impl, Xn...> -#else - struct basic_tuple_impl, Xn...> -#endif - : detail::ebo, Xn>... - { - static constexpr std::size_t size_ = sizeof...(Xn); - - constexpr basic_tuple_impl() = default; - - template - explicit constexpr basic_tuple_impl(detail::from_other, Other&& other) - : detail::ebo, Xn>(detail::ebo_get>(static_cast(other)))... - { } - - template - explicit constexpr basic_tuple_impl(Yn&& ...yn) - : detail::ebo, Xn>(static_cast(yn))... - { } - }; - } - - ////////////////////////////////////////////////////////////////////////// - // basic_tuple - ////////////////////////////////////////////////////////////////////////// - //! @cond - template - struct basic_tuple final - : detail::basic_tuple_impl, Xn...> - { - using Base = detail::basic_tuple_impl, Xn...>; - - constexpr basic_tuple() = default; - - // copy constructor - template ::type, basic_tuple>::value - >::type> - constexpr basic_tuple(Other&& other) - : Base(detail::from_other{}, static_cast(other)) - { } - - template - explicit constexpr basic_tuple(Yn&& ...yn) - : Base(static_cast(yn)...) - { } - }; - //! @endcond - - template - struct tag_of> { - using type = basic_tuple_tag; - }; - - ////////////////////////////////////////////////////////////////////////// - // Foldable - ////////////////////////////////////////////////////////////////////////// - template <> - struct unpack_impl { - template - static constexpr decltype(auto) - apply(detail::basic_tuple_impl, Xn...> const& xs, F&& f) { - return static_cast(f)( - detail::ebo_get>( - static_cast, Xn> const&>(xs) - )... - ); - } - - template - static constexpr decltype(auto) - apply(detail::basic_tuple_impl, Xn...>& xs, F&& f) { - return static_cast(f)( - detail::ebo_get>( - static_cast, Xn>&>(xs) - )... - ); - } - - template - static constexpr decltype(auto) - apply(detail::basic_tuple_impl, Xn...>&& xs, F&& f) { - return static_cast(f)( - detail::ebo_get>( - static_cast, Xn>&&>(xs) - )... - ); - } - }; - - ////////////////////////////////////////////////////////////////////////// - // Functor - ////////////////////////////////////////////////////////////////////////// - template <> - struct transform_impl { - template - static constexpr auto - apply(detail::basic_tuple_impl, Xn...> const& xs, F const& f) { - return hana::make_basic_tuple( - f(detail::ebo_get>( - static_cast, Xn> const&>(xs) - ))... - ); - } - - template - static constexpr auto - apply(detail::basic_tuple_impl, Xn...>& xs, F const& f) { - return hana::make_basic_tuple( - f(detail::ebo_get>( - static_cast, Xn>&>(xs) - ))... - ); - } - - template - static constexpr auto - apply(detail::basic_tuple_impl, Xn...>&& xs, F const& f) { - return hana::make_basic_tuple( - f(detail::ebo_get>( - static_cast, Xn>&&>(xs) - ))... - ); - } - }; - - ////////////////////////////////////////////////////////////////////////// - // Iterable - ////////////////////////////////////////////////////////////////////////// - template <> - struct at_impl { - template - static constexpr decltype(auto) apply(Xs&& xs, N const&) { - constexpr std::size_t index = N::value; - return detail::ebo_get>(static_cast(xs)); - } - }; - - template <> - struct drop_front_impl { - template - static constexpr auto drop_front_helper(Xs&& xs, std::index_sequence) { - return hana::make_basic_tuple( - detail::ebo_get>(static_cast(xs))... - ); - } - - template - static constexpr auto apply(Xs&& xs, N const&) { - constexpr std::size_t len = detail::decay::type::size_; - return drop_front_helper(static_cast(xs), std::make_index_sequence< - (N::value < len) ? len - N::value : 0 - >{}); - } - }; - - template <> - struct is_empty_impl { - template - static constexpr hana::bool_ - apply(basic_tuple const&) - { return {}; } - }; - - // compile-time optimizations (to reduce the # of function instantiations) - template - constexpr decltype(auto) at_c(basic_tuple const& xs) { - return detail::ebo_get>(xs); - } - - template - constexpr decltype(auto) at_c(basic_tuple& xs) { - return detail::ebo_get>(xs); - } - - template - constexpr decltype(auto) at_c(basic_tuple&& xs) { - return detail::ebo_get>(static_cast&&>(xs)); - } - - ////////////////////////////////////////////////////////////////////////// - // Sequence - ////////////////////////////////////////////////////////////////////////// - template <> - struct Sequence { - static constexpr bool value = true; - }; - - template <> - struct make_impl { - template - static constexpr basic_tuple::type...> - apply(Xn&& ...xn) { - return basic_tuple::type...>{ - static_cast(xn)... - }; - } - }; - - ////////////////////////////////////////////////////////////////////////// - // length - ////////////////////////////////////////////////////////////////////////// - template <> - struct length_impl { - template - static constexpr auto apply(basic_tuple const&) { - return hana::size_t{}; - } - }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_BASIC_TUPLE_HPP diff --git a/inst/i/b/hana/bool.hpp b/inst/i/b/hana/bool.hpp deleted file mode 100644 index 28c591c1f..000000000 --- a/inst/i/b/hana/bool.hpp +++ /dev/null @@ -1,272 +0,0 @@ -/*! -@file -Defines the `Logical` and `Comparable` models of `boost::hana::integral_constant`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_BOOL_HPP -#define BOOST_HANA_BOOL_HPP - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -namespace boost { namespace hana { - ////////////////////////////////////////////////////////////////////////// - // integral_constant - ////////////////////////////////////////////////////////////////////////// - //! @cond - namespace ic_detail { - template > - struct go; - - template - struct go> { - using swallow = T[]; - - template - static constexpr void with_index(F&& f) - { (void)swallow{T{}, ((void)f(integral_constant{}), i)...}; } - - template - static constexpr void without_index(F&& f) - { (void)swallow{T{}, ((void)f(), i)...}; } - }; - - template - template - constexpr void with_index_t::operator()(F&& f) const - { go::with_index(static_cast(f)); } - - template - template - constexpr void times_t::operator()(F&& f) const - { go::without_index(static_cast(f)); } - - // avoid link-time error - template - constexpr with_index_t times_t::with_index; - } - - // avoid link-time error - template - constexpr ic_detail::times_t integral_constant::times; - - template - struct tag_of> { - using type = integral_constant_tag; - }; - //! @endcond - - ////////////////////////////////////////////////////////////////////////// - // Operators - ////////////////////////////////////////////////////////////////////////// - namespace detail { - template - struct comparable_operators> { - static constexpr bool value = true; - }; - template - struct orderable_operators> { - static constexpr bool value = true; - }; - template - struct arithmetic_operators> { - static constexpr bool value = true; - }; - template - struct logical_operators> { - static constexpr bool value = true; - }; - } - -#define BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(op) \ - template \ - constexpr integral_constant \ - operator op(integral_constant, integral_constant) \ - { return {}; } \ - /**/ - -#define BOOST_HANA_INTEGRAL_CONSTANT_UNARY_OP(op) \ - template \ - constexpr integral_constant \ - operator op(integral_constant) \ - { return {}; } \ - /**/ - - // Arithmetic - BOOST_HANA_INTEGRAL_CONSTANT_UNARY_OP(+) - - // Bitwise - BOOST_HANA_INTEGRAL_CONSTANT_UNARY_OP(~) - BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(&) - BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(|) - BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(^) - BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(<<) - BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP(>>) - -#undef BOOST_HANA_INTEGRAL_CONSTANT_UNARY_OP -#undef BOOST_HANA_INTEGRAL_CONSTANT_BINARY_OP - - - ////////////////////////////////////////////////////////////////////////// - // User-defined literal - ////////////////////////////////////////////////////////////////////////// - namespace ic_detail { - - constexpr int to_int(char c) { - int result = 0; - - if (c >= 'A' && c <= 'F') { - result = static_cast(c) - static_cast('A') + 10; - } - else if (c >= 'a' && c <= 'f') { - result = static_cast(c) - static_cast('a') + 10; - } - else { - result = static_cast(c) - static_cast('0'); - } - - return result; - } - - template - 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' || arr[1] == 'X'); - bool is_binary = starts_with_zero && arr[1] == 'b'; - - if (is_hex) { - //0xDEADBEEF (hexadecimal) - base = 16; - offset = 2; - } - else if (is_binary) { - //0b101011101 (binary) - base = 2; - offset = 2; - } - else if (starts_with_zero) { - //012345 (octal) - 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]; - if (c != '\'') { // skip digit separators - number += to_int(c) * multiplier; - multiplier *= base; - } - } - - return number; - } - } - - namespace literals { - template - constexpr auto operator"" _c() { - return hana::llong({c...})>{}; - } - } - - ////////////////////////////////////////////////////////////////////////// - // Model of Constant/IntegralConstant - ////////////////////////////////////////////////////////////////////////// - template - struct IntegralConstant> { - static constexpr bool value = true; - }; - - template - struct to_impl, C, when::value>> - : embedding::value> - { - template - static constexpr auto apply(N const&) - { return integral_constant{}; } - }; - - ////////////////////////////////////////////////////////////////////////// - // Optimizations - ////////////////////////////////////////////////////////////////////////// - template - struct eval_if_impl> { - template - static constexpr decltype(auto) - apply(Cond const&, Then&& t, Else&& e) { - constexpr bool cond = static_cast(Cond::value); - return eval_if_impl::apply(hana::bool_{}, - static_cast(t), - static_cast(e)); - } - - template - static constexpr decltype(auto) - apply(hana::true_ const&, Then&& t, Else&&) - { return hana::eval(static_cast(t)); } - - template - static constexpr decltype(auto) - apply(hana::false_ const&, Then&&, Else&& e) - { return hana::eval(static_cast(e)); } - }; - - template - struct if_impl> { - template - static constexpr decltype(auto) - apply(Cond const&, Then&& t, Else&& e) { - constexpr bool cond = static_cast(Cond::value); - return if_impl::apply(hana::bool_{}, - static_cast(t), - static_cast(e)); - } - - //! @todo We could return `Then` instead of `auto` to sometimes save - //! a copy, but that would break some code that would return a - //! reference to a `type` object. I think the code that would be - //! broken should be changed, but more thought needs to be given. - template - static constexpr auto - apply(hana::true_ const&, Then&& t, Else&&) - { return static_cast(t); } - - template - static constexpr auto - apply(hana::false_ const&, Then&&, Else&& e) - { return static_cast(e); } - }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_BOOL_HPP diff --git a/inst/i/b/hana/concept/constant.hpp b/inst/i/b/hana/concept/constant.hpp deleted file mode 100644 index a32d90244..000000000 --- a/inst/i/b/hana/concept/constant.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*! -@file -Defines `boost::hana::Constant`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_CONSTANT_HPP -#define BOOST_HANA_CONCEPT_CONSTANT_HPP - -#include - -#include -#include -#include -#include -#include - - -namespace boost { namespace hana { - template - struct Constant - : hana::integral_constant::type>>::value - > - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_CONSTANT_HPP diff --git a/inst/i/b/hana/concept/foldable.hpp b/inst/i/b/hana/concept/foldable.hpp deleted file mode 100644 index 31c06d83c..000000000 --- a/inst/i/b/hana/concept/foldable.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*! -@file -Defines `boost::hana::Foldable`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_FOLDABLE_HPP -#define BOOST_HANA_CONCEPT_FOLDABLE_HPP - -#include - -#include -#include -#include -#include -#include -#include - - -namespace boost { namespace hana { - template - struct Foldable - : hana::integral_constant::type>>::value || - !is_default::type>>::value - > - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_FOLDABLE_HPP diff --git a/inst/i/b/hana/concept/integral_constant.hpp b/inst/i/b/hana/concept/integral_constant.hpp deleted file mode 100644 index e6d6de0c9..000000000 --- a/inst/i/b/hana/concept/integral_constant.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*! -@file -Defines `boost::hana::IntegralConstant`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP -#define BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP - -#include - -#include -#include -#include - - -namespace boost { namespace hana { - namespace detail { - template ::type> - struct integral_constant_dispatch - : hana::integral_constant::value - > - { }; - - template - struct integral_constant_dispatch - : hana::integral_constant - { }; - } - - //! @cond - template - struct IntegralConstant - : detail::integral_constant_dispatch - { }; - //! @endcond -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP diff --git a/inst/i/b/hana/concept/iterable.hpp b/inst/i/b/hana/concept/iterable.hpp deleted file mode 100644 index cdbfc89a1..000000000 --- a/inst/i/b/hana/concept/iterable.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*! -@file -Defines `boost::hana::Iterable`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_ITERABLE_HPP -#define BOOST_HANA_CONCEPT_ITERABLE_HPP - -#include - -#include -#include -#include -#include -#include -#include -#include - - -namespace boost { namespace hana { - template - struct Iterable - : hana::integral_constant::type>>::value && - !is_default::type>>::value && - !is_default::type>>::value - > - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_ITERABLE_HPP diff --git a/inst/i/b/hana/concept/product.hpp b/inst/i/b/hana/concept/product.hpp deleted file mode 100644 index 798024987..000000000 --- a/inst/i/b/hana/concept/product.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*! -@file -Defines `boost::hana::Product`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_PRODUCT_HPP -#define BOOST_HANA_CONCEPT_PRODUCT_HPP - -#include - -#include -#include -#include -#include -#include -#include - - -namespace boost { namespace hana { - template - struct Product - : hana::integral_constant::type>>::value && - !is_default::type>>::value - > - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_PRODUCT_HPP diff --git a/inst/i/b/hana/concept/sequence.hpp b/inst/i/b/hana/concept/sequence.hpp deleted file mode 100644 index 926a26c36..000000000 --- a/inst/i/b/hana/concept/sequence.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*! -@file -Defines `boost::hana::Sequence`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_SEQUENCE_HPP -#define BOOST_HANA_CONCEPT_SEQUENCE_HPP - -#include - -#include -#include -#include -#include - - -namespace boost { namespace hana { - namespace detail { - template ::type> - struct sequence_dispatch - : hana::integral_constant::value - > - { }; - - template - struct sequence_dispatch - : hana::integral_constant - { }; - } - - //! @cond - template - struct Sequence> - : detail::sequence_dispatch - { }; - //! @endcond -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_SEQUENCE_HPP diff --git a/inst/i/b/hana/concept/struct.hpp b/inst/i/b/hana/concept/struct.hpp deleted file mode 100644 index c910aaeef..000000000 --- a/inst/i/b/hana/concept/struct.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*! -@file -Defines `boost::hana::Struct`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONCEPT_STRUCT_HPP -#define BOOST_HANA_CONCEPT_STRUCT_HPP - -#include - -#include -#include -#include -#include -#include - - -namespace boost { namespace hana { - template - struct Struct - : hana::integral_constant::type>>::value - > - { }; -}} // end namespace boost::hana - -#endif // !BOOST_HANA_CONCEPT_STRUCT_HPP diff --git a/inst/i/b/hana/config.hpp b/inst/i/b/hana/config.hpp deleted file mode 100644 index 1755e9f46..000000000 --- a/inst/i/b/hana/config.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/*! -@file -Defines configuration macros used throughout the library. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CONFIG_HPP -#define BOOST_HANA_CONFIG_HPP - -#include - - -////////////////////////////////////////////////////////////////////////////// -// Detect the compiler -////////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) && !defined(__clang__) // MSVC - // This must be checked first, because otherwise it produces a fatal - // error due to unrecognized #warning directives used below. - -# if _MSC_VER < 1915 -# pragma message("Warning: the native Microsoft compiler is not supported due to lack of proper C++14 support.") -# else - // 1. Active issues - // Multiple copy/move ctors -# define BOOST_HANA_WORKAROUND_MSVC_MULTIPLECTOR_106654 - - // 2. Issues fixed in the development branch of MSVC - // Forward declaration of class template member function returning decltype(auto) -# define BOOST_HANA_WORKAROUND_MSVC_DECLTYPEAUTO_RETURNTYPE_662735 - - // 3. Issues fixed conditionally - // Requires __declspec(empty_bases) - // Empty base optimization -# define BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE - - // Requires /experimental:preprocessor - // Variadic macro expansion -# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL -# define BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033 -# endif -# endif - -#elif defined(__clang__) && defined(_MSC_VER) // Clang-cl (Clang for Windows) - -# define BOOST_HANA_CONFIG_CLANG_CL -# define BOOST_HANA_CONFIG_CLANG BOOST_HANA_CONFIG_VERSION( \ - __clang_major__, __clang_minor__, __clang_patchlevel__) - -#elif defined(__clang__) && defined(__apple_build_version__) // Apple's Clang - -# define BOOST_HANA_CONFIG_APPLE_CLANG -# if __apple_build_version__ >= 6020049 -# define BOOST_HANA_CONFIG_CLANG BOOST_HANA_CONFIG_VERSION(3, 6, 0) -# endif - -#elif defined(__clang__) // genuine Clang - -# define BOOST_HANA_CONFIG_CLANG BOOST_HANA_CONFIG_VERSION( \ - __clang_major__, __clang_minor__, __clang_patchlevel__) - -#elif defined(__GNUC__) // GCC - -# define BOOST_HANA_CONFIG_GCC BOOST_HANA_CONFIG_VERSION( \ - __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) - -#endif - -////////////////////////////////////////////////////////////////////////////// -// Check the compiler for general C++14 capabilities -////////////////////////////////////////////////////////////////////////////// -#if (__cplusplus < 201400) -# if defined(_MSC_VER) -# if _MSC_VER < 1915 -# pragma message("Warning: Your compiler doesn't provide C++14 or higher capabilities. Try adding the compiler flag '-std=c++14' or '-std=c++1y'.") -# endif -# else -# warning "Your compiler doesn't provide C++14 or higher capabilities. Try adding the compiler flag '-std=c++14' or '-std=c++1y'." -# endif -#endif - -////////////////////////////////////////////////////////////////////////////// -// Caveats and other compiler-dependent options -////////////////////////////////////////////////////////////////////////////// - -// `BOOST_HANA_CONFIG_HAS_CONSTEXPR_LAMBDA` enables some constructs requiring -// `constexpr` lambdas, which are in the language starting with C++17. -// -// Always disabled for now because Clang only has partial support for them -// (captureless lambdas only). -#if defined(__cplusplus) && __cplusplus > 201402L -# define BOOST_HANA_CONSTEXPR_STATELESS_LAMBDA constexpr -// # define BOOST_HANA_CONFIG_HAS_CONSTEXPR_LAMBDA -#else -# define BOOST_HANA_CONSTEXPR_STATELESS_LAMBDA /* nothing */ -#endif - -// `BOOST_HANA_CONSTEXPR_LAMBDA` expands to `constexpr` if constexpr lambdas -// are supported and to nothing otherwise. -#if defined(BOOST_HANA_CONFIG_HAS_CONSTEXPR_LAMBDA) -# define BOOST_HANA_CONSTEXPR_LAMBDA constexpr -#else -# define BOOST_HANA_CONSTEXPR_LAMBDA /* nothing */ -#endif - -// `BOOST_HANA_INLINE_VARIABLE` expands to `inline` when C++17 inline variables -// are supported, and to nothing otherwise. This allows marking global variables -// defined in a header as `inline` to avoid potential ODR violations. -#if defined(__cplusplus) && __cplusplus > 201402L -# define BOOST_HANA_INLINE_VARIABLE inline -#else -# define BOOST_HANA_INLINE_VARIABLE /* nothing */ -#endif - -////////////////////////////////////////////////////////////////////////////// -// Library features and options that can be tweaked by users -////////////////////////////////////////////////////////////////////////////// - -#if defined(BOOST_HANA_DOXYGEN_INVOKED) || \ - (defined(NDEBUG) && !defined(BOOST_HANA_CONFIG_DISABLE_ASSERTIONS)) - //! @ingroup group-config - //! Disables the `BOOST_HANA_*_ASSERT` macro & friends. - //! - //! When this macro is defined, the `BOOST_HANA_*_ASSERT` macro & friends - //! are disabled, i.e. they expand to nothing. - //! - //! This macro is defined automatically when `NDEBUG` is defined. It can - //! also be defined by users before including this header or defined on - //! the command line. -# define BOOST_HANA_CONFIG_DISABLE_ASSERTIONS -#endif - -#if defined(BOOST_HANA_DOXYGEN_INVOKED) - //! @ingroup group-config - //! Disables concept checks in interface methods. - //! - //! When this macro is not defined (the default), tag-dispatched methods - //! will make sure the arguments they are passed are models of the proper - //! concept(s). This can be very helpful in catching programming errors, - //! but it is also slightly less compile-time efficient. You should - //! probably always leave the checks enabled (and hence never define this - //! macro), except perhaps in translation units that are compiled very - //! often but whose code using Hana is modified very rarely. -# define BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS -#endif - -#if defined(BOOST_HANA_DOXYGEN_INVOKED) - //! @ingroup group-config - //! Enables usage of the "string literal operator template" GNU extension. - //! - //! That operator is not part of the language yet, but it is supported by - //! both Clang and GCC. This operator allows Hana to provide the nice `_s` - //! user-defined literal for creating compile-time strings. - //! - //! When this macro is not defined, the GNU extension will be not used - //! by Hana. Because this is a non-standard extension, the macro is not - //! defined by default. -# define BOOST_HANA_CONFIG_ENABLE_STRING_UDL -#endif - -#if defined(BOOST_HANA_DOXYGEN_INVOKED) - //! @ingroup group-config - //! Enables additional assertions and sanity checks to be done by Hana. - //! - //! When this macro is defined (it is __not defined__ by default), - //! additional sanity checks may be done by Hana. These checks may - //! be costly to perform, either in terms of compilation time or in - //! terms of execution time. These checks may help debugging an - //! application during its initial development, but they should not - //! be enabled as part of the normal configuration. -# define BOOST_HANA_CONFIG_ENABLE_DEBUG_MODE -#endif - -#endif // !BOOST_HANA_CONFIG_HPP diff --git a/inst/i/b/hana/core/common.hpp b/inst/i/b/hana/core/common.hpp deleted file mode 100644 index 9bbd823f0..000000000 --- a/inst/i/b/hana/core/common.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/*! -@file -Defines `boost::hana::common` and `boost::hana::common_t`. - -Copyright Louis Dionne 2013-2022 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - */ - -#ifndef BOOST_HANA_CORE_COMMON_HPP -#define BOOST_HANA_CORE_COMMON_HPP - -#include - -#include -#include -#include -#include -#include -#include - -#include - - -namespace boost { namespace hana { - ////////////////////////////////////////////////////////////////////////// - // common - ////////////////////////////////////////////////////////////////////////// - //! @cond - template - struct common : common> { }; - //! @endcond - - template - struct common> - : detail::std_common_type - { }; - - template - struct common { - using type = T; - }; - - ////////////////////////////////////////////////////////////////////////// - // has_common - ////////////////////////////////////////////////////////////////////////// - template - struct has_common : std::false_type { }; - - template - struct has_common::type>> - : std::true_type - { }; - - ////////////////////////////////////////////////////////////////////////// - // Provided common data types for Constants - ////////////////////////////////////////////////////////////////////////// - namespace constant_detail { - //! @todo - //! This is an awful hack to avoid having - //! @code - //! common, integral_constant_tag> - //! == - //! CanonicalConstant - //! @endcode - template - struct which { - using type = detail::CanonicalConstant; - }; - - template