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

Luke Dalessandro <ldalessandro at gmail dot com> changed:

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

--- Comment #1 from Luke Dalessandro <ldalessandro at gmail dot com> ---
This continues to be a problem in gcc trunk, and impacts real code that
attempts to use `std::span` arguments.

Templates are not necessary to reproduce this behavior.

https://godbolt.org/z/PYreGK

```
struct span
{
    span( int (&)[2] ) {}
};

bool foo(span) {
    return true;
}

bool baz(bool (&op)(span), int i, int j) {
    int array[] = {i, j};
    int (&ref)[2] = array;
    return op(ref);
}

auto x = baz(foo, 1, 2);
```

Reply via email to