diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:08:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:09:00 +0900 |
commit | b5c87084afaef42b2d058f68091be31988a6a874 (patch) | |
tree | adef9a65870a41181687e11d57fdf98e7629de3c /boost/hana | |
parent | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (diff) | |
download | boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.gz boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.bz2 boost-b5c87084afaef42b2d058f68091be31988a6a874.zip |
Imported Upstream version 1.64.0upstream/1.64.0
Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/hana')
444 files changed, 972 insertions, 696 deletions
diff --git a/boost/hana/accessors.hpp b/boost/hana/accessors.hpp index 06cd46b59d..28204b6e31 100644 --- a/boost/hana/accessors.hpp +++ b/boost/hana/accessors.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::accessors`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/adapt_adt.hpp b/boost/hana/adapt_adt.hpp index 46d39eeefc..0bf73467ac 100644 --- a/boost/hana/adapt_adt.hpp +++ b/boost/hana/adapt_adt.hpp @@ -2,7 +2,7 @@ @file Defines the `BOOST_HANA_ADAPT_ADT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/adapt_struct.hpp b/boost/hana/adapt_struct.hpp index 85aa2f7f53..c156f44d40 100644 --- a/boost/hana/adapt_struct.hpp +++ b/boost/hana/adapt_struct.hpp @@ -2,7 +2,7 @@ @file Defines the `BOOST_HANA_ADAPT_STRUCT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/adjust.hpp b/boost/hana/adjust.hpp index c5e2c7d3f5..e8bab2cac3 100644 --- a/boost/hana/adjust.hpp +++ b/boost/hana/adjust.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::adjust`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/adjust_if.hpp b/boost/hana/adjust_if.hpp index 6c1e4786fd..8669009a9a 100644 --- a/boost/hana/adjust_if.hpp +++ b/boost/hana/adjust_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::adjust_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/all.hpp b/boost/hana/all.hpp index 84912928e9..bc952c986f 100644 --- a/boost/hana/all.hpp +++ b/boost/hana/all.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::all`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/all_of.hpp b/boost/hana/all_of.hpp index ade2624d9e..5aff4a01e7 100644 --- a/boost/hana/all_of.hpp +++ b/boost/hana/all_of.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::all_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/and.hpp b/boost/hana/and.hpp index a883ac9bad..df460d32a6 100644 --- a/boost/hana/and.hpp +++ b/boost/hana/and.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::and_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/any.hpp b/boost/hana/any.hpp index 48670fb50b..9141a758df 100644 --- a/boost/hana/any.hpp +++ b/boost/hana/any.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::any`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/any_of.hpp b/boost/hana/any_of.hpp index 1dd1cde9be..59c130e54d 100644 --- a/boost/hana/any_of.hpp +++ b/boost/hana/any_of.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::any_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -62,12 +62,12 @@ BOOST_HANA_NAMESPACE_BEGIN 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)); + : any_of_impl::any_of_helper<k + 1, Len>::apply( + hana::if_(pred(hana::at_c<k>(xs)), hana::true_c, hana::false_c), + static_cast<Xs&&>(xs), + static_cast<Pred&&>(pred) + ); } template <typename Xs, typename Pred> @@ -108,13 +108,14 @@ BOOST_HANA_NAMESPACE_BEGIN >> { 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)); + : lazy_any_of_helper(hana::bool_<done>{}, + hana::if_(pred(hana::front(xs)), hana::true_{}, hana::false_{}), + static_cast<decltype(tail)&&>(tail), + static_cast<Pred&&>(pred) + ); } template <typename Xs, typename Pred> @@ -123,11 +124,12 @@ BOOST_HANA_NAMESPACE_BEGIN 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)); + return lazy_any_of_helper(hana::bool_c<done>, + hana::if_(pred(hana::front(xs)), hana::true_c, hana::false_c), + hana::drop_front(static_cast<Xs&&>(xs)), + static_cast<Pred&&>(pred) + ); } template <typename Cond, typename Xs, typename Pred> diff --git a/boost/hana/ap.hpp b/boost/hana/ap.hpp index a344244090..a96f7d1aa7 100644 --- a/boost/hana/ap.hpp +++ b/boost/hana/ap.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::ap`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/append.hpp b/boost/hana/append.hpp index 6c4cf4d02f..951f24d35e 100644 --- a/boost/hana/append.hpp +++ b/boost/hana/append.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::append`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/assert.hpp b/boost/hana/assert.hpp index c529770474..e746910515 100644 --- a/boost/hana/assert.hpp +++ b/boost/hana/assert.hpp @@ -2,7 +2,7 @@ @file Defines macros to perform different kinds of assertions. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/at.hpp b/boost/hana/at.hpp index 86cab698c4..c3f158b0ff 100644 --- a/boost/hana/at.hpp +++ b/boost/hana/at.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::at` and `boost::hana::at_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/at_key.hpp b/boost/hana/at_key.hpp index af8d5a603a..74d45d6d56 100644 --- a/boost/hana/at_key.hpp +++ b/boost/hana/at_key.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::at_key`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/back.hpp b/boost/hana/back.hpp index 76efcf7717..4fed83f032 100644 --- a/boost/hana/back.hpp +++ b/boost/hana/back.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/basic_tuple.hpp b/boost/hana/basic_tuple.hpp index 8651e464bf..dbc762fb1b 100644 --- a/boost/hana/basic_tuple.hpp +++ b/boost/hana/basic_tuple.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::basic_tuple`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0. #include <boost/hana/config.hpp> #include <boost/hana/detail/decay.hpp> -#include <boost/hana/detail/intrinsics.hpp> +#include <boost/hana/detail/ebo.hpp> #include <boost/hana/fwd/at.hpp> #include <boost/hana/fwd/bool.hpp> #include <boost/hana/fwd/concept/sequence.hpp> @@ -38,79 +38,10 @@ Distributed under the Boost Software License, Version 1.0. BOOST_HANA_NAMESPACE_BEGIN namespace detail { ////////////////////////////////////////////////////////////////////// - // elt<n, Xn> - // - // `elt` stands for `tuple_element`; the name is compressed to reduce - // symbol lengths. - // - // Wrapper holding the actual elements of a tuple. It takes care of - // optimizing the storage for empty types. - // - // When available, we use compiler intrinsics to reduce the number - // of instantiations. - ////////////////////////////////////////////////////////////////////// - template <std::size_t n, typename Xn, bool = - BOOST_HANA_TT_IS_EMPTY(Xn) && !BOOST_HANA_TT_IS_FINAL(Xn) - > - struct elt; - - // Specialize storage for empty types - 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)) - { } - }; - - // Specialize storage for non-empty types - 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_; - }; - } - - ////////////////////////////////////////////////////////////////////////// - // get_impl - ////////////////////////////////////////////////////////////////////////// - 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 { - ////////////////////////////////////////////////////////////////////// // basic_tuple_impl<n, Xn> ////////////////////////////////////////////////////////////////////// + template <std::size_t> struct bti; // basic_tuple_index + struct from_other { }; template <typename Indices, typename ...Xn> @@ -118,7 +49,7 @@ BOOST_HANA_NAMESPACE_BEGIN template <std::size_t ...n, typename ...Xn> struct basic_tuple_impl<std::index_sequence<n...>, Xn...> - : detail::elt<n, Xn>... + : detail::ebo<bti<n>, Xn>... { static constexpr std::size_t size_ = sizeof...(Xn); @@ -126,12 +57,12 @@ BOOST_HANA_NAMESPACE_BEGIN template <typename Other> explicit constexpr basic_tuple_impl(detail::from_other, Other&& other) - : detail::elt<n, Xn>(get_impl<n>(static_cast<Other&&>(other)))... + : detail::ebo<bti<n>, Xn>(detail::ebo_get<bti<n>>(static_cast<Other&&>(other)))... { } template <typename ...Yn> explicit constexpr basic_tuple_impl(Yn&& ...yn) - : detail::elt<n, Xn>(static_cast<Yn&&>(yn))... + : detail::ebo<bti<n>, Xn>(static_cast<Yn&&>(yn))... { } }; } @@ -177,7 +108,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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))... + detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn> const&>(xs) + )... ); } @@ -185,7 +118,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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))... + detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn>&>(xs) + )... ); } @@ -193,7 +128,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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))... + detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn>&&>(xs) + )... ); } }; @@ -207,7 +144,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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)))... + f(detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn> const&>(xs) + ))... ); } @@ -215,7 +154,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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)))... + f(detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn>&>(xs) + ))... ); } @@ -223,7 +164,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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)))... + f(detail::ebo_get<detail::bti<i>>( + static_cast<detail::ebo<detail::bti<i>, Xn>&&>(xs) + ))... ); } }; @@ -236,7 +179,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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)); + return detail::ebo_get<detail::bti<index>>(static_cast<Xs&&>(xs)); } }; @@ -244,7 +187,9 @@ BOOST_HANA_NAMESPACE_BEGIN 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))...); + return hana::make_basic_tuple( + detail::ebo_get<detail::bti<i+N>>(static_cast<Xs&&>(xs))... + ); } template <typename Xs, typename N> @@ -264,6 +209,22 @@ BOOST_HANA_NAMESPACE_BEGIN { return {}; } }; + // compile-time optimizations (to reduce the # of function instantiations) + template <std::size_t n, typename ...Xs> + constexpr decltype(auto) at_c(basic_tuple<Xs...> const& xs) { + return detail::ebo_get<detail::bti<n>>(xs); + } + + template <std::size_t n, typename ...Xs> + constexpr decltype(auto) at_c(basic_tuple<Xs...>& xs) { + return detail::ebo_get<detail::bti<n>>(xs); + } + + template <std::size_t n, typename ...Xs> + constexpr decltype(auto) at_c(basic_tuple<Xs...>&& xs) { + return detail::ebo_get<detail::bti<n>>(static_cast<basic_tuple<Xs...>&&>(xs)); + } + ////////////////////////////////////////////////////////////////////////// // Sequence ////////////////////////////////////////////////////////////////////////// diff --git a/boost/hana/bool.hpp b/boost/hana/bool.hpp index 7ba1bfcb6c..0f62560a5a 100644 --- a/boost/hana/bool.hpp +++ b/boost/hana/bool.hpp @@ -2,7 +2,7 @@ @file Defines the `Logical` and `Comparable` models of `boost::hana::integral_constant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/cartesian_product.hpp b/boost/hana/cartesian_product.hpp index 2303aa1332..eaf8bb4d9a 100644 --- a/boost/hana/cartesian_product.hpp +++ b/boost/hana/cartesian_product.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::cartesian_product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/chain.hpp b/boost/hana/chain.hpp index da9de375f2..ab889d186a 100644 --- a/boost/hana/chain.hpp +++ b/boost/hana/chain.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::chain`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/comparing.hpp b/boost/hana/comparing.hpp index beae9cbda0..4aaa546d4c 100644 --- a/boost/hana/comparing.hpp +++ b/boost/hana/comparing.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::comparing`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concat.hpp b/boost/hana/concat.hpp index 8f079992b5..27f2ad0bf2 100644 --- a/boost/hana/concat.hpp +++ b/boost/hana/concat.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::concat`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept.hpp b/boost/hana/concept.hpp index 0ae73d8b7b..6046b0a4ef 100644 --- a/boost/hana/concept.hpp +++ b/boost/hana/concept.hpp @@ -2,7 +2,7 @@ @file Master header for the `boost/hana/concept/` subdirectory. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/applicative.hpp b/boost/hana/concept/applicative.hpp index 9227b1d1d1..84b92927eb 100644 --- a/boost/hana/concept/applicative.hpp +++ b/boost/hana/concept/applicative.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Applicative`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/comonad.hpp b/boost/hana/concept/comonad.hpp index 5d3a49a4e8..6cf950590f 100644 --- a/boost/hana/concept/comonad.hpp +++ b/boost/hana/concept/comonad.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Comonad`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/comparable.hpp b/boost/hana/concept/comparable.hpp index 96c28be7e9..bcecfcd0ab 100644 --- a/boost/hana/concept/comparable.hpp +++ b/boost/hana/concept/comparable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Comparable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/constant.hpp b/boost/hana/concept/constant.hpp index 08e5db248f..5e549ddf76 100644 --- a/boost/hana/concept/constant.hpp +++ b/boost/hana/concept/constant.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Constant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/euclidean_ring.hpp b/boost/hana/concept/euclidean_ring.hpp index c58cb9fc45..e0de0477b0 100644 --- a/boost/hana/concept/euclidean_ring.hpp +++ b/boost/hana/concept/euclidean_ring.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::EuclideanRing`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/foldable.hpp b/boost/hana/concept/foldable.hpp index 5efd153c2f..6d88b58285 100644 --- a/boost/hana/concept/foldable.hpp +++ b/boost/hana/concept/foldable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Foldable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/functor.hpp b/boost/hana/concept/functor.hpp index 1a84126f6f..4fe7428b32 100644 --- a/boost/hana/concept/functor.hpp +++ b/boost/hana/concept/functor.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Functor`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/group.hpp b/boost/hana/concept/group.hpp index 5c8c34edf5..2b16728b4f 100644 --- a/boost/hana/concept/group.hpp +++ b/boost/hana/concept/group.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Group`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/integral_constant.hpp b/boost/hana/concept/integral_constant.hpp index 599adf5bef..cfb761da9b 100644 --- a/boost/hana/concept/integral_constant.hpp +++ b/boost/hana/concept/integral_constant.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::IntegralConstant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/iterable.hpp b/boost/hana/concept/iterable.hpp index 9cf68b7b43..2949f70b2b 100644 --- a/boost/hana/concept/iterable.hpp +++ b/boost/hana/concept/iterable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Iterable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/logical.hpp b/boost/hana/concept/logical.hpp index ecfd0a4ebe..69e3079065 100644 --- a/boost/hana/concept/logical.hpp +++ b/boost/hana/concept/logical.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Logical`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/metafunction.hpp b/boost/hana/concept/metafunction.hpp index 61713e2b2e..70a9b0092a 100644 --- a/boost/hana/concept/metafunction.hpp +++ b/boost/hana/concept/metafunction.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Metafunction`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/monad.hpp b/boost/hana/concept/monad.hpp index e586192b4a..85fa06f9c3 100644 --- a/boost/hana/concept/monad.hpp +++ b/boost/hana/concept/monad.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Monad`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/monad_plus.hpp b/boost/hana/concept/monad_plus.hpp index c561e5af82..e9f2f1bf09 100644 --- a/boost/hana/concept/monad_plus.hpp +++ b/boost/hana/concept/monad_plus.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::MonadPlus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/monoid.hpp b/boost/hana/concept/monoid.hpp index 024ce4fe28..adda475a26 100644 --- a/boost/hana/concept/monoid.hpp +++ b/boost/hana/concept/monoid.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Monoid`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/orderable.hpp b/boost/hana/concept/orderable.hpp index 1e9303d204..dfa82655fc 100644 --- a/boost/hana/concept/orderable.hpp +++ b/boost/hana/concept/orderable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Orderable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/product.hpp b/boost/hana/concept/product.hpp index 3ad8a70f2b..b1292ba156 100644 --- a/boost/hana/concept/product.hpp +++ b/boost/hana/concept/product.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/ring.hpp b/boost/hana/concept/ring.hpp index 700b3f6bb8..a9598e8fb3 100644 --- a/boost/hana/concept/ring.hpp +++ b/boost/hana/concept/ring.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Ring`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/searchable.hpp b/boost/hana/concept/searchable.hpp index 0ee98907bf..65b161de73 100644 --- a/boost/hana/concept/searchable.hpp +++ b/boost/hana/concept/searchable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Searchable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/sequence.hpp b/boost/hana/concept/sequence.hpp index fb5b83a2de..83e4b42d3d 100644 --- a/boost/hana/concept/sequence.hpp +++ b/boost/hana/concept/sequence.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Sequence`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/concept/struct.hpp b/boost/hana/concept/struct.hpp index 62183f44f6..49ac53b59c 100644 --- a/boost/hana/concept/struct.hpp +++ b/boost/hana/concept/struct.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::Struct`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/config.hpp b/boost/hana/config.hpp index de7d1dc794..6cf6ace710 100644 --- a/boost/hana/config.hpp +++ b/boost/hana/config.hpp @@ -2,7 +2,7 @@ @file Defines configuration macros used throughout the library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/contains.hpp b/boost/hana/contains.hpp index 8b8599d8f3..5e18a388dc 100644 --- a/boost/hana/contains.hpp +++ b/boost/hana/contains.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::contains` and `boost::hana::in`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core.hpp b/boost/hana/core.hpp index d028ff15ed..fa280f3336 100644 --- a/boost/hana/core.hpp +++ b/boost/hana/core.hpp @@ -2,7 +2,7 @@ @file Defines the @ref group-core module. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/common.hpp b/boost/hana/core/common.hpp index 471110ac68..c32de77feb 100644 --- a/boost/hana/core/common.hpp +++ b/boost/hana/core/common.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::common` and `boost::hana::common_t`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/default.hpp b/boost/hana/core/default.hpp index a03ffbb79a..45c70503c1 100644 --- a/boost/hana/core/default.hpp +++ b/boost/hana/core/default.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::default_` and `boost::hana::is_default`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/dispatch.hpp b/boost/hana/core/dispatch.hpp index 455766ad41..27a2fb493b 100644 --- a/boost/hana/core/dispatch.hpp +++ b/boost/hana/core/dispatch.hpp @@ -2,7 +2,7 @@ @file Includes all the headers needed to setup tag-dispatching. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/is_a.hpp b/boost/hana/core/is_a.hpp index 91cf45121a..019476ff0a 100644 --- a/boost/hana/core/is_a.hpp +++ b/boost/hana/core/is_a.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::is_a` and `boost::hana::is_an`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/make.hpp b/boost/hana/core/make.hpp index a4856a2ad5..53608df3f5 100644 --- a/boost/hana/core/make.hpp +++ b/boost/hana/core/make.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::make`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/tag_of.hpp b/boost/hana/core/tag_of.hpp index 5e469a3f90..87406521cd 100644 --- a/boost/hana/core/tag_of.hpp +++ b/boost/hana/core/tag_of.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::tag_of` and `boost::hana::tag_of_t`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/to.hpp b/boost/hana/core/to.hpp index 502c438f5c..6a6a115b3a 100644 --- a/boost/hana/core/to.hpp +++ b/boost/hana/core/to.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::to` and related utilities. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/core/when.hpp b/boost/hana/core/when.hpp index 06cb823a7c..0e5ee8e4e0 100644 --- a/boost/hana/core/when.hpp +++ b/boost/hana/core/when.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::when` and `boost::hana::when_valid`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/count.hpp b/boost/hana/count.hpp index cbdd218a46..b912c342db 100644 --- a/boost/hana/count.hpp +++ b/boost/hana/count.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::count`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/count_if.hpp b/boost/hana/count_if.hpp index fca164b687..e9ea4bc9c8 100644 --- a/boost/hana/count_if.hpp +++ b/boost/hana/count_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::count_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/cycle.hpp b/boost/hana/cycle.hpp index b3a2dcd849..c7b7a9ee32 100644 --- a/boost/hana/cycle.hpp +++ b/boost/hana/cycle.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::cycle`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/define_struct.hpp b/boost/hana/define_struct.hpp index 9ba80596a1..04ea728603 100644 --- a/boost/hana/define_struct.hpp +++ b/boost/hana/define_struct.hpp @@ -2,7 +2,7 @@ @file Defines the `BOOST_HANA_DEFINE_STRUCT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/algorithm.hpp b/boost/hana/detail/algorithm.hpp index cf4ead5751..1929847e7a 100644 --- a/boost/hana/detail/algorithm.hpp +++ b/boost/hana/detail/algorithm.hpp @@ -2,7 +2,7 @@ @file Defines several `constexpr` algorithms. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/any_of.hpp b/boost/hana/detail/any_of.hpp index 89c0d6a544..de6b1c6ad2 100644 --- a/boost/hana/detail/any_of.hpp +++ b/boost/hana/detail/any_of.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::any_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/array.hpp b/boost/hana/detail/array.hpp index eaf031da51..8b2c276f5e 100644 --- a/boost/hana/detail/array.hpp +++ b/boost/hana/detail/array.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::array`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/canonical_constant.hpp b/boost/hana/detail/canonical_constant.hpp index 0435ca0b42..07d636fa17 100644 --- a/boost/hana/detail/canonical_constant.hpp +++ b/boost/hana/detail/canonical_constant.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::CanonicalConstant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/concepts.hpp b/boost/hana/detail/concepts.hpp index 6feed772c0..d7b48bc5ec 100644 --- a/boost/hana/detail/concepts.hpp +++ b/boost/hana/detail/concepts.hpp @@ -2,7 +2,7 @@ @file Defines concepts from the Standard library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/create.hpp b/boost/hana/detail/create.hpp index e98537eb44..354e5590ca 100644 --- a/boost/hana/detail/create.hpp +++ b/boost/hana/detail/create.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::create`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/decay.hpp b/boost/hana/detail/decay.hpp index 014981c677..7d8affa0b2 100644 --- a/boost/hana/detail/decay.hpp +++ b/boost/hana/detail/decay.hpp @@ -3,7 +3,7 @@ Defines a replacement for `std::decay`, which is sometimes too slow at compile-time. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/dependent_on.hpp b/boost/hana/detail/dependent_on.hpp deleted file mode 100644 index 97141664b0..0000000000 --- a/boost/hana/detail/dependent_on.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*! -@file -Defines `boost::hana::detail::dependent_on`. - -@copyright Louis Dionne 2013-2016 -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_DETAIL_DEPENDENT_ON_HPP -#define BOOST_HANA_DETAIL_DEPENDENT_ON_HPP - -#include <boost/hana/config.hpp> - - -BOOST_HANA_NAMESPACE_BEGIN 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; -} BOOST_HANA_NAMESPACE_END - -#endif // !BOOST_HANA_DETAIL_DEPENDENT_ON_HPP diff --git a/boost/hana/detail/dispatch_if.hpp b/boost/hana/detail/dispatch_if.hpp index 88073fa7a2..6e95f58878 100644 --- a/boost/hana/detail/dispatch_if.hpp +++ b/boost/hana/detail/dispatch_if.hpp @@ -2,7 +2,7 @@ @file Defines `BOOST_HANA_DISPATCH_IF`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/ebo.hpp b/boost/hana/detail/ebo.hpp new file mode 100644 index 0000000000..01ca009ce2 --- /dev/null +++ b/boost/hana/detail/ebo.hpp @@ -0,0 +1,115 @@ +/*! +@file +Defines `boost::hana::detail::ebo`. + +@copyright Louis Dionne 2013-2016 +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_DETAIL_EBO_HPP +#define BOOST_HANA_DETAIL_EBO_HPP + +#include <boost/hana/config.hpp> +#include <boost/hana/detail/intrinsics.hpp> + + +namespace _hana { + ////////////////////////////////////////////////////////////////////////// + // ebo<K, V> + // + // Building block to implement the Empty Base Optimization (EBO). We + // use a short name and define it in a short namespace to reduce + // symbol lengths, since this type is used as a building block for + // other widely used types such as `hana::pair`. + // + // When available, we use compiler intrinsics to reduce the number + // of instantiations. + // + // `ebo` provides a limited set of constructors to reduce instantiations. + // Also, the constructors are open-ended and they do not check for the + // validity of their arguments, again to reduce compile-time costs. + // Users of `ebo` should make sure that they only try to construct an + // `ebo` from a compatible value. + // + // EBOs can be indexed using an arbitrary type. The recommended usage is + // to define an integrap constant wrapper for the specific container using + // EBO, and then index using that wrapper: + // + // template <int> struct idx; // wrapper for tuple + // template <typename ...T> + // struct tuple : ebo<idx<0>, T0>, ebo<idx<1>, T1>, ... { }; + // + // The reason for defining one wrapper per container is to avoid any issues + // that can arise when using `ebo_get`, which casts to the base class. If + // `tuple` and `pair` are inheritting from `ebo`s with the same indexing + // scheme, trying to use `ebo_get` on a tuple of pairs will trigger an + // ambiguous base class conversion, since both tuple and pair inherit + // from `ebo`s with the same keys. + ////////////////////////////////////////////////////////////////////////// + template <typename K, typename V, bool = + BOOST_HANA_TT_IS_EMPTY(V) && !BOOST_HANA_TT_IS_FINAL(V) + > + struct ebo; + + // Specialize storage for empty types + template <typename K, typename V> + struct ebo<K, V, true> : V { + constexpr ebo() { } + + template <typename T> + explicit constexpr ebo(T&& t) + : V(static_cast<T&&>(t)) + { } + }; + + // Specialize storage for non-empty types + template <typename K, typename V> + struct ebo<K, V, false> { + constexpr ebo() : data_() { } + + template <typename T> + explicit constexpr ebo(T&& t) + : data_(static_cast<T&&>(t)) + { } + + V data_; + }; + + ////////////////////////////////////////////////////////////////////////// + // ebo_get + ////////////////////////////////////////////////////////////////////////// + template <typename K, typename V> + constexpr V const& ebo_get(ebo<K, V, true> const& x) + { return x; } + + template <typename K, typename V> + constexpr V& ebo_get(ebo<K, V, true>& x) + { return x; } + + template <typename K, typename V> + constexpr V&& ebo_get(ebo<K, V, true>&& x) + { return static_cast<V&&>(x); } + + + template <typename K, typename V> + constexpr V const& ebo_get(ebo<K, V, false> const& x) + { return x.data_; } + + template <typename K, typename V> + constexpr V& ebo_get(ebo<K, V, false>& x) + { return x.data_; } + + template <typename K, typename V> + constexpr V&& ebo_get(ebo<K, V, false>&& x) + { return static_cast<V&&>(x.data_); } +} // end namespace _hana + +BOOST_HANA_NAMESPACE_BEGIN + namespace detail { + using ::_hana::ebo; + using ::_hana::ebo_get; + } +BOOST_HANA_NAMESPACE_END + +#endif // !BOOST_HANA_DETAIL_EBO_HPP diff --git a/boost/hana/detail/fast_and.hpp b/boost/hana/detail/fast_and.hpp index a03ab05bcf..a43e3e9c45 100644 --- a/boost/hana/detail/fast_and.hpp +++ b/boost/hana/detail/fast_and.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::fast_and`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/first_unsatisfied_index.hpp b/boost/hana/detail/first_unsatisfied_index.hpp index d4a894e4bd..e42cc598e5 100644 --- a/boost/hana/detail/first_unsatisfied_index.hpp +++ b/boost/hana/detail/first_unsatisfied_index.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::first_unsatisfied_index`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/has_common_embedding.hpp b/boost/hana/detail/has_common_embedding.hpp index d1e8db5861..ffaf6908b8 100644 --- a/boost/hana/detail/has_common_embedding.hpp +++ b/boost/hana/detail/has_common_embedding.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::has_[nontrivial_]common_embedding`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/has_duplicates.hpp b/boost/hana/detail/has_duplicates.hpp index 191f1e744e..ff9f080482 100644 --- a/boost/hana/detail/has_duplicates.hpp +++ b/boost/hana/detail/has_duplicates.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::has_duplicates`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/index_if.hpp b/boost/hana/detail/index_if.hpp index 81f6ea5630..8224f74be8 100644 --- a/boost/hana/detail/index_if.hpp +++ b/boost/hana/detail/index_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::index_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/integral_constant.hpp b/boost/hana/detail/integral_constant.hpp index aded3ba331..6fa7735164 100644 --- a/boost/hana/detail/integral_constant.hpp +++ b/boost/hana/detail/integral_constant.hpp @@ -3,7 +3,7 @@ Defines the barebones `boost::hana::integral_constant` template, but no operations on it. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/intrinsics.hpp b/boost/hana/detail/intrinsics.hpp index 6483f212aa..b3d98654cd 100644 --- a/boost/hana/detail/intrinsics.hpp +++ b/boost/hana/detail/intrinsics.hpp @@ -2,7 +2,7 @@ @file Defines macros for commonly used type traits. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_by.hpp b/boost/hana/detail/nested_by.hpp index 5eabf3528b..6bdfe70c43 100644 --- a/boost/hana/detail/nested_by.hpp +++ b/boost/hana/detail/nested_by.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::nested_by`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_by_fwd.hpp b/boost/hana/detail/nested_by_fwd.hpp index 3ca9dc7058..4e82f64cd6 100644 --- a/boost/hana/detail/nested_by_fwd.hpp +++ b/boost/hana/detail/nested_by_fwd.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::detail::nested_by`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_than.hpp b/boost/hana/detail/nested_than.hpp index fce96eecf0..d4a7c5ffc6 100644 --- a/boost/hana/detail/nested_than.hpp +++ b/boost/hana/detail/nested_than.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::nested_than`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_than_fwd.hpp b/boost/hana/detail/nested_than_fwd.hpp index 5e60d10251..39231050f3 100644 --- a/boost/hana/detail/nested_than_fwd.hpp +++ b/boost/hana/detail/nested_than_fwd.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::detail::nested_than`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_to.hpp b/boost/hana/detail/nested_to.hpp index eee664ca93..2f6154d367 100644 --- a/boost/hana/detail/nested_to.hpp +++ b/boost/hana/detail/nested_to.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::nested_to`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/nested_to_fwd.hpp b/boost/hana/detail/nested_to_fwd.hpp index f21e0b181d..ec3161136c 100644 --- a/boost/hana/detail/nested_to_fwd.hpp +++ b/boost/hana/detail/nested_to_fwd.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::detail::nested_to`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/adl.hpp b/boost/hana/detail/operators/adl.hpp index 22f804bad4..59a81600b6 100644 --- a/boost/hana/detail/operators/adl.hpp +++ b/boost/hana/detail/operators/adl.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::operators::adl`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/arithmetic.hpp b/boost/hana/detail/operators/arithmetic.hpp index d0459115b8..58f432db78 100644 --- a/boost/hana/detail/operators/arithmetic.hpp +++ b/boost/hana/detail/operators/arithmetic.hpp @@ -2,7 +2,7 @@ @file Defines arithmetic operators. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/comparable.hpp b/boost/hana/detail/operators/comparable.hpp index 579245f0f2..0c110fe3a3 100644 --- a/boost/hana/detail/operators/comparable.hpp +++ b/boost/hana/detail/operators/comparable.hpp @@ -2,7 +2,7 @@ @file Defines operators for Comparables. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/iterable.hpp b/boost/hana/detail/operators/iterable.hpp index 95dadeedfe..6dcb6bc25e 100644 --- a/boost/hana/detail/operators/iterable.hpp +++ b/boost/hana/detail/operators/iterable.hpp @@ -2,7 +2,7 @@ @file Defines operators for Iterables. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/logical.hpp b/boost/hana/detail/operators/logical.hpp index 28623df322..4645ca2bb4 100644 --- a/boost/hana/detail/operators/logical.hpp +++ b/boost/hana/detail/operators/logical.hpp @@ -2,7 +2,7 @@ @file Defines logical operators. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/monad.hpp b/boost/hana/detail/operators/monad.hpp index 4cdf76b178..ccc421c56a 100644 --- a/boost/hana/detail/operators/monad.hpp +++ b/boost/hana/detail/operators/monad.hpp @@ -2,7 +2,7 @@ @file Defines operators for Monads. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/orderable.hpp b/boost/hana/detail/operators/orderable.hpp index f60f14bbde..cf46829a04 100644 --- a/boost/hana/detail/operators/orderable.hpp +++ b/boost/hana/detail/operators/orderable.hpp @@ -2,7 +2,7 @@ @file Defines operators for Orderables. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/operators/searchable.hpp b/boost/hana/detail/operators/searchable.hpp index 7b4cc231e7..69d67465da 100644 --- a/boost/hana/detail/operators/searchable.hpp +++ b/boost/hana/detail/operators/searchable.hpp @@ -2,7 +2,7 @@ @file Defines operators for Searchables. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/preprocessor.hpp b/boost/hana/detail/preprocessor.hpp index a0432e8b44..cdeba70444 100644 --- a/boost/hana/detail/preprocessor.hpp +++ b/boost/hana/detail/preprocessor.hpp @@ -2,7 +2,7 @@ @file Defines generally useful preprocessor macros. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/std_common_type.hpp b/boost/hana/detail/std_common_type.hpp index 2eb0d6847e..b5fe6f318e 100644 --- a/boost/hana/detail/std_common_type.hpp +++ b/boost/hana/detail/std_common_type.hpp @@ -2,7 +2,7 @@ @file Defines a SFINAE-friendly version of `std::common_type`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/struct_macros.erb.hpp b/boost/hana/detail/struct_macros.erb.hpp index dfd94b1340..2cdc419593 100644 --- a/boost/hana/detail/struct_macros.erb.hpp +++ b/boost/hana/detail/struct_macros.erb.hpp @@ -23,7 +23,7 @@ Defines the `BOOST_HANA_DEFINE_STRUCT`, `BOOST_HANA_ADAPT_STRUCT`, and `BOOST_HANA_ADAPT_ADT` macros. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/struct_macros.hpp b/boost/hana/detail/struct_macros.hpp index daeeb8a57a..ff361c3570 100644 --- a/boost/hana/detail/struct_macros.hpp +++ b/boost/hana/detail/struct_macros.hpp @@ -7,7 +7,7 @@ Defines the `BOOST_HANA_DEFINE_STRUCT`, `BOOST_HANA_ADAPT_STRUCT`, and `BOOST_HANA_ADAPT_ADT` macros. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/type_at.hpp b/boost/hana/detail/type_at.hpp index 5875483d24..c7b8311f47 100644 --- a/boost/hana/detail/type_at.hpp +++ b/boost/hana/detail/type_at.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::type_at`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/type_foldl1.hpp b/boost/hana/detail/type_foldl1.hpp index 98f2947427..b65e3463fe 100644 --- a/boost/hana/detail/type_foldl1.hpp +++ b/boost/hana/detail/type_foldl1.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::type_foldl1`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/type_foldr1.hpp b/boost/hana/detail/type_foldr1.hpp index 3453d4467b..badf1b03d6 100644 --- a/boost/hana/detail/type_foldr1.hpp +++ b/boost/hana/detail/type_foldr1.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::type_foldr1`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/unpack_flatten.hpp b/boost/hana/detail/unpack_flatten.hpp index f72501a644..0c65e803bb 100644 --- a/boost/hana/detail/unpack_flatten.hpp +++ b/boost/hana/detail/unpack_flatten.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::unpack_flatten`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/at.hpp b/boost/hana/detail/variadic/at.hpp index 705d0e2ccc..9ef9e2944d 100644 --- a/boost/hana/detail/variadic/at.hpp +++ b/boost/hana/detail/variadic/at.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::at`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/drop_into.hpp b/boost/hana/detail/variadic/drop_into.hpp index 9e5a80f5dd..b31d1e98d5 100644 --- a/boost/hana/detail/variadic/drop_into.hpp +++ b/boost/hana/detail/variadic/drop_into.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::drop_into`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/foldl1.hpp b/boost/hana/detail/variadic/foldl1.hpp index ad2946b05f..320755f7c7 100644 --- a/boost/hana/detail/variadic/foldl1.hpp +++ b/boost/hana/detail/variadic/foldl1.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::foldl1`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/foldr1.hpp b/boost/hana/detail/variadic/foldr1.hpp index 88b5c95305..6221451d90 100644 --- a/boost/hana/detail/variadic/foldr1.hpp +++ b/boost/hana/detail/variadic/foldr1.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::foldr1`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/reverse_apply.hpp b/boost/hana/detail/variadic/reverse_apply.hpp index 08444a1035..b276fa4177 100644 --- a/boost/hana/detail/variadic/reverse_apply.hpp +++ b/boost/hana/detail/variadic/reverse_apply.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::reverse_apply`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/reverse_apply/flat.hpp b/boost/hana/detail/variadic/reverse_apply/flat.hpp index 6cd7bed53a..09bc818e6b 100644 --- a/boost/hana/detail/variadic/reverse_apply/flat.hpp +++ b/boost/hana/detail/variadic/reverse_apply/flat.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::reverse_apply_flat`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/reverse_apply/unrolled.hpp b/boost/hana/detail/variadic/reverse_apply/unrolled.hpp index 5cddf3c2c1..e6bf3d0c55 100644 --- a/boost/hana/detail/variadic/reverse_apply/unrolled.hpp +++ b/boost/hana/detail/variadic/reverse_apply/unrolled.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::reverse_apply_unrolled`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/split_at.hpp b/boost/hana/detail/variadic/split_at.hpp index 07e75088a6..c068c1bcb9 100644 --- a/boost/hana/detail/variadic/split_at.hpp +++ b/boost/hana/detail/variadic/split_at.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::split_at`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/variadic/take.hpp b/boost/hana/detail/variadic/take.hpp index 01da4b5b29..4d97a5b853 100644 --- a/boost/hana/detail/variadic/take.hpp +++ b/boost/hana/detail/variadic/take.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::variadic::take`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/void_t.hpp b/boost/hana/detail/void_t.hpp index f8152d378f..9eedd11441 100644 --- a/boost/hana/detail/void_t.hpp +++ b/boost/hana/detail/void_t.hpp @@ -2,7 +2,7 @@ @file Defines an equivalent to the proposed `std::void_t`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/detail/wrong.hpp b/boost/hana/detail/wrong.hpp index 99ca630dd1..ce5544fcdf 100644 --- a/boost/hana/detail/wrong.hpp +++ b/boost/hana/detail/wrong.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::detail::wrong`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/difference.hpp b/boost/hana/difference.hpp index a36223316b..158e727481 100644 --- a/boost/hana/difference.hpp +++ b/boost/hana/difference.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::difference`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/div.hpp b/boost/hana/div.hpp index ff41a36118..5b75ef10be 100644 --- a/boost/hana/div.hpp +++ b/boost/hana/div.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::div`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/drop_back.hpp b/boost/hana/drop_back.hpp index 6869a8b9f9..0e5837584a 100644 --- a/boost/hana/drop_back.hpp +++ b/boost/hana/drop_back.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::drop_back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/drop_front.hpp b/boost/hana/drop_front.hpp index c06fbec593..2fa5ade108 100644 --- a/boost/hana/drop_front.hpp +++ b/boost/hana/drop_front.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::drop_front`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/drop_front_exactly.hpp b/boost/hana/drop_front_exactly.hpp index 61b43c4e2a..a6af69115d 100644 --- a/boost/hana/drop_front_exactly.hpp +++ b/boost/hana/drop_front_exactly.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::drop_front_exactly`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/drop_while.hpp b/boost/hana/drop_while.hpp index 53f58cf26a..b1f921b1d8 100644 --- a/boost/hana/drop_while.hpp +++ b/boost/hana/drop_while.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::drop_while`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/duplicate.hpp b/boost/hana/duplicate.hpp index 1df6fb7a85..783ae05fa0 100644 --- a/boost/hana/duplicate.hpp +++ b/boost/hana/duplicate.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::duplicate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/empty.hpp b/boost/hana/empty.hpp index f20a5e5fff..8cb97a3ebc 100644 --- a/boost/hana/empty.hpp +++ b/boost/hana/empty.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::empty`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/equal.hpp b/boost/hana/equal.hpp index 8eb0912fca..1fa5e8bbe1 100644 --- a/boost/hana/equal.hpp +++ b/boost/hana/equal.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -29,7 +29,6 @@ Distributed under the Boost Software License, Version 1.0. #include <boost/hana/core/tag_of.hpp> #include <boost/hana/core/when.hpp> #include <boost/hana/detail/concepts.hpp> -#include <boost/hana/detail/dependent_on.hpp> #include <boost/hana/detail/has_common_embedding.hpp> #include <boost/hana/detail/nested_to.hpp> // required by fwd decl #include <boost/hana/first.hpp> @@ -56,7 +55,8 @@ BOOST_HANA_NAMESPACE_BEGIN 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>; + // Delay the static_assert by ensuring T_ is dependent. + using T_ = typename hana::tag_of<X>::type; static_assert(!hana::is_convertible<T_, U>::value && !hana::is_convertible<U, T_>::value, "No default implementation of hana::equal is provided for related " diff --git a/boost/hana/erase_key.hpp b/boost/hana/erase_key.hpp index 20648f3c29..4a059c9598 100644 --- a/boost/hana/erase_key.hpp +++ b/boost/hana/erase_key.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::erase_key`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/eval.hpp b/boost/hana/eval.hpp index 1881c18277..1d8f4aa758 100644 --- a/boost/hana/eval.hpp +++ b/boost/hana/eval.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::eval`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/eval_if.hpp b/boost/hana/eval_if.hpp index e98d987447..7d0be870d3 100644 --- a/boost/hana/eval_if.hpp +++ b/boost/hana/eval_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::eval_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -26,7 +26,7 @@ Distributed under the Boost Software License, Version 1.0. BOOST_HANA_NAMESPACE_BEGIN //! @cond template <typename Cond, typename Then, typename Else> - constexpr decltype(auto) eval_if_t::operator()(Cond&& cond, Then&& then, Else&& else_) const { + constexpr decltype(auto) eval_if_t::operator()(Cond&& cond, Then&& then_, Else&& else_) const { using Bool = typename hana::tag_of<Cond>::type; using EvalIf = BOOST_HANA_DISPATCH_IF(eval_if_impl<Bool>, hana::Logical<Bool>::value @@ -38,7 +38,7 @@ BOOST_HANA_NAMESPACE_BEGIN #endif return EvalIf::apply(static_cast<Cond&&>(cond), - static_cast<Then&&>(then), + static_cast<Then&&>(then_), static_cast<Else&&>(else_)); } //! @endcond @@ -83,7 +83,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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>, + return eval_if_helper(hana::bool_<truth_value>{}, static_cast<Then&&>(t), static_cast<Else&&>(e)); } diff --git a/boost/hana/experimental/printable.hpp b/boost/hana/experimental/printable.hpp index 240e3a9291..e24a3426ea 100644 --- a/boost/hana/experimental/printable.hpp +++ b/boost/hana/experimental/printable.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::experimental::print`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/experimental/type_name.hpp b/boost/hana/experimental/type_name.hpp index 764b7eedd9..f3db176178 100644 --- a/boost/hana/experimental/type_name.hpp +++ b/boost/hana/experimental/type_name.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::experimental::type_name`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/experimental/types.hpp b/boost/hana/experimental/types.hpp index 75ae99e4f6..be1436a506 100644 --- a/boost/hana/experimental/types.hpp +++ b/boost/hana/experimental/types.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::experimental::types`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/experimental/view.hpp b/boost/hana/experimental/view.hpp index d037a9d271..e9a10b0820 100644 --- a/boost/hana/experimental/view.hpp +++ b/boost/hana/experimental/view.hpp @@ -2,7 +2,7 @@ @file Defines experimental views. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost.hpp b/boost/hana/ext/boost.hpp index 2d735c1469..aae8d5c27d 100644 --- a/boost/hana/ext/boost.hpp +++ b/boost/hana/ext/boost.hpp @@ -2,7 +2,7 @@ @file Includes all the adaptors for external Boost libraries. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion.hpp b/boost/hana/ext/boost/fusion.hpp index dd80e22b5a..7f775da9d9 100644 --- a/boost/hana/ext/boost/fusion.hpp +++ b/boost/hana/ext/boost/fusion.hpp @@ -2,7 +2,7 @@ @file Includes all the adaptors for the Boost.Fusion library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion/deque.hpp b/boost/hana/ext/boost/fusion/deque.hpp index bdf8c14b84..698638157d 100644 --- a/boost/hana/ext/boost/fusion/deque.hpp +++ b/boost/hana/ext/boost/fusion/deque.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::fusion::deque` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion/detail/common.hpp b/boost/hana/ext/boost/fusion/detail/common.hpp index c6ba922be5..298d74d93d 100644 --- a/boost/hana/ext/boost/fusion/detail/common.hpp +++ b/boost/hana/ext/boost/fusion/detail/common.hpp @@ -2,7 +2,7 @@ @file Defines common methods for all Boost.Fusion sequences. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion/list.hpp b/boost/hana/ext/boost/fusion/list.hpp index 0f30f7e7f8..0bdcb23dc5 100644 --- a/boost/hana/ext/boost/fusion/list.hpp +++ b/boost/hana/ext/boost/fusion/list.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::fusion::list` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion/tuple.hpp b/boost/hana/ext/boost/fusion/tuple.hpp index d3e0757911..cf427e51d3 100644 --- a/boost/hana/ext/boost/fusion/tuple.hpp +++ b/boost/hana/ext/boost/fusion/tuple.hpp @@ -6,7 +6,7 @@ In the current version of Boost.Fusion, `boost::fusion::tuple` is basically an alias to `boost::fusion::vector`, so both data types share the same implementation in Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/fusion/vector.hpp b/boost/hana/ext/boost/fusion/vector.hpp index 8cf9bdbe50..9a2a3a8c5d 100644 --- a/boost/hana/ext/boost/fusion/vector.hpp +++ b/boost/hana/ext/boost/fusion/vector.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::fusion::vector` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/mpl.hpp b/boost/hana/ext/boost/mpl.hpp index 02bf0e1b0f..2188c83be2 100644 --- a/boost/hana/ext/boost/mpl.hpp +++ b/boost/hana/ext/boost/mpl.hpp @@ -2,7 +2,7 @@ @file Includes all the adaptors for the Boost.MPL library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/mpl/integral_c.hpp b/boost/hana/ext/boost/mpl/integral_c.hpp index ef2cad0239..68ddd18486 100644 --- a/boost/hana/ext/boost/mpl/integral_c.hpp +++ b/boost/hana/ext/boost/mpl/integral_c.hpp @@ -2,7 +2,7 @@ @file Adapts Boost.MPL IntegralConstants for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/mpl/list.hpp b/boost/hana/ext/boost/mpl/list.hpp index 9e569a7d08..677b9a85bf 100644 --- a/boost/hana/ext/boost/mpl/list.hpp +++ b/boost/hana/ext/boost/mpl/list.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::mpl::list` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/mpl/vector.hpp b/boost/hana/ext/boost/mpl/vector.hpp index 59cac5dd2b..29e9972b5d 100644 --- a/boost/hana/ext/boost/mpl/vector.hpp +++ b/boost/hana/ext/boost/mpl/vector.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::mpl::vector` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/boost/tuple.hpp b/boost/hana/ext/boost/tuple.hpp index dff9a4a952..581c973bda 100644 --- a/boost/hana/ext/boost/tuple.hpp +++ b/boost/hana/ext/boost/tuple.hpp @@ -2,7 +2,7 @@ @file Adapts `boost::tuple` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std.hpp b/boost/hana/ext/std.hpp index 0d66408dc9..33b238d36e 100644 --- a/boost/hana/ext/std.hpp +++ b/boost/hana/ext/std.hpp @@ -2,7 +2,7 @@ @file Includes all the adaptors for the standard library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/array.hpp b/boost/hana/ext/std/array.hpp index 15365f59cd..0cb513073c 100644 --- a/boost/hana/ext/std/array.hpp +++ b/boost/hana/ext/std/array.hpp @@ -2,7 +2,7 @@ @file Adapts `std::array` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/integer_sequence.hpp b/boost/hana/ext/std/integer_sequence.hpp index 27d01e3137..83536a3102 100644 --- a/boost/hana/ext/std/integer_sequence.hpp +++ b/boost/hana/ext/std/integer_sequence.hpp @@ -2,7 +2,7 @@ @file Adapts `std::integer_sequence` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -105,8 +105,8 @@ BOOST_HANA_NAMESPACE_BEGIN 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]>{}; + constexpr T values_[] = {v...}; + return std::integral_constant<T, values_[n]>{}; } }; diff --git a/boost/hana/ext/std/integral_constant.hpp b/boost/hana/ext/std/integral_constant.hpp index 48db42400c..f949a66481 100644 --- a/boost/hana/ext/std/integral_constant.hpp +++ b/boost/hana/ext/std/integral_constant.hpp @@ -2,7 +2,7 @@ @file Adapts `std::integral_constant` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/pair.hpp b/boost/hana/ext/std/pair.hpp index fc60218e85..a2f429a642 100644 --- a/boost/hana/ext/std/pair.hpp +++ b/boost/hana/ext/std/pair.hpp @@ -2,7 +2,7 @@ @file Adapts `std::pair` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/ratio.hpp b/boost/hana/ext/std/ratio.hpp index a301abd1b6..bf25632f7d 100644 --- a/boost/hana/ext/std/ratio.hpp +++ b/boost/hana/ext/std/ratio.hpp @@ -2,7 +2,7 @@ @file Adapts `std::ratio` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/tuple.hpp b/boost/hana/ext/std/tuple.hpp index d53b9dd0f1..1edbf08334 100644 --- a/boost/hana/ext/std/tuple.hpp +++ b/boost/hana/ext/std/tuple.hpp @@ -2,7 +2,7 @@ @file Adapts `std::tuple` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ext/std/vector.hpp b/boost/hana/ext/std/vector.hpp index 62b808b2ea..d286d8f9a8 100644 --- a/boost/hana/ext/std/vector.hpp +++ b/boost/hana/ext/std/vector.hpp @@ -2,7 +2,7 @@ @file Adapts `std::vector` for use with Hana. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 @copyright Gonzalo Brito Gadeschi 2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) diff --git a/boost/hana/extend.hpp b/boost/hana/extend.hpp index c2568e41ec..466e74e777 100644 --- a/boost/hana/extend.hpp +++ b/boost/hana/extend.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::extend`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/extract.hpp b/boost/hana/extract.hpp index f72ddfce13..a9cd58624c 100644 --- a/boost/hana/extract.hpp +++ b/boost/hana/extract.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::extract`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fill.hpp b/boost/hana/fill.hpp index ce9c95392b..de82ac9b8e 100644 --- a/boost/hana/fill.hpp +++ b/boost/hana/fill.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fill`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/filter.hpp b/boost/hana/filter.hpp index 0a5979dd3b..e8f7d51428 100644 --- a/boost/hana/filter.hpp +++ b/boost/hana/filter.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::filter`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -93,7 +93,7 @@ BOOST_HANA_NAMESPACE_BEGIN return indices; } - static constexpr auto indices = compute_indices(); + static constexpr auto cached_indices = compute_indices(); }; template <typename Pred> @@ -113,7 +113,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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))... + hana::at_c<Indices::cached_indices[i]>(static_cast<Xs&&>(xs))... ); } @@ -126,7 +126,7 @@ BOOST_HANA_NAMESPACE_BEGIN return filter_impl::filter_helper<Indices>( static_cast<Xs&&>(xs), - std::make_index_sequence<Indices::indices.size()>{} + std::make_index_sequence<Indices::cached_indices.size()>{} ); } }; diff --git a/boost/hana/find.hpp b/boost/hana/find.hpp index b2fe1ca8aa..4ebc48a2b5 100644 --- a/boost/hana/find.hpp +++ b/boost/hana/find.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::find`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/find_if.hpp b/boost/hana/find_if.hpp index 4de79e691e..3c4e07fcb0 100644 --- a/boost/hana/find_if.hpp +++ b/boost/hana/find_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::find_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/first.hpp b/boost/hana/first.hpp index 1e7ce828c3..f364b2242f 100644 --- a/boost/hana/first.hpp +++ b/boost/hana/first.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::first`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/flatten.hpp b/boost/hana/flatten.hpp index a481c3ae19..6c5ccc99c3 100644 --- a/boost/hana/flatten.hpp +++ b/boost/hana/flatten.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::flatten`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fold.hpp b/boost/hana/fold.hpp index 55adba06d1..a3665de22f 100644 --- a/boost/hana/fold.hpp +++ b/boost/hana/fold.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fold`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fold_left.hpp b/boost/hana/fold_left.hpp index 23fee4035f..fc51b84d70 100644 --- a/boost/hana/fold_left.hpp +++ b/boost/hana/fold_left.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fold_right.hpp b/boost/hana/fold_right.hpp index 60979a9201..73bdc6f88d 100644 --- a/boost/hana/fold_right.hpp +++ b/boost/hana/fold_right.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/for_each.hpp b/boost/hana/for_each.hpp index 091b83c38c..defc1de4ad 100644 --- a/boost/hana/for_each.hpp +++ b/boost/hana/for_each.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::for_each`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/front.hpp b/boost/hana/front.hpp index e8b53de32d..96d7651a66 100644 --- a/boost/hana/front.hpp +++ b/boost/hana/front.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::front`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional.hpp b/boost/hana/functional.hpp index 152cf58bf0..8f649431b1 100644 --- a/boost/hana/functional.hpp +++ b/boost/hana/functional.hpp @@ -2,7 +2,7 @@ @file Defines the @ref group-functional module. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/always.hpp b/boost/hana/functional/always.hpp index 249233d3f2..df41b851e7 100644 --- a/boost/hana/functional/always.hpp +++ b/boost/hana/functional/always.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::always`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/apply.hpp b/boost/hana/functional/apply.hpp index 75a7f9483d..8a47a873e6 100644 --- a/boost/hana/functional/apply.hpp +++ b/boost/hana/functional/apply.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::apply`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/arg.hpp b/boost/hana/functional/arg.hpp index c9c68f0eae..5dd5658eff 100644 --- a/boost/hana/functional/arg.hpp +++ b/boost/hana/functional/arg.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::arg`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/capture.hpp b/boost/hana/functional/capture.hpp index 0b5a4677d8..65b4675833 100644 --- a/boost/hana/functional/capture.hpp +++ b/boost/hana/functional/capture.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::capture`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -54,7 +54,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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_)... + hana::at_c<i>(static_cast<Closure&&>(closure).storage_)... ); } } diff --git a/boost/hana/functional/compose.hpp b/boost/hana/functional/compose.hpp index 3250cee4db..bbc53f6ff4 100644 --- a/boost/hana/functional/compose.hpp +++ b/boost/hana/functional/compose.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::compose`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/curry.hpp b/boost/hana/functional/curry.hpp index 94662757e5..74ec09459a 100644 --- a/boost/hana/functional/curry.hpp +++ b/boost/hana/functional/curry.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::curry`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/demux.hpp b/boost/hana/functional/demux.hpp index c1ed03634e..f76b68ed48 100644 --- a/boost/hana/functional/demux.hpp +++ b/boost/hana/functional/demux.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::demux`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -211,22 +211,22 @@ BOOST_HANA_NAMESPACE_BEGIN template <typename ...X> constexpr decltype(auto) operator()(X&& ...x) const& { - return hana::get_impl<0>(storage_)( - hana::get_impl<n+1>(storage_)(x...)... + return hana::at_c<0>(storage_)( + hana::at_c<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...)... + return hana::at_c<0>(storage_)( + hana::at_c<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...)... + return static_cast<F&&>(hana::at_c<0>(storage_))( + static_cast<G&&>(hana::at_c<n+1>(storage_))(x...)... ); } }; @@ -242,22 +242,22 @@ BOOST_HANA_NAMESPACE_BEGIN 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)...) + return hana::at_c<0>(storage_)( + hana::at_c<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)...) + return hana::at_c<0>(storage_)( + hana::at_c<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)...) + return static_cast<F&&>(hana::at_c<0>(storage_))( + static_cast<G&&>(hana::at_c<1>(storage_))(static_cast<X&&>(x)...) ); } }; diff --git a/boost/hana/functional/fix.hpp b/boost/hana/functional/fix.hpp index 007ecba1a1..4c636ee10b 100644 --- a/boost/hana/functional/fix.hpp +++ b/boost/hana/functional/fix.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/flip.hpp b/boost/hana/functional/flip.hpp index 3da81eddd7..d896f5e8d3 100644 --- a/boost/hana/functional/flip.hpp +++ b/boost/hana/functional/flip.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::flip`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/id.hpp b/boost/hana/functional/id.hpp index e6b4e32b79..04c9443b94 100644 --- a/boost/hana/functional/id.hpp +++ b/boost/hana/functional/id.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::id`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/infix.hpp b/boost/hana/functional/infix.hpp index 0706f3e62d..7b5d82cbe0 100644 --- a/boost/hana/functional/infix.hpp +++ b/boost/hana/functional/infix.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::infix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/iterate.hpp b/boost/hana/functional/iterate.hpp index b2ec27f5ec..9a4ce3e9b2 100644 --- a/boost/hana/functional/iterate.hpp +++ b/boost/hana/functional/iterate.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::iterate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/lockstep.hpp b/boost/hana/functional/lockstep.hpp index 11f8d6226f..2f60781883 100644 --- a/boost/hana/functional/lockstep.hpp +++ b/boost/hana/functional/lockstep.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::lockstep`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -67,22 +67,22 @@ BOOST_HANA_NAMESPACE_BEGIN 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))... + return hana::at_c<0>(storage_)( + hana::at_c<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))... + return hana::at_c<0>(storage_)( + hana::at_c<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))... + return static_cast<F&&>(hana::at_c<0>(storage_))( + static_cast<G&&>(hana::at_c<n+1>(storage_))(static_cast<X&&>(x))... ); } }; diff --git a/boost/hana/functional/on.hpp b/boost/hana/functional/on.hpp index ff40c0db5c..59561870a3 100644 --- a/boost/hana/functional/on.hpp +++ b/boost/hana/functional/on.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::on`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/overload.hpp b/boost/hana/functional/overload.hpp index b16c87c915..d8ce96a5ac 100644 --- a/boost/hana/functional/overload.hpp +++ b/boost/hana/functional/overload.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::overload`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/overload_linearly.hpp b/boost/hana/functional/overload_linearly.hpp index 3c91a9249f..e4129d1169 100644 --- a/boost/hana/functional/overload_linearly.hpp +++ b/boost/hana/functional/overload_linearly.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::overload_linearly`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/functional/partial.hpp b/boost/hana/functional/partial.hpp index 064d0058ac..cfe981dddf 100644 --- a/boost/hana/functional/partial.hpp +++ b/boost/hana/functional/partial.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::partial`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -75,24 +75,24 @@ BOOST_HANA_NAMESPACE_BEGIN template <typename ...Y> constexpr decltype(auto) operator()(Y&& ...y) const& { - return hana::get_impl<0>(storage_)( - hana::get_impl<n+1>(storage_)..., + return hana::at_c<0>(storage_)( + hana::at_c<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_)..., + return hana::at_c<0>(storage_)( + hana::at_c<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_))..., + return static_cast<F&&>(hana::at_c<0>(storage_))( + static_cast<X&&>(hana::at_c<n+1>(storage_))..., static_cast<Y&&>(y)... ); } diff --git a/boost/hana/functional/placeholder.hpp b/boost/hana/functional/placeholder.hpp index 71a25389cd..59dea42bfb 100644 --- a/boost/hana/functional/placeholder.hpp +++ b/boost/hana/functional/placeholder.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -92,7 +92,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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_)...); + return static_cast<F&&>(f)(hana::at_c<i>(static_cast<Xs&&>(xs).storage_)...); } template <typename ...X> diff --git a/boost/hana/functional/reverse_partial.hpp b/boost/hana/functional/reverse_partial.hpp index fe2a06f143..60fc59e400 100644 --- a/boost/hana/functional/reverse_partial.hpp +++ b/boost/hana/functional/reverse_partial.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::reverse_partial`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -73,25 +73,25 @@ BOOST_HANA_NAMESPACE_BEGIN template <typename ...Y> constexpr decltype(auto) operator()(Y&& ...y) const& { - return hana::get_impl<0>(storage_)( + return hana::at_c<0>(storage_)( static_cast<Y&&>(y)..., - hana::get_impl<n+1>(storage_)... + hana::at_c<n+1>(storage_)... ); } template <typename ...Y> constexpr decltype(auto) operator()(Y&& ...y) & { - return hana::get_impl<0>(storage_)( + return hana::at_c<0>(storage_)( static_cast<Y&&>(y)..., - hana::get_impl<n+1>(storage_)... + hana::at_c<n+1>(storage_)... ); } template <typename ...Y> constexpr decltype(auto) operator()(Y&& ...y) && { - return static_cast<F&&>(hana::get_impl<0>(storage_))( + return static_cast<F&&>(hana::at_c<0>(storage_))( static_cast<Y&&>(y)..., - static_cast<X&&>(hana::get_impl<n+1>(storage_))... + static_cast<X&&>(hana::at_c<n+1>(storage_))... ); } }; diff --git a/boost/hana/fuse.hpp b/boost/hana/fuse.hpp index 38b93a151d..960aaee1bc 100644 --- a/boost/hana/fuse.hpp +++ b/boost/hana/fuse.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::fuse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/accessors.hpp b/boost/hana/fwd/accessors.hpp index 8ad5f1b131..ca337d1965 100644 --- a/boost/hana/fwd/accessors.hpp +++ b/boost/hana/fwd/accessors.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::accessors`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/adapt_adt.hpp b/boost/hana/fwd/adapt_adt.hpp index 4b8614a612..a7658ca628 100644 --- a/boost/hana/fwd/adapt_adt.hpp +++ b/boost/hana/fwd/adapt_adt.hpp @@ -2,7 +2,7 @@ @file Documents the `BOOST_HANA_ADAPT_ADT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/adapt_struct.hpp b/boost/hana/fwd/adapt_struct.hpp index 691eecaf15..b03da6463b 100644 --- a/boost/hana/fwd/adapt_struct.hpp +++ b/boost/hana/fwd/adapt_struct.hpp @@ -2,7 +2,7 @@ @file Documents the `BOOST_HANA_ADAPT_STRUCT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/adjust.hpp b/boost/hana/fwd/adjust.hpp index c4a8783e9f..8fec6f0b3d 100644 --- a/boost/hana/fwd/adjust.hpp +++ b/boost/hana/fwd/adjust.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::adjust`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/adjust_if.hpp b/boost/hana/fwd/adjust_if.hpp index fac3cbf0e4..017ac03972 100644 --- a/boost/hana/fwd/adjust_if.hpp +++ b/boost/hana/fwd/adjust_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::adjust_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/all.hpp b/boost/hana/fwd/all.hpp index eb92a0c1e1..eca239ebef 100644 --- a/boost/hana/fwd/all.hpp +++ b/boost/hana/fwd/all.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::all`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/all_of.hpp b/boost/hana/fwd/all_of.hpp index 33fcbfc96d..3aabf29063 100644 --- a/boost/hana/fwd/all_of.hpp +++ b/boost/hana/fwd/all_of.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::all_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/and.hpp b/boost/hana/fwd/and.hpp index df767ebd1f..026cacabaf 100644 --- a/boost/hana/fwd/and.hpp +++ b/boost/hana/fwd/and.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::and_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/any.hpp b/boost/hana/fwd/any.hpp index 2adf3beeee..6281236ad6 100644 --- a/boost/hana/fwd/any.hpp +++ b/boost/hana/fwd/any.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::any`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/any_of.hpp b/boost/hana/fwd/any_of.hpp index a8cf77596d..a9408bd1b5 100644 --- a/boost/hana/fwd/any_of.hpp +++ b/boost/hana/fwd/any_of.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::any_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/ap.hpp b/boost/hana/fwd/ap.hpp index 4d71abadd1..6f7b147090 100644 --- a/boost/hana/fwd/ap.hpp +++ b/boost/hana/fwd/ap.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::ap`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/append.hpp b/boost/hana/fwd/append.hpp index fd9efc3d53..94b2105c93 100644 --- a/boost/hana/fwd/append.hpp +++ b/boost/hana/fwd/append.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::append`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/at.hpp b/boost/hana/fwd/at.hpp index 9b1195d3d6..ea03114ed7 100644 --- a/boost/hana/fwd/at.hpp +++ b/boost/hana/fwd/at.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::at` and `boost::hana::at_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/at_key.hpp b/boost/hana/fwd/at_key.hpp index 08a29feff1..29134565a5 100644 --- a/boost/hana/fwd/at_key.hpp +++ b/boost/hana/fwd/at_key.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::at_key`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/back.hpp b/boost/hana/fwd/back.hpp index 197120aff7..8356cddeab 100644 --- a/boost/hana/fwd/back.hpp +++ b/boost/hana/fwd/back.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/basic_tuple.hpp b/boost/hana/fwd/basic_tuple.hpp index e2e78fbbcf..8444f0f50e 100644 --- a/boost/hana/fwd/basic_tuple.hpp +++ b/boost/hana/fwd/basic_tuple.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::basic_tuple`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/bool.hpp b/boost/hana/fwd/bool.hpp index 1bb712c99e..123c992c62 100644 --- a/boost/hana/fwd/bool.hpp +++ b/boost/hana/fwd/bool.hpp @@ -2,7 +2,7 @@ @file Includes boost/hana/fwd/integral_constant.hpp. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/cartesian_product.hpp b/boost/hana/fwd/cartesian_product.hpp index 4ea70626a6..a3a48f23f3 100644 --- a/boost/hana/fwd/cartesian_product.hpp +++ b/boost/hana/fwd/cartesian_product.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::cartesian_product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/chain.hpp b/boost/hana/fwd/chain.hpp index e6ec0e141f..aa7f311057 100644 --- a/boost/hana/fwd/chain.hpp +++ b/boost/hana/fwd/chain.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::chain`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/comparing.hpp b/boost/hana/fwd/comparing.hpp index c508d48a21..376ab173c7 100644 --- a/boost/hana/fwd/comparing.hpp +++ b/boost/hana/fwd/comparing.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::comparing`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concat.hpp b/boost/hana/fwd/concat.hpp index ed87f71ec1..140c847909 100644 --- a/boost/hana/fwd/concat.hpp +++ b/boost/hana/fwd/concat.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::concat`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/applicative.hpp b/boost/hana/fwd/concept/applicative.hpp index 8f5db93042..2c8677940c 100644 --- a/boost/hana/fwd/concept/applicative.hpp +++ b/boost/hana/fwd/concept/applicative.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Applicative`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/comonad.hpp b/boost/hana/fwd/concept/comonad.hpp index 0c3627576b..b2693078b0 100644 --- a/boost/hana/fwd/concept/comonad.hpp +++ b/boost/hana/fwd/concept/comonad.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Comonad`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/comparable.hpp b/boost/hana/fwd/concept/comparable.hpp index 555dfdfa34..9624c87038 100644 --- a/boost/hana/fwd/concept/comparable.hpp +++ b/boost/hana/fwd/concept/comparable.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Comparable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/constant.hpp b/boost/hana/fwd/concept/constant.hpp index a9c1467dbc..bab44a7cb2 100644 --- a/boost/hana/fwd/concept/constant.hpp +++ b/boost/hana/fwd/concept/constant.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Constant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -30,7 +30,7 @@ BOOST_HANA_NAMESPACE_BEGIN //! Let `C(T)` and `D(U)` denote the tags of `Constant`s holding objects //! of type `T` and `U`, respectively. Then, an object with tag `D(U)` //! must be convertible to an object with tag `C(T)` whenever `U` is - //! convertible to `T`, has determined by `is_convertible`. The + //! convertible to `T`, as determined by `is_convertible`. The //! interpretation here is that a `Constant` is just a box holding //! an object of some type, and it should be possible to swap between //! boxes whenever the objects inside the boxes can be swapped. @@ -59,7 +59,7 @@ BOOST_HANA_NAMESPACE_BEGIN //! of the wrapped object is always a constant expression by requiring //! the following to be well-formed: //! @code - //! constexpr auto x = hana::value<decltype(x)>(); + //! constexpr auto x = hana::value<decltype(c)>(); //! @endcode //! //! This means that the `value` function must return an object that can @@ -146,7 +146,7 @@ BOOST_HANA_NAMESPACE_BEGIN //! conversion of underlying types is an embedding. This is to allow //! Constants to inter-operate with `constexpr` objects easily: //! @code - //! plus(int_<1>, 1) == 2 + //! plus(int_c<1>, 1) == 2 //! @endcode //! //! Strictly speaking, __this is sometimes a violation__ of what it means @@ -160,25 +160,25 @@ BOOST_HANA_NAMESPACE_BEGIN //! `constexpr` object of not. In other words, the `to` method has no way //! to differentiate between //! @code - //! constexpr int i = hana::to<int>(int_<1>); + //! constexpr int i = hana::to<int>(int_c<1>); //! @endcode //! which is an embedding, and //! @code - //! int i = hana::to<int>(int_<1>); + //! int i = hana::to<int>(int_c<1>); //! @endcode //! //! which isn't. To be on the safer side, we could mark the conversion //! as not-an-embedding. However, if e.g. the conversion from //! `integral_constant_tag<int>` to `int` was not marked as an embedding, - //! we would have to write `plus(to<int>(int_<1>), 1)` instead of just - //! `plus(int_<1>, 1)`, which is cumbersome. Hence, the conversion is + //! we would have to write `plus(to<int>(int_c<1>), 1)` instead of just + //! `plus(int_c<1>, 1)`, which is cumbersome. Hence, the conversion is //! marked as an embedding, but this also means that code like //! @code //! int i = 1; - //! plus(int_<1>, i); + //! plus(int_c<1>, i); //! @endcode //! will be considered valid, which implicitly loses the fact that - //! `int_<1>` is a Constant, and hence does not follow the usual rules + //! `int_c<1>` is a Constant, and hence does not follow the usual rules //! for cross-type operations in Hana. //! //! diff --git a/boost/hana/fwd/concept/euclidean_ring.hpp b/boost/hana/fwd/concept/euclidean_ring.hpp index b33d8b565c..8b8744c29d 100644 --- a/boost/hana/fwd/concept/euclidean_ring.hpp +++ b/boost/hana/fwd/concept/euclidean_ring.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::EuclideanRing`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/foldable.hpp b/boost/hana/fwd/concept/foldable.hpp index 6e460ad435..09de170455 100644 --- a/boost/hana/fwd/concept/foldable.hpp +++ b/boost/hana/fwd/concept/foldable.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Foldable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/functor.hpp b/boost/hana/fwd/concept/functor.hpp index 6d2ea170f6..f46ad24c73 100644 --- a/boost/hana/fwd/concept/functor.hpp +++ b/boost/hana/fwd/concept/functor.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Functor`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/group.hpp b/boost/hana/fwd/concept/group.hpp index a7ec238d54..6afec94502 100644 --- a/boost/hana/fwd/concept/group.hpp +++ b/boost/hana/fwd/concept/group.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Group`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/integral_constant.hpp b/boost/hana/fwd/concept/integral_constant.hpp index ba82c52931..161062e2be 100644 --- a/boost/hana/fwd/concept/integral_constant.hpp +++ b/boost/hana/fwd/concept/integral_constant.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::IntegralConstant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/iterable.hpp b/boost/hana/fwd/concept/iterable.hpp index f406b2186b..59c8520b62 100644 --- a/boost/hana/fwd/concept/iterable.hpp +++ b/boost/hana/fwd/concept/iterable.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Iterable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/logical.hpp b/boost/hana/fwd/concept/logical.hpp index 7eecf9d857..f9cfde986c 100644 --- a/boost/hana/fwd/concept/logical.hpp +++ b/boost/hana/fwd/concept/logical.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Logical`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/metafunction.hpp b/boost/hana/fwd/concept/metafunction.hpp index 00efc049e3..72884911f3 100644 --- a/boost/hana/fwd/concept/metafunction.hpp +++ b/boost/hana/fwd/concept/metafunction.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Metafunction`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/monad.hpp b/boost/hana/fwd/concept/monad.hpp index 1dee78331d..b310868e44 100644 --- a/boost/hana/fwd/concept/monad.hpp +++ b/boost/hana/fwd/concept/monad.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Monad`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/monad_plus.hpp b/boost/hana/fwd/concept/monad_plus.hpp index a7ac03c4d3..dcdf65e210 100644 --- a/boost/hana/fwd/concept/monad_plus.hpp +++ b/boost/hana/fwd/concept/monad_plus.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::MonadPlus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/monoid.hpp b/boost/hana/fwd/concept/monoid.hpp index 5486d3d1d8..381e29dff7 100644 --- a/boost/hana/fwd/concept/monoid.hpp +++ b/boost/hana/fwd/concept/monoid.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Monoid`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/orderable.hpp b/boost/hana/fwd/concept/orderable.hpp index ed381de94a..7c4cf233db 100644 --- a/boost/hana/fwd/concept/orderable.hpp +++ b/boost/hana/fwd/concept/orderable.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Orderable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/product.hpp b/boost/hana/fwd/concept/product.hpp index f3b2feb705..0d029fdb11 100644 --- a/boost/hana/fwd/concept/product.hpp +++ b/boost/hana/fwd/concept/product.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/ring.hpp b/boost/hana/fwd/concept/ring.hpp index 91d150214e..45b301f272 100644 --- a/boost/hana/fwd/concept/ring.hpp +++ b/boost/hana/fwd/concept/ring.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Ring`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/searchable.hpp b/boost/hana/fwd/concept/searchable.hpp index 8a0491b2ec..2c1e22fc4a 100644 --- a/boost/hana/fwd/concept/searchable.hpp +++ b/boost/hana/fwd/concept/searchable.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Searchable`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/sequence.hpp b/boost/hana/fwd/concept/sequence.hpp index 7f9df2e39d..84cedd1263 100644 --- a/boost/hana/fwd/concept/sequence.hpp +++ b/boost/hana/fwd/concept/sequence.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Sequence`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/concept/struct.hpp b/boost/hana/fwd/concept/struct.hpp index f6829466bb..d9d0cffb58 100644 --- a/boost/hana/fwd/concept/struct.hpp +++ b/boost/hana/fwd/concept/struct.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::Struct`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/contains.hpp b/boost/hana/fwd/contains.hpp index f717f6738c..eb338281c1 100644 --- a/boost/hana/fwd/contains.hpp +++ b/boost/hana/fwd/contains.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::contains` and `boost::hana::in`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core.hpp b/boost/hana/fwd/core.hpp index 10fad8ace9..a25a159582 100644 --- a/boost/hana/fwd/core.hpp +++ b/boost/hana/fwd/core.hpp @@ -2,7 +2,7 @@ @file Forward declares the @ref group-core module. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/common.hpp b/boost/hana/fwd/core/common.hpp index 29702f23d5..d2dcac59f7 100644 --- a/boost/hana/fwd/core/common.hpp +++ b/boost/hana/fwd/core/common.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::common` and `boost::hana::common_t`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/default.hpp b/boost/hana/fwd/core/default.hpp index 58e3f060f3..978c9a5f0c 100644 --- a/boost/hana/fwd/core/default.hpp +++ b/boost/hana/fwd/core/default.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::default_` and `boost::hana::is_default`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/is_a.hpp b/boost/hana/fwd/core/is_a.hpp index 5a90c6d55b..956549aa16 100644 --- a/boost/hana/fwd/core/is_a.hpp +++ b/boost/hana/fwd/core/is_a.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::is_a` and `boost::hana::is_an`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/make.hpp b/boost/hana/fwd/core/make.hpp index 56354b6813..0ed5d0f19e 100644 --- a/boost/hana/fwd/core/make.hpp +++ b/boost/hana/fwd/core/make.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::make`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/tag_of.hpp b/boost/hana/fwd/core/tag_of.hpp index a2e7cc5605..bcc4ef8e53 100644 --- a/boost/hana/fwd/core/tag_of.hpp +++ b/boost/hana/fwd/core/tag_of.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::tag_of` and `boost::hana::tag_of_t`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/to.hpp b/boost/hana/fwd/core/to.hpp index e41d36ee0a..108484c2ce 100644 --- a/boost/hana/fwd/core/to.hpp +++ b/boost/hana/fwd/core/to.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::to` and related utilities. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/core/when.hpp b/boost/hana/fwd/core/when.hpp index 857dc2581d..cc7659628d 100644 --- a/boost/hana/fwd/core/when.hpp +++ b/boost/hana/fwd/core/when.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::when` and `boost::hana::when_valid`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/count.hpp b/boost/hana/fwd/count.hpp index ffa4a1a65a..3bfdda53d6 100644 --- a/boost/hana/fwd/count.hpp +++ b/boost/hana/fwd/count.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::count`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/count_if.hpp b/boost/hana/fwd/count_if.hpp index 8d4b9283a9..8be0a42638 100644 --- a/boost/hana/fwd/count_if.hpp +++ b/boost/hana/fwd/count_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::count_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/cycle.hpp b/boost/hana/fwd/cycle.hpp index 4d23b8d821..268e7daf43 100644 --- a/boost/hana/fwd/cycle.hpp +++ b/boost/hana/fwd/cycle.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::cycle`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/define_struct.hpp b/boost/hana/fwd/define_struct.hpp index b4adb89f5c..831f6872a4 100644 --- a/boost/hana/fwd/define_struct.hpp +++ b/boost/hana/fwd/define_struct.hpp @@ -2,7 +2,7 @@ @file Documents the `BOOST_HANA_DEFINE_STRUCT` macro. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/difference.hpp b/boost/hana/fwd/difference.hpp index 44916198e5..3702f075e0 100644 --- a/boost/hana/fwd/difference.hpp +++ b/boost/hana/fwd/difference.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::difference`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/div.hpp b/boost/hana/fwd/div.hpp index 82684d7162..6f35b4abe3 100644 --- a/boost/hana/fwd/div.hpp +++ b/boost/hana/fwd/div.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::div`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/drop_back.hpp b/boost/hana/fwd/drop_back.hpp index 814382e855..440e925322 100644 --- a/boost/hana/fwd/drop_back.hpp +++ b/boost/hana/fwd/drop_back.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::drop_back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/drop_front.hpp b/boost/hana/fwd/drop_front.hpp index b76c710ef7..298499180c 100644 --- a/boost/hana/fwd/drop_front.hpp +++ b/boost/hana/fwd/drop_front.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::drop_front`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/drop_front_exactly.hpp b/boost/hana/fwd/drop_front_exactly.hpp index 3cb11d76a7..17a55e6d66 100644 --- a/boost/hana/fwd/drop_front_exactly.hpp +++ b/boost/hana/fwd/drop_front_exactly.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::drop_front_exactly`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/drop_while.hpp b/boost/hana/fwd/drop_while.hpp index ef555f8609..2d5557e5a7 100644 --- a/boost/hana/fwd/drop_while.hpp +++ b/boost/hana/fwd/drop_while.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::drop_while`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/duplicate.hpp b/boost/hana/fwd/duplicate.hpp index b1a0af242b..bac61e0bd9 100644 --- a/boost/hana/fwd/duplicate.hpp +++ b/boost/hana/fwd/duplicate.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::duplicate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/empty.hpp b/boost/hana/fwd/empty.hpp index 90a3696357..ed3cc38cc7 100644 --- a/boost/hana/fwd/empty.hpp +++ b/boost/hana/fwd/empty.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::empty`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/equal.hpp b/boost/hana/fwd/equal.hpp index e72614407d..e9f8c4bd6e 100644 --- a/boost/hana/fwd/equal.hpp +++ b/boost/hana/fwd/equal.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/erase_key.hpp b/boost/hana/fwd/erase_key.hpp index 4612424802..49471d61cf 100644 --- a/boost/hana/fwd/erase_key.hpp +++ b/boost/hana/fwd/erase_key.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::erase_key`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/eval.hpp b/boost/hana/fwd/eval.hpp index d1d0b7f488..d068f992f5 100644 --- a/boost/hana/fwd/eval.hpp +++ b/boost/hana/fwd/eval.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::eval`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/eval_if.hpp b/boost/hana/fwd/eval_if.hpp index 865e561c99..2bc8736b12 100644 --- a/boost/hana/fwd/eval_if.hpp +++ b/boost/hana/fwd/eval_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::eval_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/extend.hpp b/boost/hana/fwd/extend.hpp index 6cbf1ffc2b..65b68d8011 100644 --- a/boost/hana/fwd/extend.hpp +++ b/boost/hana/fwd/extend.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::extend`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/extract.hpp b/boost/hana/fwd/extract.hpp index 8a9917bc66..1e71727143 100644 --- a/boost/hana/fwd/extract.hpp +++ b/boost/hana/fwd/extract.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::extract`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/fill.hpp b/boost/hana/fwd/fill.hpp index 38a4a35c96..6946c6ffd8 100644 --- a/boost/hana/fwd/fill.hpp +++ b/boost/hana/fwd/fill.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::fill`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/filter.hpp b/boost/hana/fwd/filter.hpp index b0db0b6006..f31b30df52 100644 --- a/boost/hana/fwd/filter.hpp +++ b/boost/hana/fwd/filter.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::filter`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/find.hpp b/boost/hana/fwd/find.hpp index 00c74d1a43..cc88d6f239 100644 --- a/boost/hana/fwd/find.hpp +++ b/boost/hana/fwd/find.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::find`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/find_if.hpp b/boost/hana/fwd/find_if.hpp index 7c8b8664f1..d6fca44600 100644 --- a/boost/hana/fwd/find_if.hpp +++ b/boost/hana/fwd/find_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::find_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/first.hpp b/boost/hana/fwd/first.hpp index 8cfef1472e..0a62a8344f 100644 --- a/boost/hana/fwd/first.hpp +++ b/boost/hana/fwd/first.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::first`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/flatten.hpp b/boost/hana/fwd/flatten.hpp index 42c83f8f22..f0e319a131 100644 --- a/boost/hana/fwd/flatten.hpp +++ b/boost/hana/fwd/flatten.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::flatten`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/fold.hpp b/boost/hana/fwd/fold.hpp index f34961d507..e060ab1e1e 100644 --- a/boost/hana/fwd/fold.hpp +++ b/boost/hana/fwd/fold.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::fold`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/fold_left.hpp b/boost/hana/fwd/fold_left.hpp index 039cb746d8..22dd22d32f 100644 --- a/boost/hana/fwd/fold_left.hpp +++ b/boost/hana/fwd/fold_left.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::fold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/fold_right.hpp b/boost/hana/fwd/fold_right.hpp index 4b5bf8f1ba..a4305e9c72 100644 --- a/boost/hana/fwd/fold_right.hpp +++ b/boost/hana/fwd/fold_right.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::fold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/for_each.hpp b/boost/hana/fwd/for_each.hpp index 35c0bd45ce..83daf25418 100644 --- a/boost/hana/fwd/for_each.hpp +++ b/boost/hana/fwd/for_each.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::for_each`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/front.hpp b/boost/hana/fwd/front.hpp index 805cbdd15d..3ac1602ea4 100644 --- a/boost/hana/fwd/front.hpp +++ b/boost/hana/fwd/front.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::front`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/fuse.hpp b/boost/hana/fwd/fuse.hpp index 6e38227c61..cecc97c73a 100644 --- a/boost/hana/fwd/fuse.hpp +++ b/boost/hana/fwd/fuse.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::fuse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/greater.hpp b/boost/hana/fwd/greater.hpp index 091c1d36de..5fcaa4e32d 100644 --- a/boost/hana/fwd/greater.hpp +++ b/boost/hana/fwd/greater.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::greater`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/greater_equal.hpp b/boost/hana/fwd/greater_equal.hpp index d19c6734be..4b29bfcc96 100644 --- a/boost/hana/fwd/greater_equal.hpp +++ b/boost/hana/fwd/greater_equal.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::greater_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/group.hpp b/boost/hana/fwd/group.hpp index 75fb68c832..1be1bee386 100644 --- a/boost/hana/fwd/group.hpp +++ b/boost/hana/fwd/group.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::group`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/if.hpp b/boost/hana/fwd/if.hpp index c221b355cf..59b61975f8 100644 --- a/boost/hana/fwd/if.hpp +++ b/boost/hana/fwd/if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::if_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/insert.hpp b/boost/hana/fwd/insert.hpp index 0ad88849c9..3ca9aa458d 100644 --- a/boost/hana/fwd/insert.hpp +++ b/boost/hana/fwd/insert.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::insert`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/insert_range.hpp b/boost/hana/fwd/insert_range.hpp index e424059c8c..88b6d98acd 100644 --- a/boost/hana/fwd/insert_range.hpp +++ b/boost/hana/fwd/insert_range.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::insert_range`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/integral_constant.hpp b/boost/hana/fwd/integral_constant.hpp index d05d6021f9..6ef1272d80 100644 --- a/boost/hana/fwd/integral_constant.hpp +++ b/boost/hana/fwd/integral_constant.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::integral_constant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/intersection.hpp b/boost/hana/fwd/intersection.hpp index 787137e208..ec9b1daad2 100644 --- a/boost/hana/fwd/intersection.hpp +++ b/boost/hana/fwd/intersection.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::intersection`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/intersperse.hpp b/boost/hana/fwd/intersperse.hpp index fd29d3a321..35e8a725b5 100644 --- a/boost/hana/fwd/intersperse.hpp +++ b/boost/hana/fwd/intersperse.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::intersperse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/is_disjoint.hpp b/boost/hana/fwd/is_disjoint.hpp index 97ed7471bb..8a3520b558 100644 --- a/boost/hana/fwd/is_disjoint.hpp +++ b/boost/hana/fwd/is_disjoint.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::is_disjoint`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/is_empty.hpp b/boost/hana/fwd/is_empty.hpp index ddc524672d..a33dc5af8c 100644 --- a/boost/hana/fwd/is_empty.hpp +++ b/boost/hana/fwd/is_empty.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::is_empty`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/is_subset.hpp b/boost/hana/fwd/is_subset.hpp index 158d28b751..aceb85aa86 100644 --- a/boost/hana/fwd/is_subset.hpp +++ b/boost/hana/fwd/is_subset.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::is_subset`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/keys.hpp b/boost/hana/fwd/keys.hpp index 285c34d9a1..24c93b749a 100644 --- a/boost/hana/fwd/keys.hpp +++ b/boost/hana/fwd/keys.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::keys`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/lazy.hpp b/boost/hana/fwd/lazy.hpp index 6ae6a830ef..7568e8e4a6 100644 --- a/boost/hana/fwd/lazy.hpp +++ b/boost/hana/fwd/lazy.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::lazy`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/length.hpp b/boost/hana/fwd/length.hpp index c995a80dd8..331b1d93d2 100644 --- a/boost/hana/fwd/length.hpp +++ b/boost/hana/fwd/length.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::length`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/less.hpp b/boost/hana/fwd/less.hpp index 1dd585db33..f1695b2b74 100644 --- a/boost/hana/fwd/less.hpp +++ b/boost/hana/fwd/less.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::less`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/less_equal.hpp b/boost/hana/fwd/less_equal.hpp index 9de3d6b779..e5c66e4bc3 100644 --- a/boost/hana/fwd/less_equal.hpp +++ b/boost/hana/fwd/less_equal.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::less_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/lexicographical_compare.hpp b/boost/hana/fwd/lexicographical_compare.hpp index 0098b1cb2d..a95aac5212 100644 --- a/boost/hana/fwd/lexicographical_compare.hpp +++ b/boost/hana/fwd/lexicographical_compare.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::lexicographical_compare`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/lift.hpp b/boost/hana/fwd/lift.hpp index 2f30fd68d5..9491dab8a4 100644 --- a/boost/hana/fwd/lift.hpp +++ b/boost/hana/fwd/lift.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::lift`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/map.hpp b/boost/hana/fwd/map.hpp index 25ff7add35..bff0b012f0 100644 --- a/boost/hana/fwd/map.hpp +++ b/boost/hana/fwd/map.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::map`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -17,14 +17,17 @@ Distributed under the Boost Software License, Version 1.0. #include <boost/hana/fwd/insert.hpp> #include <boost/hana/fwd/keys.hpp> -#include <utility> - BOOST_HANA_NAMESPACE_BEGIN //! Tag representing `hana::map`s. //! @relates hana::map struct map_tag { }; + namespace detail { + template <typename ...Pairs> + struct make_map_type; + } + //! @ingroup group-datatypes //! Basic associative container requiring unique, `Comparable` and //! `Hashable` keys. @@ -42,7 +45,7 @@ BOOST_HANA_NAMESPACE_BEGIN //! - the fact that `hana::map<Pairs...>` is, or is not, a dependent type //! //! In particular, the last point is very important; `hana::map<Pairs...>` - //! is only a shortcut for + //! is basically equivalent to //! @code //! decltype(hana::make_pair(std::declval<Pairs>()...)) //! @endcode @@ -106,6 +109,14 @@ BOOST_HANA_NAMESPACE_BEGIN template <typename ...P> explicit constexpr map(P&& ...pairs); + //! Assign a map to another map __with the exact same type__. Only + //! exists when all the elements of the map are copy-assignable. + constexpr map& operator=(map const& other); + + //! Move-assign a map to another map __with the exact same type__. + //! Only exists when all the elements of the map are move-assignable. + constexpr map& operator=(map&& other); + //! Equivalent to `hana::equal` template <typename X, typename Y> friend constexpr auto operator==(X&& x, Y&& y); @@ -120,7 +131,7 @@ BOOST_HANA_NAMESPACE_BEGIN }; #else template <typename ...Pairs> - using map = decltype(hana::make<map_tag>(std::declval<Pairs>()...)); + using map = typename detail::make_map_type<Pairs...>::type; #endif //! Function object for creating a `hana::map`. diff --git a/boost/hana/fwd/max.hpp b/boost/hana/fwd/max.hpp index 7a63fbc270..e34d558e25 100644 --- a/boost/hana/fwd/max.hpp +++ b/boost/hana/fwd/max.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::max`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/maximum.hpp b/boost/hana/fwd/maximum.hpp index b725a68fa3..9a49e83d40 100644 --- a/boost/hana/fwd/maximum.hpp +++ b/boost/hana/fwd/maximum.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::maximum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/members.hpp b/boost/hana/fwd/members.hpp index aaf9472faa..a9f2d82bfb 100644 --- a/boost/hana/fwd/members.hpp +++ b/boost/hana/fwd/members.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::members`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/min.hpp b/boost/hana/fwd/min.hpp index 2aeb7bda22..349787b571 100644 --- a/boost/hana/fwd/min.hpp +++ b/boost/hana/fwd/min.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::min`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/minimum.hpp b/boost/hana/fwd/minimum.hpp index 93926d92a6..df80196bc6 100644 --- a/boost/hana/fwd/minimum.hpp +++ b/boost/hana/fwd/minimum.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::minimum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/minus.hpp b/boost/hana/fwd/minus.hpp index a113e47dbb..3b3b3ff428 100644 --- a/boost/hana/fwd/minus.hpp +++ b/boost/hana/fwd/minus.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::minus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/mod.hpp b/boost/hana/fwd/mod.hpp index 1ed87eb5a5..c0872803fc 100644 --- a/boost/hana/fwd/mod.hpp +++ b/boost/hana/fwd/mod.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::mod`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/monadic_compose.hpp b/boost/hana/fwd/monadic_compose.hpp index e5edfcc133..e9adde1bc2 100644 --- a/boost/hana/fwd/monadic_compose.hpp +++ b/boost/hana/fwd/monadic_compose.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::monadic_compose`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/monadic_fold_left.hpp b/boost/hana/fwd/monadic_fold_left.hpp index 786019b0b4..c037989dea 100644 --- a/boost/hana/fwd/monadic_fold_left.hpp +++ b/boost/hana/fwd/monadic_fold_left.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::monadic_fold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/monadic_fold_right.hpp b/boost/hana/fwd/monadic_fold_right.hpp index 692eacbdf4..2028e15369 100644 --- a/boost/hana/fwd/monadic_fold_right.hpp +++ b/boost/hana/fwd/monadic_fold_right.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::monadic_fold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/mult.hpp b/boost/hana/fwd/mult.hpp index cc624e76f2..d322071d9c 100644 --- a/boost/hana/fwd/mult.hpp +++ b/boost/hana/fwd/mult.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::mult`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/negate.hpp b/boost/hana/fwd/negate.hpp index 2be58f2252..6c4f70da8d 100644 --- a/boost/hana/fwd/negate.hpp +++ b/boost/hana/fwd/negate.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::negate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/none.hpp b/boost/hana/fwd/none.hpp index 158f4c93d7..d0d2da94a9 100644 --- a/boost/hana/fwd/none.hpp +++ b/boost/hana/fwd/none.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::none`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/none_of.hpp b/boost/hana/fwd/none_of.hpp index 2455f1a9da..3e57cf1d65 100644 --- a/boost/hana/fwd/none_of.hpp +++ b/boost/hana/fwd/none_of.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::none_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/not.hpp b/boost/hana/fwd/not.hpp index f343a417ab..08d19d2bd5 100644 --- a/boost/hana/fwd/not.hpp +++ b/boost/hana/fwd/not.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::not_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/not_equal.hpp b/boost/hana/fwd/not_equal.hpp index 4c7bdbfbcf..7063a3796c 100644 --- a/boost/hana/fwd/not_equal.hpp +++ b/boost/hana/fwd/not_equal.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::not_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/one.hpp b/boost/hana/fwd/one.hpp index 65df2bf3c4..d2c67b7228 100644 --- a/boost/hana/fwd/one.hpp +++ b/boost/hana/fwd/one.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::one`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/optional.hpp b/boost/hana/fwd/optional.hpp index 934eca809a..28bb68e8af 100644 --- a/boost/hana/fwd/optional.hpp +++ b/boost/hana/fwd/optional.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::optional`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/or.hpp b/boost/hana/fwd/or.hpp index 1d2ad1a348..c14efc8e34 100644 --- a/boost/hana/fwd/or.hpp +++ b/boost/hana/fwd/or.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::or_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/ordering.hpp b/boost/hana/fwd/ordering.hpp index 6e9f25dfa0..78c9e2c3b8 100644 --- a/boost/hana/fwd/ordering.hpp +++ b/boost/hana/fwd/ordering.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::ordering`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/pair.hpp b/boost/hana/fwd/pair.hpp index 0a36da1875..897e87ad12 100644 --- a/boost/hana/fwd/pair.hpp +++ b/boost/hana/fwd/pair.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::pair`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/partition.hpp b/boost/hana/fwd/partition.hpp index 4b8cf00f18..b7a7d3a2ae 100644 --- a/boost/hana/fwd/partition.hpp +++ b/boost/hana/fwd/partition.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::partition`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/permutations.hpp b/boost/hana/fwd/permutations.hpp index af2805d333..7aeb27b2e8 100644 --- a/boost/hana/fwd/permutations.hpp +++ b/boost/hana/fwd/permutations.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::permutations`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/plus.hpp b/boost/hana/fwd/plus.hpp index e1a6e058f2..6d6cac82e2 100644 --- a/boost/hana/fwd/plus.hpp +++ b/boost/hana/fwd/plus.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::plus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/power.hpp b/boost/hana/fwd/power.hpp index 77ae209a90..c94b841194 100644 --- a/boost/hana/fwd/power.hpp +++ b/boost/hana/fwd/power.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::power`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/prefix.hpp b/boost/hana/fwd/prefix.hpp index 515739f077..78592e11f2 100644 --- a/boost/hana/fwd/prefix.hpp +++ b/boost/hana/fwd/prefix.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::prefix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/prepend.hpp b/boost/hana/fwd/prepend.hpp index 445dae921d..8bb44ea2db 100644 --- a/boost/hana/fwd/prepend.hpp +++ b/boost/hana/fwd/prepend.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::prepend`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/product.hpp b/boost/hana/fwd/product.hpp index f8a1c67f7d..96bbd77c4e 100644 --- a/boost/hana/fwd/product.hpp +++ b/boost/hana/fwd/product.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/range.hpp b/boost/hana/fwd/range.hpp index 4ddb5a96b8..82d0f75232 100644 --- a/boost/hana/fwd/range.hpp +++ b/boost/hana/fwd/range.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::range`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/remove.hpp b/boost/hana/fwd/remove.hpp index 7f9191d4ab..88254410a9 100644 --- a/boost/hana/fwd/remove.hpp +++ b/boost/hana/fwd/remove.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::remove`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/remove_at.hpp b/boost/hana/fwd/remove_at.hpp index 6e25e4db45..f997d6e4c5 100644 --- a/boost/hana/fwd/remove_at.hpp +++ b/boost/hana/fwd/remove_at.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::remove_at` and `boost::hana::remove_at_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/remove_if.hpp b/boost/hana/fwd/remove_if.hpp index 4d6a9722cc..590a6e195e 100644 --- a/boost/hana/fwd/remove_if.hpp +++ b/boost/hana/fwd/remove_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::remove_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/remove_range.hpp b/boost/hana/fwd/remove_range.hpp index 5274a0e579..1645cce598 100644 --- a/boost/hana/fwd/remove_range.hpp +++ b/boost/hana/fwd/remove_range.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::remove_range` and `boost::hana::remove_range_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/repeat.hpp b/boost/hana/fwd/repeat.hpp index dbb39eea0b..0151b5c9e0 100644 --- a/boost/hana/fwd/repeat.hpp +++ b/boost/hana/fwd/repeat.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::repeat`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/replace.hpp b/boost/hana/fwd/replace.hpp index 81eec5b1ae..6edb858a7f 100644 --- a/boost/hana/fwd/replace.hpp +++ b/boost/hana/fwd/replace.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::replace`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/replace_if.hpp b/boost/hana/fwd/replace_if.hpp index 36df3eb40a..e3fe882125 100644 --- a/boost/hana/fwd/replace_if.hpp +++ b/boost/hana/fwd/replace_if.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::replace_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/replicate.hpp b/boost/hana/fwd/replicate.hpp index 0580d90601..4861adabae 100644 --- a/boost/hana/fwd/replicate.hpp +++ b/boost/hana/fwd/replicate.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::replicate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/reverse.hpp b/boost/hana/fwd/reverse.hpp index 0c5bb5c7f9..b47b610bb8 100644 --- a/boost/hana/fwd/reverse.hpp +++ b/boost/hana/fwd/reverse.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::reverse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/reverse_fold.hpp b/boost/hana/fwd/reverse_fold.hpp index c5a770b576..607dd2dc4d 100644 --- a/boost/hana/fwd/reverse_fold.hpp +++ b/boost/hana/fwd/reverse_fold.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::reverse_fold`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/scan_left.hpp b/boost/hana/fwd/scan_left.hpp index 4ec8987a92..2418196d32 100644 --- a/boost/hana/fwd/scan_left.hpp +++ b/boost/hana/fwd/scan_left.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::scan_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/scan_right.hpp b/boost/hana/fwd/scan_right.hpp index f23dfd1104..c99cc911e9 100644 --- a/boost/hana/fwd/scan_right.hpp +++ b/boost/hana/fwd/scan_right.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::scan_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/second.hpp b/boost/hana/fwd/second.hpp index edbbaa36fe..6dc4623b79 100644 --- a/boost/hana/fwd/second.hpp +++ b/boost/hana/fwd/second.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::second`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/set.hpp b/boost/hana/fwd/set.hpp index 2b0fdc5284..55bd72d248 100644 --- a/boost/hana/fwd/set.hpp +++ b/boost/hana/fwd/set.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::set`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -72,6 +72,10 @@ BOOST_HANA_NAMESPACE_BEGIN #ifdef BOOST_HANA_DOXYGEN_INVOKED template <typename implementation_defined> struct set { + //! Default-construct a set. This constructor only exists when all the + //! elements of the set are default-constructible. + constexpr set() = default; + //! Copy-construct a set from another set. This constructor only //! exists when all the elements of the set are copy-constructible. constexpr set(set const& other) = default; diff --git a/boost/hana/fwd/size.hpp b/boost/hana/fwd/size.hpp index b3c4e3ba96..8999b91413 100644 --- a/boost/hana/fwd/size.hpp +++ b/boost/hana/fwd/size.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::size`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/slice.hpp b/boost/hana/fwd/slice.hpp index 82eae5b29a..f8dfafc02d 100644 --- a/boost/hana/fwd/slice.hpp +++ b/boost/hana/fwd/slice.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::slice` and `boost::hana::slice_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/sort.hpp b/boost/hana/fwd/sort.hpp index 3cb1fdabc7..c0d45aee23 100644 --- a/boost/hana/fwd/sort.hpp +++ b/boost/hana/fwd/sort.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::sort`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/span.hpp b/boost/hana/fwd/span.hpp index 2a46ebd88a..047b2bc174 100644 --- a/boost/hana/fwd/span.hpp +++ b/boost/hana/fwd/span.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::span`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/string.hpp b/boost/hana/fwd/string.hpp index c3476d7e72..ab23d52aea 100644 --- a/boost/hana/fwd/string.hpp +++ b/boost/hana/fwd/string.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::string`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -106,6 +106,12 @@ BOOST_HANA_NAMESPACE_BEGIN //! > a bit complicated for the time being. template <typename implementation_defined> struct string { + // Default-construct a `hana::string`; no-op since `hana::string` is stateless. + constexpr string() = default; + + // Copy-construct a `hana::string`; no-op since `hana::string` is stateless. + constexpr string(string const&) = default; + //! Equivalent to `hana::equal` template <typename X, typename Y> friend constexpr auto operator==(X&& x, Y&& y); diff --git a/boost/hana/fwd/suffix.hpp b/boost/hana/fwd/suffix.hpp index ec3002aeef..331854fe5d 100644 --- a/boost/hana/fwd/suffix.hpp +++ b/boost/hana/fwd/suffix.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::suffix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/sum.hpp b/boost/hana/fwd/sum.hpp index 273f43c77b..c565ecd7f7 100644 --- a/boost/hana/fwd/sum.hpp +++ b/boost/hana/fwd/sum.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::sum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/symmetric_difference.hpp b/boost/hana/fwd/symmetric_difference.hpp index d23d637c30..2908daaeee 100644 --- a/boost/hana/fwd/symmetric_difference.hpp +++ b/boost/hana/fwd/symmetric_difference.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::symmetric_difference`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/take_back.hpp b/boost/hana/fwd/take_back.hpp index 60560aa3d9..fa4dde5e3c 100644 --- a/boost/hana/fwd/take_back.hpp +++ b/boost/hana/fwd/take_back.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::take_back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/take_front.hpp b/boost/hana/fwd/take_front.hpp index fe46b35133..9ce3b9c030 100644 --- a/boost/hana/fwd/take_front.hpp +++ b/boost/hana/fwd/take_front.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::take_front` and `boost::hana::take_front_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/take_while.hpp b/boost/hana/fwd/take_while.hpp index 7807512cc4..29f1ba24e0 100644 --- a/boost/hana/fwd/take_while.hpp +++ b/boost/hana/fwd/take_while.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::take_while`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/tap.hpp b/boost/hana/fwd/tap.hpp index 0f186c021b..846c1d00e6 100644 --- a/boost/hana/fwd/tap.hpp +++ b/boost/hana/fwd/tap.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::tap`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/then.hpp b/boost/hana/fwd/then.hpp index 83768e6ffb..b4adf3d4fe 100644 --- a/boost/hana/fwd/then.hpp +++ b/boost/hana/fwd/then.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::then`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/transform.hpp b/boost/hana/fwd/transform.hpp index 5f2518db78..af645f3d23 100644 --- a/boost/hana/fwd/transform.hpp +++ b/boost/hana/fwd/transform.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::transform`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/tuple.hpp b/boost/hana/fwd/tuple.hpp index 1624b3d296..f51ab9ac22 100644 --- a/boost/hana/fwd/tuple.hpp +++ b/boost/hana/fwd/tuple.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::tuple`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/type.hpp b/boost/hana/fwd/type.hpp index d3390cf5bd..c3c220db78 100644 --- a/boost/hana/fwd/type.hpp +++ b/boost/hana/fwd/type.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::type` and related utilities. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -37,18 +37,25 @@ BOOST_HANA_NAMESPACE_BEGIN //! //! //! @note - //! For subtle reasons having to do with ADL, the actual representation of - //! `hana::type` is implementation-defined. In particular, `hana::type` - //! may be a dependent type, so one should not attempt to do pattern - //! matching on it. However, one can assume that `hana::type` _inherits_ - //! from `hana::basic_type`, which can be useful when declaring overloaded - //! functions: + //! For subtle reasons, the actual representation of `hana::type` is + //! implementation-defined. In particular, `hana::type` may be a dependent + //! type, so one should not attempt to do pattern matching on it. However, + //! one can assume that `hana::type` _inherits_ from `hana::basic_type`, + //! which can be useful when declaring overloaded functions: //! @code //! template <typename T> //! void f(hana::basic_type<T>) { //! // do something with T //! } //! @endcode + //! The full story is that [ADL][] causes template arguments to be + //! instantiated. Hence, if `hana::type` were defined naively, expressions + //! like `hana::type<T>{} == hana::type<U>{}` would cause both `T` and `U` + //! to be instantiated. This is usually not a problem, except when `T` or + //! `U` should not be instantiated. To avoid these instantiations, + //! `hana::type` is implemented using some cleverness, and that is + //! why the representation is implementation-defined. When that + //! behavior is not required, `hana::basic_type` can be used instead. //! //! //! @anchor type_lvalues_and_rvalues @@ -86,6 +93,8 @@ BOOST_HANA_NAMESPACE_BEGIN //! The hash of a type is just that type itself. In other words, `hash` //! is the identity function on `hana::type`s. //! @include example/type/hashable.cpp + //! + //! [ADL]: http://en.cppreference.com/w/cpp/language/adl #ifdef BOOST_HANA_DOXYGEN_INVOKED template <typename T> struct type { diff --git a/boost/hana/fwd/unfold_left.hpp b/boost/hana/fwd/unfold_left.hpp index 3e68e549d5..d753222630 100644 --- a/boost/hana/fwd/unfold_left.hpp +++ b/boost/hana/fwd/unfold_left.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::unfold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/unfold_right.hpp b/boost/hana/fwd/unfold_right.hpp index b688d7606f..53ee56fc48 100644 --- a/boost/hana/fwd/unfold_right.hpp +++ b/boost/hana/fwd/unfold_right.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::unfold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/union.hpp b/boost/hana/fwd/union.hpp index 38df48e941..ccf539221f 100644 --- a/boost/hana/fwd/union.hpp +++ b/boost/hana/fwd/union.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::union_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/unique.hpp b/boost/hana/fwd/unique.hpp index 4271f23a9e..5eab73eb3b 100644 --- a/boost/hana/fwd/unique.hpp +++ b/boost/hana/fwd/unique.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::unique`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/unpack.hpp b/boost/hana/fwd/unpack.hpp index 457cacea97..f66c29ae8b 100644 --- a/boost/hana/fwd/unpack.hpp +++ b/boost/hana/fwd/unpack.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::unpack`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/value.hpp b/boost/hana/fwd/value.hpp index 4a64507c7b..7db9384f77 100644 --- a/boost/hana/fwd/value.hpp +++ b/boost/hana/fwd/value.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::value`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/while.hpp b/boost/hana/fwd/while.hpp index e9efc4464d..14923797b5 100644 --- a/boost/hana/fwd/while.hpp +++ b/boost/hana/fwd/while.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::while_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/zero.hpp b/boost/hana/fwd/zero.hpp index dc35dd4d6d..412614786d 100644 --- a/boost/hana/fwd/zero.hpp +++ b/boost/hana/fwd/zero.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::zero`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/zip.hpp b/boost/hana/fwd/zip.hpp index e5d1c8d178..505decfcf0 100644 --- a/boost/hana/fwd/zip.hpp +++ b/boost/hana/fwd/zip.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::zip`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/zip_shortest.hpp b/boost/hana/fwd/zip_shortest.hpp index 33dbd6220b..5f0622789d 100644 --- a/boost/hana/fwd/zip_shortest.hpp +++ b/boost/hana/fwd/zip_shortest.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::zip_shortest`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/zip_shortest_with.hpp b/boost/hana/fwd/zip_shortest_with.hpp index 65c2e2acda..47d5a43b61 100644 --- a/boost/hana/fwd/zip_shortest_with.hpp +++ b/boost/hana/fwd/zip_shortest_with.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::zip_shortest_with`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/fwd/zip_with.hpp b/boost/hana/fwd/zip_with.hpp index 19dd314aa6..3e153a3e6a 100644 --- a/boost/hana/fwd/zip_with.hpp +++ b/boost/hana/fwd/zip_with.hpp @@ -2,7 +2,7 @@ @file Forward declares `boost::hana::zip_with`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/greater.hpp b/boost/hana/greater.hpp index ee75bb806a..84f7e23a1a 100644 --- a/boost/hana/greater.hpp +++ b/boost/hana/greater.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::greater`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/greater_equal.hpp b/boost/hana/greater_equal.hpp index 116c890b49..e9b34d2587 100644 --- a/boost/hana/greater_equal.hpp +++ b/boost/hana/greater_equal.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::greater_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/group.hpp b/boost/hana/group.hpp index 66f005a347..b21cd6b5f0 100644 --- a/boost/hana/group.hpp +++ b/boost/hana/group.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::group`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -97,7 +97,7 @@ BOOST_HANA_NAMESPACE_BEGIN } static constexpr auto info = compute_info(); - static constexpr auto offsets = info.first; + static constexpr auto group_offsets = info.first; static constexpr auto group_sizes = info.second; template <typename S, typename Xs, std::size_t ...i> @@ -106,7 +106,8 @@ BOOST_HANA_NAMESPACE_BEGIN detail::get_subsequence_( static_cast<Xs&&>(xs), typename offset_by< - offsets[i], std::make_index_sequence<group_sizes[i]> + group_offsets[i], + std::make_index_sequence<group_sizes[i]> >::type{} )... ); diff --git a/boost/hana/if.hpp b/boost/hana/if.hpp index f65b514be7..5d7f2bb969 100644 --- a/boost/hana/if.hpp +++ b/boost/hana/if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::if_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -21,7 +21,7 @@ Distributed under the Boost Software License, Version 1.0. BOOST_HANA_NAMESPACE_BEGIN //! @cond template <typename Cond, typename Then, typename Else> - constexpr decltype(auto) if_t::operator()(Cond&& cond, Then&& then, Else&& else_) const { + constexpr decltype(auto) if_t::operator()(Cond&& cond, Then&& then_, Else&& else_) const { using Bool = typename hana::tag_of<Cond>::type; using If = BOOST_HANA_DISPATCH_IF(if_impl<Bool>, hana::Logical<Bool>::value @@ -33,7 +33,7 @@ BOOST_HANA_NAMESPACE_BEGIN #endif return If::apply(static_cast<Cond&&>(cond), - static_cast<Then&&>(then), + static_cast<Then&&>(then_), static_cast<Else&&>(else_)); } //! @endcond diff --git a/boost/hana/insert.hpp b/boost/hana/insert.hpp index 706549c5d6..3752a64a29 100644 --- a/boost/hana/insert.hpp +++ b/boost/hana/insert.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::insert`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/insert_range.hpp b/boost/hana/insert_range.hpp index a5e86a51a5..26ad8f765e 100644 --- a/boost/hana/insert_range.hpp +++ b/boost/hana/insert_range.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::insert_range`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/integral_constant.hpp b/boost/hana/integral_constant.hpp index 2d8f4df7ca..edabfe454c 100644 --- a/boost/hana/integral_constant.hpp +++ b/boost/hana/integral_constant.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::integral_constant`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/intersection.hpp b/boost/hana/intersection.hpp index 16d7d211be..a9859d8f42 100644 --- a/boost/hana/intersection.hpp +++ b/boost/hana/intersection.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::intersection`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/intersperse.hpp b/boost/hana/intersperse.hpp index 2ef8eb329c..13e8240a13 100644 --- a/boost/hana/intersperse.hpp +++ b/boost/hana/intersperse.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::intersperse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/is_disjoint.hpp b/boost/hana/is_disjoint.hpp index dcea16c89b..c4ffc73121 100644 --- a/boost/hana/is_disjoint.hpp +++ b/boost/hana/is_disjoint.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::is_disjoint`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/is_empty.hpp b/boost/hana/is_empty.hpp index ac1051914b..a8b68fa61a 100644 --- a/boost/hana/is_empty.hpp +++ b/boost/hana/is_empty.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::is_empty`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/is_subset.hpp b/boost/hana/is_subset.hpp index 546bc9baa5..7ef3e2bed5 100644 --- a/boost/hana/is_subset.hpp +++ b/boost/hana/is_subset.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::is_subset`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/keys.hpp b/boost/hana/keys.hpp index d6d521b7e2..b27be1d756 100644 --- a/boost/hana/keys.hpp +++ b/boost/hana/keys.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::keys`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/lazy.hpp b/boost/hana/lazy.hpp index 073fbca5af..5cb9a8a3ab 100644 --- a/boost/hana/lazy.hpp +++ b/boost/hana/lazy.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::lazy`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -74,7 +74,7 @@ BOOST_HANA_NAMESPACE_BEGIN X, typename detail::decay<Args>::type... > operator()(Args&& ...args) const& { return {detail::lazy_secret{}, - hana::get_impl<0>(storage_), static_cast<Args&&>(args)...}; + hana::at_c<0>(storage_), static_cast<Args&&>(args)...}; } template <typename ...Args> @@ -83,7 +83,7 @@ BOOST_HANA_NAMESPACE_BEGIN X, typename detail::decay<Args>::type... > operator()(Args&& ...args) && { return {detail::lazy_secret{}, - static_cast<X&&>(hana::get_impl<0>(storage_)), + static_cast<X&&>(hana::at_c<0>(storage_)), static_cast<Args&&>(args)... }; } @@ -117,39 +117,39 @@ BOOST_HANA_NAMESPACE_BEGIN 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_)... + return hana::at_c<0>(expr.storage_)( + hana::at_c<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_)... + return hana::at_c<0>(expr.storage_)( + hana::at_c<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_))... + return static_cast<F&&>(hana::at_c<0>(expr.storage_))( + static_cast<Args&&>(hana::at_c<n+1>(expr.storage_))... ); } // lazy_value_t template <typename X> static constexpr X const& apply(lazy_value_t<X> const& expr) - { return hana::get_impl<0>(expr.storage_); } + { return hana::at_c<0>(expr.storage_); } template <typename X> static constexpr X& apply(lazy_value_t<X>& expr) - { return hana::get_impl<0>(expr.storage_); } + { return hana::at_c<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_)); } + { return static_cast<X&&>(hana::at_c<0>(expr.storage_)); } }; ////////////////////////////////////////////////////////////////////////// diff --git a/boost/hana/length.hpp b/boost/hana/length.hpp index f8493a77c5..44c195b390 100644 --- a/boost/hana/length.hpp +++ b/boost/hana/length.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::length`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/less.hpp b/boost/hana/less.hpp index eff6d3709b..05cceabb1d 100644 --- a/boost/hana/less.hpp +++ b/boost/hana/less.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::less`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -103,8 +103,8 @@ BOOST_HANA_NAMESPACE_BEGIN >> { 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); + constexpr auto is_less = hana::less(hana::value<X>(), hana::value<Y>()); + constexpr bool truth_value = hana::if_(is_less, true, false); return hana::bool_c<truth_value>; } }; diff --git a/boost/hana/less_equal.hpp b/boost/hana/less_equal.hpp index 3a04f9b3c5..d3d0efe911 100644 --- a/boost/hana/less_equal.hpp +++ b/boost/hana/less_equal.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::less_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/lexicographical_compare.hpp b/boost/hana/lexicographical_compare.hpp index bb2ca15a43..e8363ad9f1 100644 --- a/boost/hana/lexicographical_compare.hpp +++ b/boost/hana/lexicographical_compare.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::lexicographical_compare`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/lift.hpp b/boost/hana/lift.hpp index a91c43bacc..b8ab3431c2 100644 --- a/boost/hana/lift.hpp +++ b/boost/hana/lift.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::lift`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/map.hpp b/boost/hana/map.hpp index 3161d9b777..cccf6cf3b9 100644 --- a/boost/hana/map.hpp +++ b/boost/hana/map.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::map`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -27,6 +27,7 @@ Distributed under the Boost Software License, Version 1.0. #include <boost/hana/detail/fast_and.hpp> #include <boost/hana/detail/has_duplicates.hpp> #include <boost/hana/detail/hash_table.hpp> +#include <boost/hana/detail/intrinsics.hpp> #include <boost/hana/detail/operators/adl.hpp> #include <boost/hana/detail/operators/comparable.hpp> #include <boost/hana/detail/operators/searchable.hpp> @@ -73,6 +74,51 @@ BOOST_HANA_NAMESPACE_BEGIN ////////////////////////////////////////////////////////////////////////// //! @cond namespace detail { + template <typename ...> + struct storage_is_default_constructible; + template <typename ...T> + struct storage_is_default_constructible<hana::basic_tuple<T...>> { + static constexpr bool value = detail::fast_and< + BOOST_HANA_TT_IS_CONSTRUCTIBLE(T)... + >::value; + }; + + template <typename ...> + struct storage_is_copy_constructible; + template <typename ...T> + struct storage_is_copy_constructible<hana::basic_tuple<T...>> { + static constexpr bool value = detail::fast_and< + BOOST_HANA_TT_IS_CONSTRUCTIBLE(T, T const&)... + >::value; + }; + + template <typename ...> + struct storage_is_move_constructible; + template <typename ...T> + struct storage_is_move_constructible<hana::basic_tuple<T...>> { + static constexpr bool value = detail::fast_and< + BOOST_HANA_TT_IS_CONSTRUCTIBLE(T, T&&)... + >::value; + }; + + template <typename ...> + struct storage_is_copy_assignable; + template <typename ...T> + struct storage_is_copy_assignable<hana::basic_tuple<T...>> { + static constexpr bool value = detail::fast_and< + BOOST_HANA_TT_IS_ASSIGNABLE(T, T const&)... + >::value; + }; + + template <typename ...> + struct storage_is_move_assignable; + template <typename ...T> + struct storage_is_move_assignable<hana::basic_tuple<T...>> { + static constexpr bool value = detail::fast_and< + BOOST_HANA_TT_IS_ASSIGNABLE(T, T&&)... + >::value; + }; + template <typename HashTable, typename Storage> struct map_impl : detail::searchable_operators<map_impl<HashTable, Storage>> @@ -99,16 +145,62 @@ BOOST_HANA_NAMESPACE_BEGIN : storage(static_cast<Storage&&>(xs)) { } - constexpr map_impl() = default; - constexpr map_impl(map_impl const& other) = default; - constexpr map_impl(map_impl&& other) = default; + template <typename ...Dummy, typename = typename std::enable_if< + detail::storage_is_default_constructible<Storage, Dummy...>::value + >::type> + constexpr map_impl() + : storage() + { } + + template <typename ...Dummy, typename = typename std::enable_if< + detail::storage_is_copy_constructible<Storage, Dummy...>::value + >::type> + constexpr map_impl(map_impl const& other) + : storage(other.storage) + { } + + template <typename ...Dummy, typename = typename std::enable_if< + detail::storage_is_move_constructible<Storage, Dummy...>::value + >::type> + constexpr map_impl(map_impl&& other) + : storage(static_cast<Storage&&>(other.storage)) + { } + + template <typename ...Dummy, typename = typename std::enable_if< + detail::storage_is_move_assignable<Storage, Dummy...>::value + >::type> + constexpr map_impl& operator=(map_impl&& other) { + storage = static_cast<Storage&&>(other.storage); + return *this; + } + + template <typename ...Dummy, typename = typename std::enable_if< + detail::storage_is_copy_assignable<Storage, Dummy...>::value + >::type> + constexpr map_impl& operator=(map_impl const& other) { + storage = other.storage; + return *this; + } + + // Prevent the compiler from defining the default copy and move + // constructors, which interfere with the SFINAE above. + ~map_impl() = default; }; //! @endcond template <typename Storage> struct KeyAtIndex { template <std::size_t i> - using apply = decltype(hana::first(hana::get_impl<i>(std::declval<Storage>()))); + using apply = decltype(hana::first(hana::at_c<i>(std::declval<Storage>()))); + }; + + template <typename ...Pairs> + struct make_map_type { + using Storage = hana::basic_tuple<Pairs...>; + using HashTable = typename detail::make_hash_table< + detail::KeyAtIndex<Storage>::template apply, sizeof...(Pairs) + >::type; + using type = detail::map_impl<HashTable, Storage>; }; } @@ -146,14 +238,8 @@ BOOST_HANA_NAMESPACE_BEGIN "hana::make_map({keys, values}...) requires all the keys to have different hashes"); #endif - 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 detail::map_impl<HashTable, Storage>{ - hana::make_basic_tuple(static_cast<Pairs&&>(pairs)...) - }; + using Map = typename detail::make_map_type<typename detail::decay<Pairs>::type...>::type; + return Map{hana::make_basic_tuple(static_cast<Pairs&&>(pairs)...)}; } }; @@ -251,10 +337,20 @@ BOOST_HANA_NAMESPACE_BEGIN } template <typename Map, typename Key> - static constexpr auto apply(Map&& map, Key const& key) { - constexpr bool contains = hana::value<decltype(hana::contains(map, key))>(); + static constexpr auto apply_impl(Map&& map, Key const& key, hana::false_) { return erase_key_helper(static_cast<Map&&>(map), key, - hana::bool_c<contains>); + hana::contains(map, key)); + } + + template <typename Map, typename Key> + static constexpr auto apply_impl(Map&& map, Key const&, hana::true_) { + return static_cast<Map&&>(map); + } + + template <typename Map, typename Key> + static constexpr auto apply(Map&& map, Key const& key) { + constexpr bool is_empty = decltype(hana::length(map))::value == 0; + return apply_impl(static_cast<Map&&>(map), key, hana::bool_<is_empty>{}); } }; @@ -326,6 +422,20 @@ BOOST_HANA_NAMESPACE_BEGIN }; template <> + struct contains_impl<map_tag> { + template <typename Map, typename Key> + static constexpr auto apply(Map const&, 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; + return hana::bool_<!decltype(hana::is_nothing(MaybeIndex{}))::value>{}; + } + }; + + template <> struct any_of_impl<map_tag> { template <typename M, typename Pred> static constexpr auto apply(M const& map, Pred const& pred) diff --git a/boost/hana/max.hpp b/boost/hana/max.hpp index b470c92e71..80889a791c 100644 --- a/boost/hana/max.hpp +++ b/boost/hana/max.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::max`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/maximum.hpp b/boost/hana/maximum.hpp index 36eaf1008d..14cb7abfd4 100644 --- a/boost/hana/maximum.hpp +++ b/boost/hana/maximum.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::maximum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/members.hpp b/boost/hana/members.hpp index ffa933bfe8..13a5209288 100644 --- a/boost/hana/members.hpp +++ b/boost/hana/members.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::members`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/min.hpp b/boost/hana/min.hpp index 08f4cd9738..f8c887147b 100644 --- a/boost/hana/min.hpp +++ b/boost/hana/min.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::min`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/minimum.hpp b/boost/hana/minimum.hpp index 96b2444b6b..8b6f41d8c8 100644 --- a/boost/hana/minimum.hpp +++ b/boost/hana/minimum.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::minimum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/minus.hpp b/boost/hana/minus.hpp index 067c3665c8..007a3ec24e 100644 --- a/boost/hana/minus.hpp +++ b/boost/hana/minus.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::minus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/mod.hpp b/boost/hana/mod.hpp index 052df99ac9..f64b12f211 100644 --- a/boost/hana/mod.hpp +++ b/boost/hana/mod.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::mod`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/monadic_compose.hpp b/boost/hana/monadic_compose.hpp index 5bd8c5b8e4..064bfc24d3 100644 --- a/boost/hana/monadic_compose.hpp +++ b/boost/hana/monadic_compose.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::monadic_compose`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/monadic_fold_left.hpp b/boost/hana/monadic_fold_left.hpp index 7f28f9e508..e06c405604 100644 --- a/boost/hana/monadic_fold_left.hpp +++ b/boost/hana/monadic_fold_left.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::monadic_fold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/monadic_fold_right.hpp b/boost/hana/monadic_fold_right.hpp index 46fb450439..7026b058c3 100644 --- a/boost/hana/monadic_fold_right.hpp +++ b/boost/hana/monadic_fold_right.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::monadic_fold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/mult.hpp b/boost/hana/mult.hpp index 248607bc1d..9eb89a0cf2 100644 --- a/boost/hana/mult.hpp +++ b/boost/hana/mult.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::mult`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/negate.hpp b/boost/hana/negate.hpp index f0986f6fac..2b87e7d6a6 100644 --- a/boost/hana/negate.hpp +++ b/boost/hana/negate.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::negate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/none.hpp b/boost/hana/none.hpp index 2079fc2efb..0d8d499dfe 100644 --- a/boost/hana/none.hpp +++ b/boost/hana/none.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::none`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/none_of.hpp b/boost/hana/none_of.hpp index 2c1fbec1d0..4cf3ffd2d9 100644 --- a/boost/hana/none_of.hpp +++ b/boost/hana/none_of.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::none_of`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/not.hpp b/boost/hana/not.hpp index 87ff508b29..2475f637f1 100644 --- a/boost/hana/not.hpp +++ b/boost/hana/not.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::not_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/not_equal.hpp b/boost/hana/not_equal.hpp index 891bab7499..099574bdd0 100644 --- a/boost/hana/not_equal.hpp +++ b/boost/hana/not_equal.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::not_equal`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/one.hpp b/boost/hana/one.hpp index 47b902da60..b8d759b8c0 100644 --- a/boost/hana/one.hpp +++ b/boost/hana/one.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::one`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/optional.hpp b/boost/hana/optional.hpp index f99a489d3d..b3fe78b645 100644 --- a/boost/hana/optional.hpp +++ b/boost/hana/optional.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::optional`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/or.hpp b/boost/hana/or.hpp index a97510a474..b6aceac0c1 100644 --- a/boost/hana/or.hpp +++ b/boost/hana/or.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::or_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/ordering.hpp b/boost/hana/ordering.hpp index 0be8bcaf6a..2e8294a892 100644 --- a/boost/hana/ordering.hpp +++ b/boost/hana/ordering.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::ordering`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/pair.hpp b/boost/hana/pair.hpp index 5a4bf87e23..75cd9e287b 100644 --- a/boost/hana/pair.hpp +++ b/boost/hana/pair.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::pair`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -12,9 +12,9 @@ Distributed under the Boost Software License, Version 1.0. #include <boost/hana/fwd/pair.hpp> -#include <boost/hana/basic_tuple.hpp> #include <boost/hana/config.hpp> #include <boost/hana/detail/decay.hpp> +#include <boost/hana/detail/ebo.hpp> #include <boost/hana/detail/intrinsics.hpp> #include <boost/hana/detail/operators/adl.hpp> #include <boost/hana/detail/operators/comparable.hpp> @@ -28,26 +28,37 @@ Distributed under the Boost Software License, Version 1.0. BOOST_HANA_NAMESPACE_BEGIN + namespace detail { + template <int> struct pix; // pair index + } + ////////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////////// //! @cond template <typename First, typename Second> - struct pair : detail::operators::adl<pair<First, Second>> { + struct pair : detail::operators::adl<pair<First, Second>> + , private detail::ebo<detail::pix<0>, First> + , private detail::ebo<detail::pix<1>, Second> + { + // Default constructor template <typename ...dummy, typename = typename std::enable_if< BOOST_HANA_TT_IS_CONSTRUCTIBLE(First, dummy...) && BOOST_HANA_TT_IS_CONSTRUCTIBLE(Second, dummy...) >::type> constexpr pair() - : storage_() + : detail::ebo<detail::pix<0>, First>() + , detail::ebo<detail::pix<1>, Second>() { } + // Variadic constructors template <typename ...dummy, typename = typename std::enable_if< BOOST_HANA_TT_IS_CONSTRUCTIBLE(First, First const&, dummy...) && BOOST_HANA_TT_IS_CONSTRUCTIBLE(Second, Second const&, dummy...) >::type> - constexpr pair(First const& first, Second const& second) - : storage_{first, second} + constexpr pair(First const& fst, Second const& snd) + : detail::ebo<detail::pix<0>, First>(fst) + , detail::ebo<detail::pix<1>, Second>(snd) { } template <typename T, typename U, typename = typename std::enable_if< @@ -55,34 +66,43 @@ BOOST_HANA_NAMESPACE_BEGIN BOOST_HANA_TT_IS_CONVERTIBLE(U&&, Second) >::type> constexpr pair(T&& t, U&& u) - : storage_{static_cast<T&&>(t), static_cast<U&&>(u)} + : detail::ebo<detail::pix<0>, First>(static_cast<T&&>(t)) + , detail::ebo<detail::pix<1>, Second>(static_cast<U&&>(u)) { } + + // Possibly converting copy and move constructors template <typename T, typename U, typename = typename std::enable_if< + BOOST_HANA_TT_IS_CONSTRUCTIBLE(First, T const&) && + BOOST_HANA_TT_IS_CONSTRUCTIBLE(Second, U const&) && BOOST_HANA_TT_IS_CONVERTIBLE(T const&, First) && BOOST_HANA_TT_IS_CONVERTIBLE(U const&, Second) >::type> constexpr pair(pair<T, U> const& other) - : storage_{hana::get_impl<0>(other.storage_), - hana::get_impl<1>(other.storage_)} + : detail::ebo<detail::pix<0>, First>(detail::ebo_get<detail::pix<0>>(other)) + , detail::ebo<detail::pix<1>, Second>(detail::ebo_get<detail::pix<1>>(other)) { } template <typename T, typename U, typename = typename std::enable_if< + BOOST_HANA_TT_IS_CONSTRUCTIBLE(First, T&&) && + BOOST_HANA_TT_IS_CONSTRUCTIBLE(Second, U&&) && BOOST_HANA_TT_IS_CONVERTIBLE(T&&, First) && BOOST_HANA_TT_IS_CONVERTIBLE(U&&, Second) >::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_))} + : detail::ebo<detail::pix<0>, First>(static_cast<T&&>(detail::ebo_get<detail::pix<0>>(other))) + , detail::ebo<detail::pix<1>, Second>(static_cast<U&&>(detail::ebo_get<detail::pix<1>>(other))) { } + + // Copy and move assignment template <typename T, typename U, typename = typename std::enable_if< BOOST_HANA_TT_IS_ASSIGNABLE(First&, T const&) && BOOST_HANA_TT_IS_ASSIGNABLE(Second&, U const&) >::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_); + detail::ebo_get<detail::pix<0>>(*this) = detail::ebo_get<detail::pix<0>>(other); + detail::ebo_get<detail::pix<1>>(*this) = detail::ebo_get<detail::pix<1>>(other); return *this; } @@ -91,16 +111,26 @@ BOOST_HANA_NAMESPACE_BEGIN BOOST_HANA_TT_IS_ASSIGNABLE(Second&, U&&) >::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_)); + detail::ebo_get<detail::pix<0>>(*this) = static_cast<T&&>(detail::ebo_get<detail::pix<0>>(other)); + detail::ebo_get<detail::pix<1>>(*this) = static_cast<U&&>(detail::ebo_get<detail::pix<1>>(other)); return *this; } - using hana_tag = pair_tag; - basic_tuple<First, Second> storage_; + // Prevent the compiler from defining the default copy and move + // constructors, which interfere with the SFINAE above. + ~pair() = default; + + friend struct first_impl<pair_tag>; + friend struct second_impl<pair_tag>; + template <typename F, typename S> friend struct pair; }; //! @endcond + template <typename First, typename Second> + struct tag_of<pair<First, Second>> { + using type = pair_tag; + }; + ////////////////////////////////////////////////////////////////////////// // Operators ////////////////////////////////////////////////////////////////////////// @@ -131,16 +161,46 @@ BOOST_HANA_NAMESPACE_BEGIN 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 <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second>& p) { + return detail::ebo_get<detail::pix<0>>( + static_cast<detail::ebo<detail::pix<0>, First>&>(p) + ); + } + template <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second> const& p) { + return detail::ebo_get<detail::pix<0>>( + static_cast<detail::ebo<detail::pix<0>, First> const&>(p) + ); + } + template <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second>&& p) { + return detail::ebo_get<detail::pix<0>>( + static_cast<detail::ebo<detail::pix<0>, First>&&>(p) + ); + } }; 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_); } + template <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second>& p) { + return detail::ebo_get<detail::pix<1>>( + static_cast<detail::ebo<detail::pix<1>, Second>&>(p) + ); + } + template <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second> const& p) { + return detail::ebo_get<detail::pix<1>>( + static_cast<detail::ebo<detail::pix<1>, Second> const&>(p) + ); + } + template <typename First, typename Second> + static constexpr decltype(auto) apply(hana::pair<First, Second>&& p) { + return detail::ebo_get<detail::pix<1>>( + static_cast<detail::ebo<detail::pix<1>, Second>&&>(p) + ); + } }; BOOST_HANA_NAMESPACE_END diff --git a/boost/hana/partition.hpp b/boost/hana/partition.hpp index 00ce243081..fdea39bcf5 100644 --- a/boost/hana/partition.hpp +++ b/boost/hana/partition.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::partition`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -72,16 +72,16 @@ BOOST_HANA_NAMESPACE_BEGIN return indices; } - static constexpr auto left = compute_left(); - static constexpr auto right = compute_right(); + static constexpr auto left_indices = compute_left(); + static constexpr auto right_indices = 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))...) + hana::make<S>(hana::at_c<left_indices[l]>(static_cast<Xs&&>(xs))...), + hana::make<S>(hana::at_c<right_indices[r]>(static_cast<Xs&&>(xs))...) ); } }; diff --git a/boost/hana/permutations.hpp b/boost/hana/permutations.hpp index 52052ff03d..601bd71889 100644 --- a/boost/hana/permutations.hpp +++ b/boost/hana/permutations.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::permutations`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/plus.hpp b/boost/hana/plus.hpp index 65a2cc99d5..bc916773a7 100644 --- a/boost/hana/plus.hpp +++ b/boost/hana/plus.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::plus`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/power.hpp b/boost/hana/power.hpp index b6f6de10a9..2a69ebfcaa 100644 --- a/boost/hana/power.hpp +++ b/boost/hana/power.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::power`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/prefix.hpp b/boost/hana/prefix.hpp index 64f3bfb984..e8b0c21947 100644 --- a/boost/hana/prefix.hpp +++ b/boost/hana/prefix.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::prefix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/prepend.hpp b/boost/hana/prepend.hpp index c4f5f0e0e3..825d0b02f6 100644 --- a/boost/hana/prepend.hpp +++ b/boost/hana/prepend.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::prepend`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/product.hpp b/boost/hana/product.hpp index e6e584205a..8d3bad9fc3 100644 --- a/boost/hana/product.hpp +++ b/boost/hana/product.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::product`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/range.hpp b/boost/hana/range.hpp index ecddc7da8e..96a9d02e6a 100644 --- a/boost/hana/range.hpp +++ b/boost/hana/range.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::range`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/remove.hpp b/boost/hana/remove.hpp index 8472eb3c48..7d2925d38e 100644 --- a/boost/hana/remove.hpp +++ b/boost/hana/remove.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::remove`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/remove_at.hpp b/boost/hana/remove_at.hpp index 4ee061857d..490ebe8c10 100644 --- a/boost/hana/remove_at.hpp +++ b/boost/hana/remove_at.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::remove_at` and `boost::hana::remove_at_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/remove_if.hpp b/boost/hana/remove_if.hpp index fb85c3d424..b379957f3b 100644 --- a/boost/hana/remove_if.hpp +++ b/boost/hana/remove_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::remove_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/remove_range.hpp b/boost/hana/remove_range.hpp index d9fd3c1476..5e46f8ae77 100644 --- a/boost/hana/remove_range.hpp +++ b/boost/hana/remove_range.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::remove_range` and `boost::hana::remove_range_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/repeat.hpp b/boost/hana/repeat.hpp index 20184f89a1..71854dadbe 100644 --- a/boost/hana/repeat.hpp +++ b/boost/hana/repeat.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::repeat`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/replace.hpp b/boost/hana/replace.hpp index 3ef6528116..f797f6de2a 100644 --- a/boost/hana/replace.hpp +++ b/boost/hana/replace.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::replace`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/replace_if.hpp b/boost/hana/replace_if.hpp index 4d4490614d..026dd61354 100644 --- a/boost/hana/replace_if.hpp +++ b/boost/hana/replace_if.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::replace_if`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/replicate.hpp b/boost/hana/replicate.hpp index 1f73abc280..f04c4d8a44 100644 --- a/boost/hana/replicate.hpp +++ b/boost/hana/replicate.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::replicate`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/reverse.hpp b/boost/hana/reverse.hpp index d0156d076c..3e4126963f 100644 --- a/boost/hana/reverse.hpp +++ b/boost/hana/reverse.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::reverse`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/reverse_fold.hpp b/boost/hana/reverse_fold.hpp index 1cf07f931f..5735a423dd 100644 --- a/boost/hana/reverse_fold.hpp +++ b/boost/hana/reverse_fold.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::reverse_fold`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/scan_left.hpp b/boost/hana/scan_left.hpp index 1660e086f1..2ce4eb5d9d 100644 --- a/boost/hana/scan_left.hpp +++ b/boost/hana/scan_left.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::scan_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/scan_right.hpp b/boost/hana/scan_right.hpp index 3a8a11d435..a24eb145ca 100644 --- a/boost/hana/scan_right.hpp +++ b/boost/hana/scan_right.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::scan_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/second.hpp b/boost/hana/second.hpp index e5c28c9036..f17e7a67bf 100644 --- a/boost/hana/second.hpp +++ b/boost/hana/second.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::second`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/set.hpp b/boost/hana/set.hpp index c40547b77b..58979ed47f 100644 --- a/boost/hana/set.hpp +++ b/boost/hana/set.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::set`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -72,6 +72,7 @@ BOOST_HANA_NAMESPACE_BEGIN : storage(static_cast<tuple<Xs...>&&>(xs)) { } + constexpr set() = default; constexpr set(set const& other) = default; constexpr set(set&& other) = default; }; diff --git a/boost/hana/size.hpp b/boost/hana/size.hpp index 8f3ba09961..762349cb62 100644 --- a/boost/hana/size.hpp +++ b/boost/hana/size.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::size`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/slice.hpp b/boost/hana/slice.hpp index 81eac951b1..2cc4c7209d 100644 --- a/boost/hana/slice.hpp +++ b/boost/hana/slice.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::slice` and `boost::hana::slice_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/sort.hpp b/boost/hana/sort.hpp index 3e6edb2cbd..65d6d27da3 100644 --- a/boost/hana/sort.hpp +++ b/boost/hana/sort.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::sort`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/span.hpp b/boost/hana/span.hpp index 8a5f02ef36..2219749b05 100644 --- a/boost/hana/span.hpp +++ b/boost/hana/span.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::span`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/string.hpp b/boost/hana/string.hpp index a1b97d2cbb..f9f6cae8e9 100644 --- a/boost/hana/string.hpp +++ b/boost/hana/string.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::string`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/suffix.hpp b/boost/hana/suffix.hpp index aca7064016..68a344db6e 100644 --- a/boost/hana/suffix.hpp +++ b/boost/hana/suffix.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::suffix`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/sum.hpp b/boost/hana/sum.hpp index 58713290b6..5c86dafdde 100644 --- a/boost/hana/sum.hpp +++ b/boost/hana/sum.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::sum`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/symmetric_difference.hpp b/boost/hana/symmetric_difference.hpp index f753c99561..1ca56d3019 100644 --- a/boost/hana/symmetric_difference.hpp +++ b/boost/hana/symmetric_difference.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::symmetric_difference`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/take_back.hpp b/boost/hana/take_back.hpp index 9a12d93b23..e838d0ac14 100644 --- a/boost/hana/take_back.hpp +++ b/boost/hana/take_back.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::take_back`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -57,10 +57,10 @@ BOOST_HANA_NAMESPACE_BEGIN 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; + constexpr std::size_t len = decltype(hana::length(xs))::value; + constexpr std::size_t start = n < len ? len - n : 0; return take_back_helper<start>(static_cast<Xs&&>(xs), - std::make_index_sequence<(n < size ? n : size)>{}); + std::make_index_sequence<(n < len ? n : len)>{}); } }; BOOST_HANA_NAMESPACE_END diff --git a/boost/hana/take_front.hpp b/boost/hana/take_front.hpp index 65c851aaf4..b32fbb6e50 100644 --- a/boost/hana/take_front.hpp +++ b/boost/hana/take_front.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::take_front` and `boost::hana::take_front_c`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/take_while.hpp b/boost/hana/take_while.hpp index cda4816294..392459dca7 100644 --- a/boost/hana/take_while.hpp +++ b/boost/hana/take_while.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::take_while`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/tap.hpp b/boost/hana/tap.hpp index 37f757e7cc..7d37318255 100644 --- a/boost/hana/tap.hpp +++ b/boost/hana/tap.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::tap`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/then.hpp b/boost/hana/then.hpp index 9ee05ced0f..b6d74cfcf4 100644 --- a/boost/hana/then.hpp +++ b/boost/hana/then.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::then`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/traits.hpp b/boost/hana/traits.hpp index 2f599d78ab..983bdf8367 100644 --- a/boost/hana/traits.hpp +++ b/boost/hana/traits.hpp @@ -3,7 +3,7 @@ Defines function-like equivalents to the standard `<type_traits>`, and also to some utilities like `std::declval`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/transform.hpp b/boost/hana/transform.hpp index 7ecba83602..7c68731e2d 100644 --- a/boost/hana/transform.hpp +++ b/boost/hana/transform.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::transform`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/tuple.hpp b/boost/hana/tuple.hpp index 7273a6c2e0..cab5eaa4d6 100644 --- a/boost/hana/tuple.hpp +++ b/boost/hana/tuple.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::tuple`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -44,12 +44,30 @@ BOOST_HANA_NAMESPACE_BEGIN 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)) + hana::at_c<n>(xs) = hana::at_c<n>(static_cast<Ys&&>(ys)) ), int{})...}; (void)sequence; } struct from_index_sequence_t { }; + + template <typename Tuple, typename ...Yn> + struct is_same_tuple : std::false_type { }; + + template <typename Tuple> + struct is_same_tuple<typename detail::decay<Tuple>::type, Tuple> + : std::true_type + { }; + + template <bool SameTuple, bool SameNumberOfElements, typename Tuple, typename ...Yn> + struct enable_tuple_variadic_ctor; + + template <typename ...Xn, typename ...Yn> + struct enable_tuple_variadic_ctor<false, true, hana::tuple<Xn...>, Yn...> + : std::enable_if< + detail::fast_and<BOOST_HANA_TT_IS_CONSTRUCTIBLE(Xn, Yn&&)...>::value + > + { }; } ////////////////////////////////////////////////////////////////////////// @@ -75,7 +93,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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))...) + : storage_(hana::at_c<n>(static_cast<Other&&>(other))...) { } public: @@ -93,8 +111,9 @@ BOOST_HANA_NAMESPACE_BEGIN : storage_(xn...) { } - template <typename ...Yn, typename = typename std::enable_if< - detail::fast_and<BOOST_HANA_TT_IS_CONSTRUCTIBLE(Xn, Yn&&)...>::value + template <typename ...Yn, typename = typename detail::enable_tuple_variadic_ctor< + detail::is_same_tuple<tuple, Yn...>::value, + sizeof...(Xn) == sizeof...(Yn), tuple, Yn... >::type> constexpr tuple(Yn&& ...yn) : storage_(static_cast<Yn&&>(yn)...) @@ -221,7 +240,7 @@ BOOST_HANA_NAMESPACE_BEGIN 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_); + return hana::at_c<index>(static_cast<Xs&&>(xs).storage_); } }; @@ -251,17 +270,17 @@ BOOST_HANA_NAMESPACE_BEGIN // compile-time optimizations (to reduce the # of function instantiations) template <std::size_t n, typename ...Xs> constexpr decltype(auto) at_c(tuple<Xs...> const& xs) { - return hana::get_impl<n>(xs.storage_); + return hana::at_c<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_); + return hana::at_c<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_); + return hana::at_c<n>(static_cast<tuple<Xs...>&&>(xs).storage_); } ////////////////////////////////////////////////////////////////////////// diff --git a/boost/hana/type.hpp b/boost/hana/type.hpp index 853c843fb1..80a498753f 100644 --- a/boost/hana/type.hpp +++ b/boost/hana/type.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::type` and related utilities. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/unfold_left.hpp b/boost/hana/unfold_left.hpp index fff29f77ca..d058ac06b2 100644 --- a/boost/hana/unfold_left.hpp +++ b/boost/hana/unfold_left.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::unfold_left`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/unfold_right.hpp b/boost/hana/unfold_right.hpp index c0f4457c53..f9917bd7e1 100644 --- a/boost/hana/unfold_right.hpp +++ b/boost/hana/unfold_right.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::unfold_right`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/union.hpp b/boost/hana/union.hpp index 733f7b6bcd..d7bb4403bf 100644 --- a/boost/hana/union.hpp +++ b/boost/hana/union.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::union`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/unique.hpp b/boost/hana/unique.hpp index c4f30798eb..9485c332f0 100644 --- a/boost/hana/unique.hpp +++ b/boost/hana/unique.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::unique`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/unpack.hpp b/boost/hana/unpack.hpp index 03a4faed93..485821ea7a 100644 --- a/boost/hana/unpack.hpp +++ b/boost/hana/unpack.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::unpack`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/value.hpp b/boost/hana/value.hpp index fd5b5c4029..52d0581853 100644 --- a/boost/hana/value.hpp +++ b/boost/hana/value.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::value`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/version.hpp b/boost/hana/version.hpp index 33b30eddfc..2699bfd0e5 100644 --- a/boost/hana/version.hpp +++ b/boost/hana/version.hpp @@ -2,7 +2,7 @@ @file Defines macros for tracking the version of the library. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -24,11 +24,11 @@ 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 0 +#define BOOST_HANA_MINOR_VERSION 1 //! @ingroup group-config //! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`. -#define BOOST_HANA_PATCH_VERSION 2 +#define BOOST_HANA_PATCH_VERSION 0 //! @ingroup group-config //! Macro expanding to the full version of the library, in hexadecimal diff --git a/boost/hana/while.hpp b/boost/hana/while.hpp index 36ff9ab64b..312494daf5 100644 --- a/boost/hana/while.hpp +++ b/boost/hana/while.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::while_`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/zero.hpp b/boost/hana/zero.hpp index 6c71c9247d..baba9691f6 100644 --- a/boost/hana/zero.hpp +++ b/boost/hana/zero.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::zero`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/zip.hpp b/boost/hana/zip.hpp index d777701ad9..d18f3ef5e7 100644 --- a/boost/hana/zip.hpp +++ b/boost/hana/zip.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::zip`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/zip_shortest.hpp b/boost/hana/zip_shortest.hpp index 4976d79f42..761ca188c5 100644 --- a/boost/hana/zip_shortest.hpp +++ b/boost/hana/zip_shortest.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::zip_shortest`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ diff --git a/boost/hana/zip_shortest_with.hpp b/boost/hana/zip_shortest_with.hpp index c0e6dcdf65..fc43f35239 100644 --- a/boost/hana/zip_shortest_with.hpp +++ b/boost/hana/zip_shortest_with.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::zip_shortest_with`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ @@ -52,9 +52,10 @@ BOOST_HANA_NAMESPACE_BEGIN constexpr std::size_t lengths[] = { decltype(hana::length(xs))::value... }; - constexpr std::size_t min = *detail::min_element(lengths, lengths + sizeof...(xs)); + constexpr std::size_t min_len = + *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>)... + hana::take_front(static_cast<Xs&&>(xs), hana::size_c<min_len>)... ); } }; diff --git a/boost/hana/zip_with.hpp b/boost/hana/zip_with.hpp index 821b97d5db..8a5e153fe0 100644 --- a/boost/hana/zip_with.hpp +++ b/boost/hana/zip_with.hpp @@ -2,7 +2,7 @@ @file Defines `boost::hana::zip_with`. -@copyright Louis Dionne 2013-2016 +@copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ |