Specialization of 'template<class _Tp> struct std::less' in different namespace
<p>I am specializing the 'less' (predicate) for a data type.</p>

<p>The code looks like this:</p>

<pre><code>template&lt;&gt;
struct std::less&lt;DateTimeKey&gt;
{
   bool operator()(const DateTimeKey&amp; k1, const DateTimeKey&amp; k2) const
   {
      // Some code ...
   }
}
</code></pre>

<p>When compiling (g++ 4.4.1 on Ubuntu 9.10), I get the error:</p>

<p>Specialization of 'template struct std::less' in different namespace</p>

<p>I did some research and found that there was a 'workaround' which involved wrapping the specialization in a std namespace - i.e. changing the code to:</p>

<pre><code>namespace std {
template&lt;&gt;
struct less&lt;DateTimeKey&gt;
{
   bool operator()(const DateTimeKey&amp; k1, const DateTimeKey&amp; k2) const
   {
      // Some code ...
   }
}
}
</code></pre>

<p>which indeed, shuts the compiler up. However, that solution was from a post 5 years old (By the 'great' Victor Bazarof no less [pun unintended]). Is this fix still the way to go, or is there a better way of resolving this, or is the "old way" still valid?</p>
