1// Copyright Louis Dionne 2013-2022
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5#include <boost/hana/core/when.hpp>
6namespace hana = boost::hana;
7
8
9template <typename T, typename = hana::when<true>>
10struct base_template;
11
12template <typename T>
13struct base_template<T, hana::when_valid<typename T::first_type>> { };
14
15template <typename T>
16struct base_template<T, hana::when_valid<typename T::second_type>> { };
17
18struct First { struct first_type; };
19struct Second { struct second_type; };
20
21template struct base_template<First>;
22template struct base_template<Second>;
23
24int main() { }
25

source code of boost/libs/hana/test/core/when.cpp