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

--- Comment #7 from Louis Dionne <ldionne.2 at gmail dot com> ---
Then, I think there's another bug in GCC (or maybe just a QOI issue), since the
following code compiles (wandbox[1]):

  template <typename T> constexpr T v;
  template <typename T> constexpr T v(888);

  struct S {
    constexpr S() : value(999) { }
    constexpr S(int x) : value(x) { }
    int value;
  };

  static_assert(v<S>.value == 888);


Instead, I would expect to get some error saying that I'm redefining `v` on the
second line. FWIW, Clang does think it's only a declaration [2].


[1]: https://wandbox.org/permlink/c5An5PbMbJdxa9Hj
[2]: https://wandbox.org/permlink/m9VSksjjtFhiQSab

Reply via email to