title: How to find if function is static at compile time
body: <p>I have logging macro which logs the this pointer of the function but the problem is when logging macro used in static function which doesn't have this pointer and I get compilation error.</p>
  
  <p>e.g </p>
  
  <pre><code>LOG_DEBUG(msg,...) \
     Log::WriteLog(Log::LOG_DEBUG, __FILE__, __LINE__, _FUNC_NAME_, this, msg, ## __VA_ARGS__);
  </code></pre>
  
  <p>I was wondering if there was a way to check if the current method is static than I can either use this pointer or pass null and avoid compilation error.</p>
  
  <p>Please let me know if GNU provide any predefine macros to determine if current function is static or any alternate way.</p>