update boost on linux
This commit is contained in:
@@ -99,9 +99,25 @@ BOOST_HANA_NAMESPACE_BEGIN
|
||||
using vector_tag = ::boost::mpl::sequence_tag< ::boost::mpl::vector<>>::type;
|
||||
}}}
|
||||
|
||||
namespace mpl_detail {
|
||||
// When `BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES` is not defined (e.g. on
|
||||
// MSVC), different MPL sequences (like vector0 and vector1) have different
|
||||
// tags, so we need to take that into account when we compare them.
|
||||
#ifndef BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
|
||||
template <typename T1, typename T2>
|
||||
struct is_same_mpl_vector_tag : std::false_type { };
|
||||
|
||||
template <template <long> class Tag, long x, long y>
|
||||
struct is_same_mpl_vector_tag<Tag<x>, Tag<y>> : std::true_type { };
|
||||
#else
|
||||
template <typename T1, typename T2>
|
||||
struct is_same_mpl_vector_tag : std::is_same<T1, T2> { };
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct tag_of<T, when<
|
||||
std::is_same<
|
||||
mpl_detail::is_same_mpl_vector_tag<
|
||||
typename ::boost::mpl::sequence_tag<T>::type,
|
||||
::boost::mpl::sequence_tag< ::boost::mpl::vector<>>::type
|
||||
>::value
|
||||
|
||||
@@ -14,17 +14,12 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
//! @defgroup group-ext-std Standard library adapters
|
||||
//! Adapters for components in the standard library.
|
||||
|
||||
#include <boost/hana/config.hpp>
|
||||
|
||||
#ifndef BOOST_HANA_CONFIG_HAS_NO_STD_TUPLE_ADAPTER
|
||||
# include <boost/hana/ext/std/tuple.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/hana/ext/std/array.hpp>
|
||||
#include <boost/hana/ext/std/integer_sequence.hpp>
|
||||
#include <boost/hana/ext/std/integral_constant.hpp>
|
||||
#include <boost/hana/ext/std/pair.hpp>
|
||||
#include <boost/hana/ext/std/ratio.hpp>
|
||||
#include <boost/hana/ext/std/tuple.hpp>
|
||||
#include <boost/hana/ext/std/vector.hpp>
|
||||
|
||||
#endif // !BOOST_HANA_EXT_STD_HPP
|
||||
|
||||
@@ -149,13 +149,21 @@ BOOST_HANA_NAMESPACE_BEGIN
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
template <>
|
||||
struct less_impl<ext::std::array_tag, ext::std::array_tag> {
|
||||
template <typename T, typename U>
|
||||
static constexpr auto apply(std::array<T, 0> const&, std::array<U, 0> const&)
|
||||
{ return hana::false_c; }
|
||||
|
||||
template <typename T, std::size_t n, typename U, std::size_t m>
|
||||
static constexpr auto apply(std::array<T, n> const& xs, std::array<U, m> const& ys) {
|
||||
return detail::lexicographical_compare(&xs[0], &xs[0] + n, &ys[0], &ys[0] + m);
|
||||
// This logic is more complex than it needs to be because we can't
|
||||
// use `.begin()` and `.end()`, which are not constexpr in C++14,
|
||||
// and because `&arr[0]` is UB when the array is empty.
|
||||
if (xs.empty()) {
|
||||
return !ys.empty();
|
||||
} else {
|
||||
if (ys.empty()) {
|
||||
return false;
|
||||
} else {
|
||||
return detail::lexicographical_compare(&xs[0], &xs[0] + n,
|
||||
&ys[0], &ys[0] + m);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
BOOST_HANA_NAMESPACE_END
|
||||
|
||||
@@ -31,13 +31,6 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <utility>
|
||||
|
||||
|
||||
#ifdef BOOST_HANA_CONFIG_HAS_NO_STD_TUPLE_ADAPTER
|
||||
# error The adapter for std::tuple is not supported with versions of \
|
||||
libc++ prior to the one shipped with Clang 3.7 because of a bug \
|
||||
in the tuple implementation.
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BOOST_HANA_DOXYGEN_INVOKED
|
||||
namespace std {
|
||||
//! @ingroup group-ext-std
|
||||
|
||||
Reference in New Issue
Block a user