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

Nick Matteo <gccbug at kundor dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gccbug at kundor dot org

--- Comment #2 from Nick Matteo <gccbug at kundor dot org> ---
Reported again in this reddit thread: https://www.reddit.com/r/cpp/s/seL2yBZ75q

Reproducer:

template <typename T>
struct A {
    template <typename U>
    struct B     { static constexpr int value = 0; };
};

template <>
template <typename U>
struct A<long>::B<U&> { static constexpr int value = 3; };

int main() {
    return A<long> ::B<long&>::value;
}

Return value is 0 with GCC, 3 with MSVC and Clang.
https://godbolt.org/z/dTEdGTrhq

Reply via email to