<p>While refactoring some old code I have stripped out a number of public methods that should actually of been statics as they a) don't operate on any member data or call any other member functions and b) because they might prove useful elsewhere.</p>

<p>This led me to think about the best way to group 'helper' functions together.  The Java/C# way would be to use a class of static functions with a private constructor, e.g.:</p>

<pre><code>class Helper  
{  
private:  
  Helper() { }
public:  
  static int HelperFunc1();  
  static int HelperFunc2();  
};
</code></pre>

<p>However, being C++ you could also use a namespace:</p>

<pre><code>namespace Helper  
{  
  int HelperFunc1();  
  int HelperFunc2();  
}
</code></pre>

<p>In most cases I think I would prefer the namespace approach but I wanted to know what the pros and cons of each approach are.  If used the class approach for example, would there be any overheads?</p>

The main advantage to using a namespace is that you can reopen it and add more stuff later, you can't do that with a class.  This makes this approach better for loosely coupled helpers (for example you could have a Helpers namespace for your entire library, much like all of STL is in ::std)
The main advantage of a class is that you can nest it inside the class using it, you can't nest a namespace in a class.  This makes this approach better for tightly coupled helpers.
You won't have any extra overhead having them in a class vs a namespace.