summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/hana/test/issues/github_165.cpp
blob: 2d170df8b76fe276707fa075ed041d913a6279b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright Louis Dionne 2013-2017
// 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() { }