2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-14 12:52:10 +00:00
Files
hana/test/type.adl.cpp
2015-03-03 14:16:50 -05:00

24 lines
587 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/type.hpp>
using namespace boost::hana;
template <bool b = false>
struct invalid { static_assert(b, "invalid must not be instantiated"); };
template <typename T> void adl(T) { }
int main() {
// ADL kicks in but `invalid<>` must not instantiated
adl(type<invalid<>>);
// ADL instantiates the types recursively, make sure that works too
adl(decltype_(type<invalid<>>));
}