<p>The <strong>C</strong> preprocessor is justifiably feared and shunned by the C++ community. In-lined functions, consts and templates are usually a safer and superior alternative to a <code>#define</code>.</p>

<p>The following macro: </p>

<pre><code>#define SUCCEEDED(hr) ((HRESULT)(hr) &gt;= 0)  
</code></pre>

<p>is in no way superior to the type safe:</p>

<pre><code>inline bool succeeded(int hr) { return hr &gt;= 0; }
</code></pre>

<p>But macros do have their place, please list the uses you find for macros that you <em>can't</em> do without the preprocessor. </p>

<p>Please put each use-cases in a seperate answer so it can be voted up and if you know of how to achieve one of the answers without the preprosessor point out how in that answer's comments.</p>

When you want to change the program flow (
```
return
```
,
```
break
```
and
```
continue
```
) code in a function behaves differently than code that is actually inlined in the function.
```
```
#define ASSERT_RETURN(condition, ret_val) \
if (!(condition)) { \
    assert(false && #condition); \
    return ret_val; }

// should really be in a do { } while(false) but that's another discussion.
```
```