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

Guillaume Racicot <gufideg at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Version|7.3.1                       |8.1.0
            Summary|Template argument deduction |Template argument deduction
                   |fails with reference auto   |fails with reference
                   |template parameter          |template parameter

--- Comment #1 from Guillaume Racicot <gufideg at gmail dot com> ---
Still happen with GCC 8.1. It also happen with normal reference template
parameter.

Here's a simplified test case:

    template<int&> struct foo {};

    template<int& t>
    void deduce(foo<t>) {}

    extern int bar;
    int bar;

    int main() {
        deduce(foo<bar>{});
    }


This example compiles in MSVC and Clang. https://godbolt.org/g/kxKkb5

Reply via email to