summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/hana/test/optional/copy.trap_construct.cpp
blob: 09410ab3b0e0595b53849dbe0f192ee0ab2b8867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/optional.hpp>

#include <laws/base.hpp>
namespace hana = boost::hana;


// This test makes sure that we do not instantiate rogue contructors when
// trying to copy a hana::just.

int main() {
    auto just = hana::just(hana::test::trap_construct{});
    auto implicit_copy = just;
    decltype(just) explicit_copy(just);

    (void)implicit_copy;
    (void)explicit_copy;
}