title: Passing the caller __FILE__ __LINE__ to a function without using macro
body: <p>I'm used to this:</p>
  
  <pre><code>class Db {
    _Commit(char *file, int line) {
      Log("Commit called from %s:%d", file, line);
    }
  };
  
  #define Commit() _Commit(__FILE__, __LINE__)
  </code></pre>
  
  <p>but the big problem is that I redefine the word <code>Commit</code> globally, and in a 400k lines application framework it's a problem. And I don't want to use a specific word like <code>DbCommit</code>: I dislike redundancies like <code>db-&gt;DbCommit()</code>, or to pass the values manually everywhere: <code>db-&gt;Commit(__FILE__, __LINE__)</code> is worst.</p>
  
  <p>So, any advice?</p>