Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-07-24 23:16:28


Maybe the code wasn't completely polished ?

boost/queue.hpp and boost/stack.hpp contain very
interresting defintions of relationnal operators:

template <typename T, typename Cont>
bool
operator== (queue<T, Cont> const& q1, queue<T, Cont> const&q2)
{
  return q1 == q2;
}

template <typename T, typename Cont>
bool
operator!= (queue<T, Cont> const& q1, queue<T, Cont> const& q2)
{
  return q1 != q2;
}

template <typename T, typename Cont>
bool
operator<= (queue<T, Cont> const& q1, queue<T, Cont> const& q2)
{
  return q1 <= q2;
}

template <typename T, typename Cont>
bool
operator>= (queue<T, Cont> const& q1, queue<T, Cont> const& q2)
{
  return q1 >= q2;
}

template <typename T, typename Cont>
bool
operator< (queue<T, Cont> const& q1, queue<T, Cont> const& q2)
{
  return q1 < q2;
}

template <typename T, typename Cont>
bool
operator> (queue<T, Cont> const& q1, queue<T, Cont> const& q2)
{
  return q1 > q2;
}

template <typename T, typename Cont>
bool
operator== (stack<T, Cont> const& s1, stack<T, Cont> const&s2)
{
  return s1 == s2;
}

template <typename T, typename Cont>
bool
operator!= (stack<T, Cont> const& s1, stack<T, Cont> const& s2)
{
  return s1 != s2;
}

template <typename T, typename Cont>
bool
operator<= (stack<T, Cont> const& s1, stack<T, Cont> const& s2)
{
  return s1 <= s2;
}

template <typename T, typename Cont>
bool
operator>= (stack<T, Cont> const& s1, stack<T, Cont> const& s2)
{
  return s1 >= s2;
}

template <typename T, typename Cont>
bool
operator< (stack<T, Cont> const& s1, stack<T, Cont> const& s2)
{
  return s1 < s2;
}

template <typename T, typename Cont>
bool
operator> (stack<T, Cont> const& s1, stack<T, Cont> const& s2)
{
  return s1 > s2;
}

-- 
Valentin Bonnard

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk