title: Laziness in C++11
body: <p>Do you know how to perform a lazy evaluation of string, like in this D snippet:</p>
  
  <pre><code>void log(lazy string msg) {
    static if (fooBarCondition)
      writefln(…) /* something with msg */
  }
  </code></pre>
  
  <p>Actually, the problem might not need laziness at all since the <em>static</em> if. Maybe it’s possible to discard <code>char const*</code> strings when not used? Like, in C++:</p>
  
  <pre><code>void log(char const *msg) {
    #ifdef DEBUG
    cout &lt;&lt; … &lt;&lt; endl; /* something with msg */
    #else /* nothing at all */
    #endif
  }
  </code></pre>
  
  <p>Any idea? Thank you.</p>