Created attachment 22201
Test case
Since there is no type information about type deduced for auto placeholder in
non-type template parameter while pretty printing in diag, error message can
confuse user.
Please consider code:
template <typename, typename> struct is_same { enum { value = false};
};
template <typename Ty_> struct is_same<Ty_, Ty_> { enum { value = true };
};
template <auto> struct nonty_auto {};
using unsigned_auto_t = nonty_auto< unsigned(0)>;
using signed_auto_t = nonty_auto< int(0) >;
static_assert(is_same<unsigned_auto_t, signed_auto_t>::value, "might confuse
user");
That will result in error message:
confusing_P0127R2_pretty_printing.cc:12:1: error: static_assert failed due to
requirement 'is_same<nonty_auto<0>, nonty_auto<0> >::value' "might confuse user"
static_assert(is_same<unsigned_auto_t, signed_auto_t>::value, "might confuse
user");
Based on that user is not able distinguish between nonty_auto instantiated with
signed and unsigned literal 0.
confusing_P0127R2_pretty_printing.cc
(488 bytes, text/x-c++src)