title: How to pass an array in place of a pointer to a function
body: <p>I have following function myfunc which takes std::span as a variable.</p>
  <pre><code>const foo*  foos     = nullptr;
  uint32_t    fooNum = 0;
  
  std::span&lt;const foo&gt; fooSpan = std::span&lt;const foo&gt;(foos, fooNum);
  
  myfunc(fooSpan)
  </code></pre>
  <p>Now I have another set of variables in array form</p>
  <pre><code>const foo fooArray[];
  uint32_t  numfoo = 0;
  </code></pre>
  <p>Is this the correct ways to call myfunc() with these variables</p>
  <pre><code>std::span&lt;const foo&gt; fooSpan = std::span&lt;const foo&gt;(foosArray, numfoo);
  myfunc(fooArray)
  </code></pre>