https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88757

            Bug ID: 88757
           Summary: GCC wrongly treats dependent name as a type when it
                    should be treated as a value
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d25fe0be at outlook dot com
  Target Milestone: ---

GCC complains "error: no declaration matches 'int C<T>::x(typename
S<T>::size)'"
when compiling the following snippet:

```
template <class T> struct C {
    static int x;
};
template <class U> struct S {
    static const int size = 1;
};
template <class T> int C<T>::x(S<T>::size);  // Here `S<T>::size` is treated as
a type.
```

GCC 8.2 / clang 7 does not exhibit this behavior.

Live example (GCC 9): https://wandbox.org/permlink/ob29FV2EK6Ie4wfY
Live example (GCC 8): https://wandbox.org/permlink/3hdIXnu8zn1QkYGP
Live example (clang 7): https://wandbox.org/permlink/m0zsTUKWIK3VjfHn

Reply via email to