title: Is there no built-in way to compute a power at compile time in C++?
body: <p>I have the following very simple template. As I learned, <code>^</code> is not the exponential operator. Now I'm looking for a way to compute this power. There are many examples with a recursive template on the internet. This is not too difficult.</p>
  
  <p>But I wonder: Is there actually no "built-in" method in C++ to compute this on compile time?</p>
  
  <pre><code>template &lt;int DIM&gt;
  class BinIdx : Idx
  {
          static const int SIZE = 3 ^ DIM; // whoops, this is NOT an exponential operator!
  }
  </code></pre>