title: Structured bindings width
body: <p>Is it possible to determine how many variable names should I to specify in square brackets using structured bindings syntax to match the number of data members of a plain right hand side <code>struct</code>?</p>
  
  <p>I want to make a part of generic library, which uses structured bindings to decompose arbitrary classes into its constituents. At the moment there is no variadic version of structured bindings (and, I think, cannot be for current syntax proposed), but my first thought is to make a set of overloadings of some function <code>decompose()</code>, which performs decomposition of <code>struct</code> parameter into a set of its constituents. <code>decompose()</code> should be overloaded by number of parameter's (which is <code>struct</code>) data members. Currently <code>constexpr if</code>  syntax also can be used to dispatch this. But how can I emulate something similar to <code>sizeof...</code> operator for above purposes? I can't use <code>auto [a, b, c]</code> syntax somewhere in SFINAE constructions, because it is <em>a decomposition declaration</em> and AFAIK any declaration cannot be used inside <code>decltype</code>, also I cannot use it for my purposes in the body of lambda functions because lambda functions cannot be used inside template arguments too.</p>
  
  <p>Surely I want to have builtin operator (with syntax like <code>sizeof[] S</code>/<code>sizeof[](S)</code> for <code>class S</code>), but something like the following is also would be acceptable:</p>
  
  <pre><code>template&lt; typename type, typename = void &gt;
  struct sizeof_struct
  {
  
  };
  
  template&lt; typename type &gt;
  struct sizeof_struct&lt; type, std::void_t&lt; decltype([] { auto &amp;&amp; [p1] = std::declval&lt; type &gt;(); void(p1); }) &gt; &gt;
      : std::integral_constant&lt; std::size_t, 1 &gt;
  {
  
  };
  
  template&lt; typename type &gt;
  struct sizeof_struct&lt; type, std::void_t&lt; decltype([] { auto &amp;&amp; [p1, p2] = std::declval&lt; type &gt;(); void(p1); void(p2);  }) &gt; &gt;
      : std::integral_constant&lt; std::size_t, 2 &gt;
  {
  
  };
  
  ... etc up to some reasonable arity
  </code></pre>
  
  <p>Maybe <code>constexpr</code> lambda will allow us to use them into template's arguments. What do you think?</p>
  
  <p>Will it be possible with coming <em>Concepts</em>?</p>