/* @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 using namespace boost::hana; template struct invalid { static_assert(b, "invalid must not be instantiated"); }; template void adl(T) { } template void adl_pattern(_type) { } int main() { // ADL kicks in but `invalid<>` must not instantiated adl(type>); adl_pattern(type>); // ADL instantiates the types recursively, make sure that works too adl(decltype_(type>)); adl_pattern(decltype_(type>)); }