title: A constexpr function with delayed initialization of local variables
body: <p>I am trying to write a <code>constexpr</code> function of the form:</p>
  
  <pre><code>constexpr int foo(bool cond) {
      int a, b, c;
      if (cond) {
          a = 1;
          b = 2;
          c = 3;
      }
      else {
          a = -1;
          b = -2;
          c = -3;
      }
  
      return a + b + c;
  }
  </code></pre>
  
  <p>However, the compiler complains that I am using uninitialized variables, despite the fact that the eventual initialization of the local variables is guaranteed.</p>
  
  <p>I could re-write the function to use ternary operators, that is, <code>int a = cond ? 1 : -1;</code>, etc., but I would prefer not to. Is there a way to convince the compiler that the local variables will be initialized?</p>