https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79960

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
This is a problem with deducing through what I'm calling "non-transparent"
aliases in partial ordering.  When partial ordering compares, say, const and
const volatile, we deduce "volatile __has_tuple_size<T>" and then substitute
it, producing the odd

const volatile __has_tuple_size<volatile __has_tuple_size<T>>

which compares as different from

const volatile __has_tuple_size<T>

so we decide that they are unordered.  Oops.

My alias-equiv proposal would prevent the deduction in the first place, as
pointed out on the committee IRC the other day, which I guess would entirely
prevent constraining partial specializations.  It would be nice if you could
write instead

template <typename T, typename U = __has_tuple_size<T>> 
  struct tuple_size <const T>

this seems like an oversight, much like the former prohibition of default
template arguments on functions.

Hmm.

Reply via email to