title: Type trait for aggregate initializability in the standard library?
body: <p>The C++ standard library has <a href="http://en.cppreference.com/w/cpp/types/is_constructible" rel="noreferrer"><code>std::is_constructible&lt;Class, T...&gt;</code></a> to check if a class can be constructed from the given types as arguments.</p>
  
  <p>For example, if I have a class <code>MyClass</code> which has a constructor <code>MyClass(int, char)</code>, then <code>std::is_constructible&lt;MyClass, int, char&gt;::value</code> will be <code>true</code>.</p>
  
  <p>Is there a similar standard library type trait that will check that aggregate initialization works, i.e. <code>MyClass{int, char}</code> is well-formed and returns a <code>MyClass</code>?</p>
  
  <p><strong>My use case:</strong></p>
  
  <p>I want to write a function template that converts a <code>std::tuple</code> to a (usually POD) class using aggregate initialization, something with the following signature:</p>
  
  <pre><code>template &lt;typename Class, typename... T&gt;
  inline Class to_struct(std::tuple&lt;T...&gt;&amp;&amp; tp);
  </code></pre>
  
  <p>In order to prevent users from using this function with an invalid <code>Class</code>, I could write a <code>static_assert</code> inside this function to check if the given <code>tp</code> parameter has types that are convertible to the members of <code>Class</code>.  It seems a type trait like <code>is_aggregate_initializable&lt;Class, T...&gt;</code> would come in handy.</p>
  
  <p>I could roll my own implementation of this trait, but just for information, is there such a trait in the standard library that I've overlooked, or one that is soon to become part of the standard library?</p>