diff options
Diffstat (limited to 'test/SemaTemplate/partial-order.cpp')
-rw-r--r-- | test/SemaTemplate/partial-order.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaTemplate/partial-order.cpp b/test/SemaTemplate/partial-order.cpp new file mode 100644 index 0000000000..0a151de390 --- /dev/null +++ b/test/SemaTemplate/partial-order.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++1z %s -verify + +// expected-no-diagnostics + +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; +} |