How to force a constexpr function to be evaluated at compile time
<p>Given the following code:</p>

<pre><code>constexpr int omg() { return 42; }

const int a = omg(); // NOT guaranteed to be evaluated at compile time

constexpr const int a = omg(); // guaranteed to be evaluated at compile time
</code></pre>

<p>Is there a way to force something to be evaluated at compile time without assigning it to something constexpr (or in a compile time context like a template parameter ot enum shenanigans)?</p>

<p>Something like this:</p>

<pre><code>const int a = force_compute_at_compile_time(omg());
</code></pre>

<p>perhaps something like this (which doesn't compile - I'm not much into constexpr yet):</p>

<pre><code>template&lt;typename T&gt; constexpr T force_compute_at_compile_time(constexpr const T&amp; a) { return a; }
</code></pre>