title: Idiomatic way to get size_type from std::array or the like
body: <p>Triggered by <a href="https://stackoverflow.com/questions/57604516/how-to-represent-boost-array-as-a-pointer-of-a-type/57604718#57604718">this question</a>, I came up with code along the line of (it was <code>boost::array</code> in my answer, but the same applies for <code>std::array</code>):</p>
  
  <pre><code>template &lt;std::array&lt;char,1&gt;::size_type size&gt;
  void DataTransform(std::array&lt;char, size&gt; data) {
  
  }
  </code></pre>
  
  <p>And I am not happy at all with <code>&lt;std::array&lt;char,1&gt;::size_type</code>. I have to instantiate with a certain size, to know the <code>size_type</code>. For <code>std::array</code> I could have used <code>size_t</code>, but then what about the general case? What if <code>size_type</code> is not <code>size_t</code>? Or even more general (ie not for <code>std::array</code>) what if <code>size_type</code> is different for different sizes (silly but possible)?</p>
  
  <p>I know this question is rather academic and there are many ways to avoid this "problem" completely (eg I could have passed iterators). Anyhow, I wonder...</p>
  
  <p><strong>What is a clean way to determine the <code>size_type</code> for templates that need a <code>size</code> (of type <code>size_type</code>) to be instantiated?</strong></p>
  
  <p>More generally, the question could be formulated as: How can I get my hands on a templates typedef that may depend on a template parameter before actually instantiating the template.</p>