2017-01-17 10:14:37 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify
|
|
|
|
|
2017-02-16 12:22:56 +08:00
|
|
|
// expected-no-diagnostics
|
|
|
|
|
2017-01-17 10:14:37 +08:00
|
|
|
namespace hana_enable_if_idiom {
|
|
|
|
template<bool> struct A {};
|
|
|
|
template<typename, typename = A<true>> struct B;
|
|
|
|
template<typename T, bool N> struct B<T, A<N>> {};
|
|
|
|
template<typename T> struct B<T, A<T::value>> {};
|
|
|
|
struct C {
|
|
|
|
static const bool value = true;
|
|
|
|
};
|
|
|
|
B<C> b;
|
|
|
|
}
|