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

            Bug ID: 104411
           Summary: Cannot capture by reference using braced initializer
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: oliver.rosten at googlemail dot com
  Target Milestone: ---

int bar{};

auto f = [b{bar}](){};  // fine
auto g = [&b=bar](){};  // fine
auto h = [&b{bar}](){}; // error

https://godbolt.org/z/aqMb8K9Tv

Reply via email to