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

            Bug ID: 93470
           Summary: [C++2a] std::reference_wrapper to function type is
                    broken
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frankhb1989 at gmail dot com
  Target Milestone: ---

In `std::reference_wrapper::operator()` in <bits/refwrap.h>:

#if __cplusplus > 201703L
          static_assert(sizeof(type), "type must be complete");
#endif

The static assertion is ill-formed when `type` is a function type, required by
instantiation of function template specialization
`std::reference_wrapper<T>::operator()` when `T` is a function type.

Reply via email to