-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
Description
Looking to see if there's interest in such a check.
P0634, adopted for C++20, makes disambiguating dependent types using typename
unnecessary in a bunch of places. For example:
template <typename T>
using foo_t = /*typename*/ foo<T>::type;
template <typename T>
/*typename*/ T::bar f(/*typename*/ T::baz param) {
...
}
In fact, there are cases even before C++20 where typename
is redundant, namely on nondependent types:
typename /* <--- always redundant */ std::make_unsigned<int>::type f();
Such a check would allow easy migration to the C++20 feature and relieve users of the need to remember rules for where typename
is or is not necessary.
vbvictor