[DEV] add v1.66.0

This commit is contained in:
2018-01-12 21:47:58 +01:00
parent 87059bb1af
commit a97e9ae7d4
49032 changed files with 7668950 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/assert.hpp>
#include <boost/hana/equal.hpp>
#include <boost/hana/ext/std/array.hpp>
#include <boost/hana/not_equal.hpp>
#include <array>
namespace hana = boost::hana;
constexpr std::array<int, 4> xs = {{1, 2, 3, 4}};
constexpr std::array<int, 5> ys = {{1, 2, 3, 4, 5}};
// arrays have different constexpr contents; result is a constexpr bool
static_assert(hana::equal(xs, xs), "");
// arrays have different lengths; result is an integral_constant
BOOST_HANA_CONSTANT_CHECK(hana::not_equal(xs, ys));
int main() { }

View File

@@ -0,0 +1,21 @@
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/assert.hpp>
#include <boost/hana/ext/std/array.hpp>
#include <boost/hana/unpack.hpp>
#include <array>
namespace hana = boost::hana;
int main() {
std::array<int, 5> a = {{0, 1, 2, 3, 4}};
auto b = hana::unpack(a, [](auto ...i) {
return std::array<int, sizeof...(i)>{{(i + 10)...}};
});
BOOST_HANA_RUNTIME_CHECK(b == std::array<int, 5>{{10, 11, 12, 13, 14}});
}

View File

@@ -0,0 +1,20 @@
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/at.hpp>
#include <boost/hana/drop_front.hpp>
#include <boost/hana/equal.hpp>
#include <boost/hana/ext/std/array.hpp>
#include <array>
namespace hana = boost::hana;
constexpr std::array<int, 5> a = {{0, 1, 2, 3, 4}};
static_assert(hana::at_c<2>(a) == 2, "");
static_assert(hana::equal(hana::drop_front(a), std::array<int, 4>{{1, 2, 3, 4}}), "");
int main() { }

View File

@@ -0,0 +1,23 @@
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/ext/std/array.hpp>
#include <boost/hana/less.hpp>
#include <array>
namespace hana = boost::hana;
constexpr std::array<int, 4> evens = {{2, 4, 6, 8}};
constexpr std::array<int, 4> odds = {{1, 3, 5, 7}};
constexpr std::array<int, 5> up_to_5 = {{1, 2, 3, 4, 5}};
// arrays with same length
static_assert(hana::less(odds, evens), "");
// arrays with different lengths
static_assert(hana::less(up_to_5, odds), "");
int main() { }