2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-21 17:02:25 +00:00
Files
hana/test/issues/github_165.cpp
2016-02-04 11:07:41 -05:00

35 lines
670 B
C++

// 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)
#include <boost/hana/tuple.hpp>
#include <utility>
namespace hana = boost::hana;
constexpr int f() {
// copy-assign
{
hana::tuple<int> xs{1};
hana::tuple<long> ys{1};
xs = xs;
ys = xs;
}
// move-assign
{
hana::tuple<int> xs{1}, xxs{1};
hana::tuple<long> ys{1};
xs = std::move(xxs);
ys = std::move(xs);
}
return 0;
}
static_assert(f() == 0, ""); // force f() to be constexpr
int main() { }