a question in NS c++ programming
<p>Hi
I added a new patch to my NS and I've seen these two errors. Does anyone know what I can do?</p>

<pre><code>error: specialization of 'bool std::less&lt;_Tp&gt;::operator()(const _Tp&amp;, const _Tp&amp;) const [with _Tp = _AlgorithmTime]' in different namespace
from definition of 'bool std::less&lt;_Tp&gt;::operator()(const _Tp&amp;, const _Tp&amp;) const [with _Tp = _AlgorithmTime]'
</code></pre>

<p>and the errors are from this code</p>

<pre><code>typedef struct _AlgorithmTime {
    // Round.
    int             round;
    // Fase.
    int             fase;
    // Valore massimo di fase.
    int             last_fase;

    public:

        _AlgorithmTime() {
            round = 0;
            fase = 0;
            last_fase = 0;
        }

        // Costruttore.
        _AlgorithmTime(int r, int f, int l) {
            round = r;
            fase = f;
            last_fase = l;
        }

        // Costruttore.
        _AlgorithmTime(const _AlgorithmTime &amp; t) {
            round = t.round;
            fase = t.fase;
            last_fase = t.last_fase;
        }

        // Operatore di uguaglianza.
        bool operator== (struct _AlgorithmTime &amp; t) {
            return ((t.fase == fase) &amp;&amp; (t.round == round));
        }

        // Operatore minore.
        bool operator &lt; (struct _AlgorithmTime &amp; t) {
            if (round &lt; t.round)
                return true;
            if (round &gt; t.round)
                return false;
            if (fase &lt; t.fase)
                return true;
            return false;
        }

        // Operatore maggiore.
        bool operator &gt; (struct _AlgorithmTime &amp; t) {
            if (round &gt; t.round)
                return true;
            if (round &lt; t.round)
                return false;
            if (fase &gt; t.fase)
                return true;
            return false;
        }

        void operator++ () {
            if (fase == last_fase) {
                round++;
                fase = 0;
                return;
            }
            fase++;
        }

        void operator-- () {
            if (fase == 0) {
                round--;
                fase = last_fase;
                return;
            }
            fase--;
        }
}AlgorithmTime;

template&lt;&gt;
bool
std::less&lt;AlgorithmTime&gt;::operator()(const AlgorithmTime &amp; t1, const AlgorithmTime &amp; t2)const
{
    if (t1.round &lt; t2.round)
        return true;
    if (t1.round &gt; t2.round)
        return false;
    if (t1.fase &lt; t2.fase)
        return true;
    return false;
}
</code></pre>

<p>Thanks</p>
