2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-14 00:42:22 +00:00
Files
hana/test/type/template.cpp
2014-06-08 16:41:52 -04:00

22 lines
676 B
C++

/*
@copyright Louis Dionne 2014
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/type.hpp>
#include <boost/hana/detail/static_assert.hpp>
using namespace boost::hana;
template <typename ...> struct f;
struct x1; struct x2; struct x3;
int main() {
BOOST_HANA_STATIC_ASSERT(template_<f>() == type<f<>>);
BOOST_HANA_STATIC_ASSERT(template_<f>(type<x1>) == type<f<x1>>);
BOOST_HANA_STATIC_ASSERT(template_<f>(type<x1>, type<x2>) == type<f<x1, x2>>);
BOOST_HANA_STATIC_ASSERT(template_<f>(type<x1>, type<x2>, type<x3>) == type<f<x1, x2, x3>>);
}