Converting a macro to an inline function
<p>I am using some Qt code that adds a VERIFY macro that looks something like this:</p>

<pre><code>#define VERIFY(cond) \
{ \
    bool ok = cond; \
    Q_ASSERT(ok); \
}
</code></pre>

<p>The code can then use it whilst being certain the condition is actually evaluated, e.g.:</p>

<pre><code>Q_ASSERT(callSomeFunction()); // callSomeFunction not evaluated in release builds!
VERIFY(callSomeFunction());   // callSomeFunction is always evaluated
</code></pre>

<p>Disliking macros, I would instead like to turn this into an inline function:</p>

<pre><code>inline VERIFY(bool condition)
{
  Q_ASSERT(condition);
}
</code></pre>

<p>However, in release builds I am worried that the compiler would optimise out all calls to this function (as <code>Q_ASSERT</code> wouldn't actually do anything.)  I am I worrying unnecessarily or is this likely depending on the optimisation flags/compiler/etc.?  I guess I could change it to:</p>

<pre><code>inline VERIFY(bool condition)
{
  condition;
  Q_ASSERT(condition);
}
</code></pre>

<p>But, again, the compiler may be clever enough to ignore the call.</p>

<p>Is this inline alternative safe for both debug and release builds?</p>
