-
Notifications
You must be signed in to change notification settings - Fork 205
Remove unnecessary typename
before dependent names
#1660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
you would think, but i've seen msvc struggle without the |
/ok to test c246aa2 |
Now that's quite bizarre. This is the pattern that's causing the failures: template <typename T>
struct base {
using type = int;
};
template <typename T>
struct derived : base<T> {
using type = /*typename*/ derived::type; // Finds base<T>::type
};
template struct derived<int>; Looks like (ironically) MSVC accepts it, Clang accepts it only since 18, and GCC doesn't accept it at all: https://godbolt.org/z/EK33394hP |
oh god that's terrible code. where are we doing that? i'd prefer: template <typename T>
struct derived : base<T> {
using type = /*typename*/ derived::base::type; // Finds base<T>::type
}; |
stdexec/include/stdexec/__detail/__basic_sender.hpp Lines 389 to 394 in 770f795
Finds the __state_t in the base class:stdexec/include/stdexec/__detail/__basic_sender.hpp Lines 219 to 222 in 770f795
|
can you try changing it to: using __state_t = typename __op_state::__op_base::__state_t; ? |
Pushed a commit with that change, please retest |
/ok to test 6fa6ba9 |
Now that the minimum clang version is 16 (#1657), the code can take advantage of implicit typename, right?