title: Is function invocation at translation time valid?
body: <p>I'm trying to achive a function to be called only one time. But I want to save the <code>if (firstTime)</code> check.
  What I'm thinking about was:</p>
  
  <pre><code>while (1)
  {
      foo();
  }
  
  foo()
  {
      static int test = 1, srand (test);
      test++;
  }
  </code></pre>
  
  <p>But I couldn't find anything in the standard what is covering this.
  So I'm not sure about, this is undefined. And if not so, will srand be invoked as expected? If not so, is it (as the main question is) even possible to invoke functioncalls on translationtime (what would more be, behave as if), as I'm doing here?</p>