2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-31 20:22:10 +00:00
Files
hana/example/core/make.cpp
2015-03-03 14:16:50 -05:00

30 lines
640 B
C++

/*
@copyright Louis Dionne 2015
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/core/make.hpp>
#include <boost/hana/tuple.hpp>
#include <string>
using namespace boost::hana;
int main() {
{
//! [make]
_tuple<int, char, double, std::string> ts{1, '2', 3.3, "abcd"};
BOOST_HANA_RUNTIME_CHECK(ts == make<Tuple>(1, '2', 3.3, std::string{"abcd"}));
std::string foo{"foo"}; // std::string has no notion of data type
BOOST_HANA_RUNTIME_CHECK(make<std::string>("foo") == foo);
//! [make]
}
}