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

--- Comment #5 from Jiang An <de34 at live dot cn> ---
Function pointers seem working (https://gcc.godbolt.org/z/Mbvfafdof).

```
template<class Ti, class Tp, class = void>
constexpr bool is_array_element_initializable_from = false;
template<class Ti, class Tp>
constexpr bool is_array_element_initializable_from<Ti, Tp,
    decltype(std::declval<auto (*)(Tp&& t)
        -> decltype((void)
array_element_initialization_tester<Ti>{{std::forward<Tp>(t)}})>()
    (std::declval<Tp>()))> = true;
```

So perhaps we can simply change `decltype(_Arr<_Ti>{{std::declval<_Tp>()}})` to
`decltype(std::declval<auto (*)(_Tp&& __t) ->
decltype(_Arr<_Ti>{{std::forward<_Tp>(__t)}})>(std::declval<_Tp>()))` to
resolve this "bug".

Reply via email to