summaryrefslogtreecommitdiff
path: root/boost/hana
diff options
context:
space:
mode:
Diffstat (limited to 'boost/hana')
-rw-r--r--boost/hana/basic_tuple.hpp10
-rw-r--r--boost/hana/config.hpp30
-rw-r--r--boost/hana/detail/integral_constant.hpp4
-rw-r--r--boost/hana/detail/preprocessor.hpp5
-rw-r--r--boost/hana/detail/struct_macros.hpp35
-rw-r--r--boost/hana/detail/variadic/reverse_apply.hpp4
-rw-r--r--boost/hana/experimental/printable.hpp2
-rw-r--r--boost/hana/functional/apply.hpp2
-rw-r--r--boost/hana/functional/curry.hpp4
-rw-r--r--boost/hana/fwd/ap.hpp7
-rw-r--r--boost/hana/fwd/concept/comparable.hpp2
-rw-r--r--boost/hana/fwd/concept/constant.hpp2
-rw-r--r--boost/hana/fwd/concept/metafunction.hpp2
-rw-r--r--boost/hana/fwd/concept/orderable.hpp2
-rw-r--r--boost/hana/pair.hpp4
-rw-r--r--boost/hana/string.hpp2
-rw-r--r--boost/hana/tuple.hpp10
-rw-r--r--boost/hana/version.hpp2
18 files changed, 108 insertions, 21 deletions
diff --git a/boost/hana/basic_tuple.hpp b/boost/hana/basic_tuple.hpp
index 3e624694e0..c384c3a235 100644
--- a/boost/hana/basic_tuple.hpp
+++ b/boost/hana/basic_tuple.hpp
@@ -42,10 +42,18 @@ BOOST_HANA_NAMESPACE_BEGIN
struct from_other { };
template <typename Indices, typename ...Xn>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) basic_tuple_impl;
+#else
struct basic_tuple_impl;
+#endif
template <std::size_t ...n, typename ...Xn>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) basic_tuple_impl<std::index_sequence<n...>, Xn...>
+#else
struct basic_tuple_impl<std::index_sequence<n...>, Xn...>
+#endif
: detail::ebo<bti<n>, Xn>...
{
static constexpr std::size_t size_ = sizeof...(Xn);
@@ -193,7 +201,7 @@ BOOST_HANA_NAMESPACE_BEGIN
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
+ (N::value < len) ? len - N::value : 0
>{});
}
};
diff --git a/boost/hana/config.hpp b/boost/hana/config.hpp
index 35e97a0a50..96c13de692 100644
--- a/boost/hana/config.hpp
+++ b/boost/hana/config.hpp
@@ -20,7 +20,29 @@ Distributed under the Boost Software License, Version 1.0.
#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.
-# pragma message("Warning: the native Microsoft compiler is not supported due to lack of proper C++14 support.")
+
+# 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)
@@ -40,7 +62,7 @@ Distributed under the Boost Software License, Version 1.0.
# if __apple_build_version__ >= 6020049
# define BOOST_HANA_CONFIG_CLANG BOOST_HANA_CONFIG_VERSION(3, 6, 0)
# else
-# warning "Versions of Apple's Clang prior to the one shipped with Xcode 6.3 are not supported by Hana."
+# warning "Versions of Apple's Clang prior to the one shipped with Xcode 6.3 are known not to be able to compile Hana."
# endif
#elif defined(__clang__) // genuine Clang
@@ -72,7 +94,9 @@ Distributed under the Boost Software License, Version 1.0.
//////////////////////////////////////////////////////////////////////////////
#if (__cplusplus < 201400)
# if defined(_MSC_VER)
-# 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'.")
+# 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
diff --git a/boost/hana/detail/integral_constant.hpp b/boost/hana/detail/integral_constant.hpp
index 6fa7735164..72a40dacae 100644
--- a/boost/hana/detail/integral_constant.hpp
+++ b/boost/hana/detail/integral_constant.hpp
@@ -231,7 +231,11 @@ BOOST_HANA_NAMESPACE_BEGIN
};
#else
template <typename T, T v>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) integral_constant
+#else
struct integral_constant
+#endif
: std::integral_constant<T, v>
, detail::operators::adl<integral_constant<T, v>>
{
diff --git a/boost/hana/detail/preprocessor.hpp b/boost/hana/detail/preprocessor.hpp
index 6a141187e7..4487ad8daf 100644
--- a/boost/hana/detail/preprocessor.hpp
+++ b/boost/hana/detail/preprocessor.hpp
@@ -22,7 +22,12 @@ Distributed under the Boost Software License, Version 1.0.
//! @ingroup group-details
//! Expands to its first argument.
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_PP_FRONT(...) BOOST_HANA_PP_FRONT_IMPL_I(__VA_ARGS__)
+#define BOOST_HANA_PP_FRONT_IMPL_I(...) BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_FRONT_IMPL(__VA_ARGS__, ),)
+#else
#define BOOST_HANA_PP_FRONT(...) BOOST_HANA_PP_FRONT_IMPL(__VA_ARGS__, )
+#endif
#define BOOST_HANA_PP_FRONT_IMPL(e0, ...) e0
//! @ingroup group-details
diff --git a/boost/hana/detail/struct_macros.hpp b/boost/hana/detail/struct_macros.hpp
index e99ab4fac8..8298de67d6 100644
--- a/boost/hana/detail/struct_macros.hpp
+++ b/boost/hana/detail/struct_macros.hpp
@@ -67,8 +67,13 @@ BOOST_HANA_NAMESPACE_BEGIN namespace struct_detail {
//!
//! Specifically, `BOOST_HANA_PP_NARG(x1, ..., xn)` expands to `n`. It is
//! an error to call this macro with 0 arguments.
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_PP_NARG(...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_NARG_IMPL(__VA_ARGS__, 40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,),)
+#else
#define BOOST_HANA_PP_NARG(...) \
BOOST_HANA_PP_NARG_IMPL(__VA_ARGS__, 40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,)
+#endif
#define BOOST_HANA_PP_NARG_IMPL(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20,e21,e22,e23,e24,e25,e26,e27,e28,e29,e30,e31,e32,e33,e34,e35,e36,e37,e38,e39,e40, N, ...) N
@@ -80,8 +85,14 @@ BOOST_HANA_NAMESPACE_BEGIN namespace struct_detail {
#define BOOST_HANA_PP_BACK(...) \
BOOST_HANA_PP_BACK_IMPL(BOOST_HANA_PP_NARG(__VA_ARGS__), __VA_ARGS__)
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_PP_BACK_IMPL(N, ...) BOOST_HANA_PP_BACK_IMPL_I(N, __VA_ARGS__)
+#define BOOST_HANA_PP_BACK_IMPL_I(N, ...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_BACK_IMPL_, N)(__VA_ARGS__),)
+#else
#define BOOST_HANA_PP_BACK_IMPL(N, ...) \
BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_BACK_IMPL_, N)(__VA_ARGS__)
+#endif
#define BOOST_HANA_PP_BACK_IMPL_1(e1) e1
@@ -173,8 +184,14 @@ BOOST_HANA_NAMESPACE_BEGIN namespace struct_detail {
#define BOOST_HANA_PP_DROP_BACK(...) \
BOOST_HANA_PP_DROP_BACK_IMPL(BOOST_HANA_PP_NARG(__VA_ARGS__), __VA_ARGS__)
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_PP_DROP_BACK_IMPL(N, ...) BOOST_HANA_PP_DROP_BACK_IMPL_I(N, __VA_ARGS__)
+#define BOOST_HANA_PP_DROP_BACK_IMPL_I(N, ...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_DROP_BACK_IMPL_, N)(__VA_ARGS__),)
+#else
#define BOOST_HANA_PP_DROP_BACK_IMPL(N, ...) \
BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_DROP_BACK_IMPL_, N)(__VA_ARGS__)
+#endif
#define BOOST_HANA_PP_DROP_BACK_IMPL_1(e1)
@@ -271,8 +288,14 @@ struct BOOST_HANA_ADAPT_STRUCT_must_be_called_in_the_global_namespace;
static_assert(true, "force the usage of a trailing semicolon") \
/**/
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_ADAPT_STRUCT_IMPL(N, ...) BOOST_HANA_ADAPT_STRUCT_IMPL_I(N, __VA_ARGS__)
+#define BOOST_HANA_ADAPT_STRUCT_IMPL_I(N, ...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_CONCAT(BOOST_HANA_ADAPT_STRUCT_IMPL_, N)(__VA_ARGS__),)
+#else
#define BOOST_HANA_ADAPT_STRUCT_IMPL(N, ...) \
BOOST_HANA_PP_CONCAT(BOOST_HANA_ADAPT_STRUCT_IMPL_, N)(__VA_ARGS__)
+#endif
#define BOOST_HANA_ADAPT_STRUCT_IMPL_1(TYPE ) \
@@ -1109,8 +1132,14 @@ struct BOOST_HANA_ADAPT_ADT_must_be_called_in_the_global_namespace;
static_assert(true, "force the usage of a trailing semicolon") \
/**/
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_ADAPT_ADT_IMPL(N, ...) BOOST_HANA_ADAPT_ADT_IMPL_I(N, __VA_ARGS__)
+#define BOOST_HANA_ADAPT_ADT_IMPL_I(N, ...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_CONCAT(BOOST_HANA_ADAPT_ADT_IMPL_, N)(__VA_ARGS__),)
+#else
#define BOOST_HANA_ADAPT_ADT_IMPL(N, ...) \
BOOST_HANA_PP_CONCAT(BOOST_HANA_ADAPT_ADT_IMPL_, N)(__VA_ARGS__)
+#endif
#define BOOST_HANA_ADAPT_ADT_IMPL_1(TYPE ) \
@@ -1981,8 +2010,14 @@ struct BOOST_HANA_ADAPT_ADT_must_be_called_in_the_global_namespace;
#define BOOST_HANA_DEFINE_STRUCT(...) \
BOOST_HANA_DEFINE_STRUCT_IMPL(BOOST_HANA_PP_NARG(__VA_ARGS__), __VA_ARGS__)
+#ifdef BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
+#define BOOST_HANA_DEFINE_STRUCT_IMPL(N, ...) BOOST_HANA_DEFINE_STRUCT_IMPL_I(N, __VA_ARGS__)
+#define BOOST_HANA_DEFINE_STRUCT_IMPL_I(N, ...) \
+ BOOST_HANA_PP_CONCAT(BOOST_HANA_PP_CONCAT(BOOST_HANA_DEFINE_STRUCT_IMPL_, N)(__VA_ARGS__),)
+#else
#define BOOST_HANA_DEFINE_STRUCT_IMPL(N, ...) \
BOOST_HANA_PP_CONCAT(BOOST_HANA_DEFINE_STRUCT_IMPL_, N)(__VA_ARGS__)
+#endif
#define BOOST_HANA_DEFINE_STRUCT_IMPL_1(TYPE ) \
diff --git a/boost/hana/detail/variadic/reverse_apply.hpp b/boost/hana/detail/variadic/reverse_apply.hpp
index b276fa4177..a1f71ff53c 100644
--- a/boost/hana/detail/variadic/reverse_apply.hpp
+++ b/boost/hana/detail/variadic/reverse_apply.hpp
@@ -18,8 +18,8 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace variadic {
BOOST_HANA_CONSTEXPR_LAMBDA auto reverse_apply =
[](auto&& f, auto&& ...x) -> decltype(auto) {
return detail::variadic::reverse_apply_unrolled(
- static_cast<decltype(f)&&>(f),
- static_cast<decltype(x)&&>(x)...
+ static_cast<decltype(f)>(f),
+ static_cast<decltype(x)>(x)...
);
};
}} BOOST_HANA_NAMESPACE_END
diff --git a/boost/hana/experimental/printable.hpp b/boost/hana/experimental/printable.hpp
index f41d3fd906..637ebe6927 100644
--- a/boost/hana/experimental/printable.hpp
+++ b/boost/hana/experimental/printable.hpp
@@ -98,7 +98,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace experimental {
};
namespace print_detail {
- std::string strip_type_junk(std::string const& str) {
+ inline std::string strip_type_junk(std::string const& str) {
return std::regex_replace(str, std::regex("(?:struct )?([a-z_]+::)*([a-z_]*)_t<((?:struct )?[a-z:<>_]*)>"), "$2<$3>");
}
}
diff --git a/boost/hana/functional/apply.hpp b/boost/hana/functional/apply.hpp
index 8a47a873e6..d705767e19 100644
--- a/boost/hana/functional/apply.hpp
+++ b/boost/hana/functional/apply.hpp
@@ -35,7 +35,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @include example/functional/apply.cpp
//!
//! [1]: http://en.cppreference.com/w/cpp/utility/functional/invoke
- //! [2]: http://en.cppreference.com/w/cpp/concept/Callable
+ //! [2]: http://en.cppreference.com/w/cpp/named_req/Callable
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto apply = [](auto&& f, auto&& ...x) -> decltype(auto) {
return forwarded(f)(forwarded(x)...);
diff --git a/boost/hana/functional/curry.hpp b/boost/hana/functional/curry.hpp
index 74ec09459a..762718c208 100644
--- a/boost/hana/functional/curry.hpp
+++ b/boost/hana/functional/curry.hpp
@@ -111,13 +111,13 @@ BOOST_HANA_NAMESPACE_BEGIN
template <std::size_t n>
constexpr make_curry_t<n> curry{};
- namespace curry_detail {
+ namespace curry_detail { namespace {
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 {
diff --git a/boost/hana/fwd/ap.hpp b/boost/hana/fwd/ap.hpp
index 6f7b147090..271a1631d1 100644
--- a/boost/hana/fwd/ap.hpp
+++ b/boost/hana/fwd/ap.hpp
@@ -29,11 +29,10 @@ BOOST_HANA_NAMESPACE_BEGIN
//! number of `x...` must match the arity of the functions in the `f`
//! structure. In other words, `ap(f, x1, ..., xN)` is equivalent to
//! @code
- //! ((f' <ap> x1) <ap> x2) ... <ap> xN
+ //! ((curry(f) ap x1) ap x2) ... ap xN
//! @endcode
- //! where `f'` is `f` but containing curried functions instead and
- //! `x <ap> y` is just `ap(x, y)` written in infix notation to emphasize
- //! the left associativity.
+ //! where `x ap y` is just `ap(x, y)` written in infix notation to
+ //! emphasize the left associativity.
//!
//!
//! Signature
diff --git a/boost/hana/fwd/concept/comparable.hpp b/boost/hana/fwd/concept/comparable.hpp
index 9624c87038..db1b45d947 100644
--- a/boost/hana/fwd/concept/comparable.hpp
+++ b/boost/hana/fwd/concept/comparable.hpp
@@ -151,7 +151,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//!
//! [1]: http://en.wikipedia.org/wiki/Equivalence_relation#Definition
//! [2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3351.pdf
- //! [3]: http://en.cppreference.com/w/cpp/concept/EqualityComparable
+ //! [3]: http://en.cppreference.com/w/cpp/named_req/EqualityComparable
//! [4]: http://en.wikipedia.org/wiki/Injective_function
template <typename T>
struct Comparable;
diff --git a/boost/hana/fwd/concept/constant.hpp b/boost/hana/fwd/concept/constant.hpp
index bab44a7cb2..4a4799ac6e 100644
--- a/boost/hana/fwd/concept/constant.hpp
+++ b/boost/hana/fwd/concept/constant.hpp
@@ -202,7 +202,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! reasons as explained above, this common type is still provided.
//!
//!
- //! [1]: http://en.cppreference.com/w/cpp/concept/LiteralType
+ //! [1]: http://en.cppreference.com/w/cpp/named_req/LiteralType
template <typename C>
struct Constant;
BOOST_HANA_NAMESPACE_END
diff --git a/boost/hana/fwd/concept/metafunction.hpp b/boost/hana/fwd/concept/metafunction.hpp
index 72884911f3..a480c0b1d4 100644
--- a/boost/hana/fwd/concept/metafunction.hpp
+++ b/boost/hana/fwd/concept/metafunction.hpp
@@ -90,7 +90,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! deep comparison. Hence, we adopt a conservative stance and avoid
//! providing comparison for `Metafunction`s.
//!
- //! [1]: http://en.cppreference.com/w/cpp/concept/FunctionObject
+ //! [1]: http://en.cppreference.com/w/cpp/named_req/FunctionObject
//! [2]: http://www.boost.org/doc/libs/release/libs/mpl/doc/refmanual/metafunction-class.html
template <typename F>
struct Metafunction;
diff --git a/boost/hana/fwd/concept/orderable.hpp b/boost/hana/fwd/concept/orderable.hpp
index 7c4cf233db..e7730ee299 100644
--- a/boost/hana/fwd/concept/orderable.hpp
+++ b/boost/hana/fwd/concept/orderable.hpp
@@ -177,7 +177,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//!
//!
//! [1]: http://en.wikipedia.org/wiki/Total_order
- //! [2]: http://en.cppreference.com/w/cpp/concept/LessThanComparable
+ //! [2]: http://en.cppreference.com/w/cpp/named_req/LessThanComparable
//! [3]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3351.pdf
//! [4]: http://en.wikipedia.org/wiki/Strict_weak_ordering
template <typename Ord>
diff --git a/boost/hana/pair.hpp b/boost/hana/pair.hpp
index 35ff857269..d88b8ad8d4 100644
--- a/boost/hana/pair.hpp
+++ b/boost/hana/pair.hpp
@@ -37,7 +37,11 @@ BOOST_HANA_NAMESPACE_BEGIN
//////////////////////////////////////////////////////////////////////////
//! @cond
template <typename First, typename Second>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) pair : detail::operators::adl<pair<First, Second>>
+#else
struct pair : detail::operators::adl<pair<First, Second>>
+#endif
, private detail::ebo<detail::pix<0>, First>
, private detail::ebo<detail::pix<1>, Second>
{
diff --git a/boost/hana/string.hpp b/boost/hana/string.hpp
index a7b83dee86..aea19bd2ed 100644
--- a/boost/hana/string.hpp
+++ b/boost/hana/string.hpp
@@ -271,7 +271,7 @@ BOOST_HANA_NAMESPACE_BEGIN
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
+ (N::value < sizeof...(xs)) ? sizeof...(xs) - N::value : 0
>{});
}
diff --git a/boost/hana/tuple.hpp b/boost/hana/tuple.hpp
index ae3cba819d..a81ab9da69 100644
--- a/boost/hana/tuple.hpp
+++ b/boost/hana/tuple.hpp
@@ -75,7 +75,11 @@ BOOST_HANA_NAMESPACE_BEGIN
// tuple
//////////////////////////////////////////////////////////////////////////
template <>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) tuple<> final
+#else
struct tuple<> final
+#endif
: detail::operators::adl<tuple<>>
, detail::iterable_operators<tuple<>>
{
@@ -84,7 +88,11 @@ BOOST_HANA_NAMESPACE_BEGIN
};
template <typename ...Xn>
+#ifdef BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
+ struct __declspec(empty_bases) tuple final
+#else
struct tuple final
+#endif
: detail::operators::adl<tuple<Xn...>>
, detail::iterable_operators<tuple<Xn...>>
{
@@ -256,7 +264,7 @@ BOOST_HANA_NAMESPACE_BEGIN
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
+ (N::value < len) ? len - N::value : 0
>{});
}
};
diff --git a/boost/hana/version.hpp b/boost/hana/version.hpp
index c3a5b3982d..af8daac64d 100644
--- a/boost/hana/version.hpp
+++ b/boost/hana/version.hpp
@@ -24,7 +24,7 @@ Distributed under the Boost Software License, Version 1.0.
//! @ingroup group-config
//! Macro expanding to the minor version of the library, i.e. the `y` in `x.y.z`.
-#define BOOST_HANA_MINOR_VERSION 5
+#define BOOST_HANA_MINOR_VERSION 6
//! @ingroup group-config
//! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`.