You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Can't pass dependent type template argument #727
build/main.cpp:18:74: error: template argument for template type parameter must be a type; did you forget 'typename'?
18 | template<typename T> [[nodiscard]] auto f() -> auto { return std::vector<T::value_type>(); }
| ^
| typename
/opt/compiler-explorer/clang-trunk-20231004/bin/../include/c++/v1/__iterator/wrap_iter.h:102:21: note: template parameter is declared here
102 | template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
| ^
1 error generated.
Activity
MaxSagebaum commentedon May 16, 2024
It also seems that it is not possible to declare it in any working way current:
typenamedoes not work: (https://cpp2.godbolt.org/z/x4oYsj1E5)neither
type: