C++ Singleton Creation Problem
<p>I recently acquired some code that I want to port to Linux.  In a header file though, I have some curious code that I hope someone can shed some light on.  Within a header file, inside a namespace where other classes are defined, I have the following:</p>

<pre><code>#define CREATE_SINGLETON_METHODS(s) \
  private: \
    friend class Singleton&lt;c&gt;; \
    ##c(); \
    virtual ~##c();
</code></pre>

<p>I understand that the <code>##</code> is the token pasting operation, but I can't figure out why the original author (who I don't know, and can't contact) used it.  I have an implementation class that looks like this:</p>

<pre><code>class MapManager : public Singleton&lt;MapManager&gt; {
CREATE_SINGLETON_METHODS(MapManager)

private:
...
</code></pre>

<p>When I compile, I get the following error:</p>

<p><code>error: pasting ";" and "MapManager" does not give a valid preprocessing token</code></p>

<p>This compiles find on Windows and some earlier versions of gcc (pre 4.x).  Any ideas as to what could be going on here?  Thanks!</p>
