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

            Bug ID: 86648
           Summary: [9 Regression] ICE on class template argument
                    deduction
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris_oncev at hotmail dot com
  Target Milestone: ---

On compiler explorer using the gcc (trunk) compiler I get an ICE.
https://godbolt.org/g/NPtXxH

The same code works on earlier versions 8.1 and 7.3 and Clang.

```
#include <tuple>

template <class T>
struct Foo {
    static constexpr int a = 3;
};

template<class T>
struct Bar {
    static constexpr std::tuple baz = { 1, 2, Foo<T>::a };
    //         add <int, int, int> ^ 
    //         to make it compile
};

int main() {
    return std::get<2>(Bar<int>::baz);
}
```

Reply via email to