Force gsl::as_span to return a gsl::span<const T>?
<p>Given the following function, taking: a <strong>read-only</strong> float span (of either dynamic or any static size):</p>

<pre><code>template &lt;long N&gt; void foobar(gsl::span&lt;const float, N&gt; x);
</code></pre>

<p>Let's say I have a <code>vector&lt;float&gt;</code>. Passing that as an argument doesn't work, but neither does using <code>gsl::as_span</code>:</p>

<pre><code>std::vector&lt;float&gt; v = {1, 2, 3};
foobar(gsl::as_span(v));
</code></pre>

<p>The above does not compile. Apparently <code>gsl::as_span()</code> returns a <code>gsl::span&lt;float&gt;</code>. Besides not understanding why implicit cast to <code>gsl::span&lt;const float&gt;</code> isn't possible, is there a way to force <code>gsl::as_span()</code> to return a read-only span?</p>