title: C++11 constexpr function pass parameter
body: <p>Consider the following code:</p>
  
  <pre><code>static constexpr int make_const(const int i){
      return i;
  }
  
  void t1(const int i)
  {
      constexpr int ii = make_const(i);  // error occurs here (i is not a constant expression)
      std::cout&lt;&lt;ii;
  }
  
  int main()
  {
     t1(12);
  }
  </code></pre>
  
  <p>Why I have an error on make_const call?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>But this one works:</p>
  
  <pre><code>constexpr int t1(const int i)
  {
      return make_const(i);
  }
  </code></pre>
  
  <p>However, this not:</p>
  
  <pre><code>template&lt;int i&gt;
  constexpr bool do_something(){
      return i;
  }
  
  constexpr int t1(const int i)
  {
      return do_something&lt;make_const(i)&gt;();   // error occurs here (i is not a constant expression)
  }
  </code></pre>