2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-22 05:12:35 +00:00
Files
hana/test/optional/copy.trap_construct.cpp
2016-02-04 11:07:41 -05:00

22 lines
576 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/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;
}