Closed
Description
$ clang++-16 --version
Debian clang version 16.0.0-++20221110071954+dd9f7963e434-1~exp1~20221110072047.450
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Minimalist reproducible code snippet: https://godbolt.org/z/8f45heY19
#include <tuple>
int main() {
auto [a, _] = std::make_tuple(1, 2);
[&](int i) { a += 1; }(0); // passed as expected.
[&](auto i) { a += 1; }(0); // should pass but not.
[a](int i) { a += 1; }(0); // should fail but not.
[a](int i) mutable { a += 1; }(0); // passed as expected.
}