How to extract declarations (a .hpp file) from implementation (a .cpp file)?
<p>I was wondering if there was a tool (maybe GNU C++ compiler) to obtain from a .cpp file
full of functions a .hpp file with the mentioned functions declarations.</p>

<p><strong>Example</strong>:</p>

<p>I have:<br>
magic.cpp</p>

<pre><code>int foo() { return 42; }
char bar() { return 'z'; }
</code></pre>

<p>And I would like to obtain this after applying the wonderful tool:<br>
magic.hpp</p>

<pre><code>int foo();
char bar();
</code></pre>
