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

Fedor Chelnokov <fchelnokov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fchelnokov at gmail dot com

--- Comment #3 from Fedor Chelnokov <fchelnokov at gmail dot com> ---
Even more reduced example. Below program is accepted in Clang and MSVC:
```
template <typename T2>
struct Y {
   static constexpr T2 x{0};
};  

template<>
constexpr int Y<int>::x{1};

int main() {
    static_assert(Y<int>::x == 1);
}
```
but GCC complains:
```
duplicate initialization of 'Y<int>::x'
```
Demo: https://gcc.godbolt.org/z/TbP18z9Yq

Related discussion: https://stackoverflow.com/q/53687873/7325599

Reply via email to