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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 06:41:23 PDT 2025


================
@@ -434,6 +434,37 @@ __datasizeof
 ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the
 type ignoring tail padding.
 
+.. _builtin_structured_binding_size-doc:
+
+__builtin_structured_binding_size (C++)
+---------------------------------------
+``__builtin_structured_binding_size`` returns the *structured binding size*
----------------
erichkeane wrote:

I don't have a better idea, but this name does NOT imply that.  I read it as "it returns the size of a thing that is already a structured binding".  Maybe something like destructured_size or something goofy?  IDK, too early in the morning to be creative.

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


More information about the cfe-commits mailing list