| 1 |
// PR c++/118846 |
| 2 |
// { dg-additional-options "-fmodules" } |
| 3 |
// { dg-module-cmi M } |
| 4 |
|
| 5 |
export module M; |
| 6 |
|
| 7 |
template <int N> struct integral_constant { static constexpr int value = N; }; |
| 8 |
template <template <class> class> constexpr int cx_count_if() { return 0; } |
| 9 |
template <template <class> class P> struct mp_count_if_impl { |
| 10 |
using type = integral_constant<cx_count_if<P>()>; |
| 11 |
}; |
| 12 |
|
| 13 |
template <template <class> class> struct consume { |
| 14 |
static constexpr bool value = true; |
| 15 |
}; |
| 16 |
template <class P> struct use { |
| 17 |
using type = consume<P::template fn>; |
| 18 |
}; |