-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
template <typename T>
struct foo {
struct bar;
};
template <typename T>
struct foo<T>::bar {};
int main() {
foo<int>::bar b;
}Cppinsights gives the following output:
template <typename T>
struct foo {
struct bar;
};
/* First instantiated from: a.cpp:12 */
#ifdef INSIGHTS_USE_TEMPLATE
template <>
struct foo<int> {
struct bar {
// inline constexpr bar() noexcept = default;
};
};
#endif
struct foo<T>::bar {};
int main() {
foo<int>::bar b;
return 0;
}
template <typename T> is missing for struct foo<T>::bar{};. This can cause problems when the template parameter name T hides some global name, which makes struct foo<T>::bar {}; a specialization.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working