[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 11:40:21 PDT 2025


================
@@ -591,6 +591,8 @@ def err_decomp_decl_std_tuple_size_not_constant : Error<
   "is not a valid integral constant expression">;
 def note_in_binding_decl_init : Note<
   "in implicit initialization of binding declaration %0">;
+def err_arg_is_not_destructurable : Error<
+  "type %0 is not destructurable">;
----------------
AaronBallman wrote:

I'm not certain `destructurable` is a word users will really understand. How about: `type %0 is not valid for use as a structured binding initializer` or something along those lines?

https://github.com/llvm/llvm-project/pull/131515


More information about the cfe-commits mailing list