enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Compilation problems


From: Jeremy Sawicki
Subject: Re: [Enigma-devel] Compilation problems
Date: Thu, 23 Jan 2003 02:35:07 -0500

At 12:01 AM 1/22/03 +0100, Daniel Heck wrote:
>I noticed this too.  Problem is: it doesn't compile with g++ 3.2 if I do
>not use the rel_ops package.  I will try to find a solution that works
>for both compilers.  For now, you can simply remove the "using namespace
>std::rel_ops" line.

Let's just avoid the whole issue of rel_ops by explicitly defining
operator != where it is needed.  I hadn't intended to be using an
automatically generated one.


========
--- Level.h     19 Jan 2003 17:17:24 -0000      1.1
+++ Level.h     23 Jan 2003 07:22:34 -0000
@@ -127,6 +127,7 @@
   void setSecondEndPiece(unsigned int x, unsigned int y);

   bool operator == (const RubberBand &other) const;
+  bool operator != (const RubberBand &other) const;

 private:
   int m_naturalLength;
@@ -192,6 +193,7 @@

   bool operator < (const Oscillator &other) const;
   bool operator == (const Oscillator &other) const;
+  bool operator != (const Oscillator &other) const;

 private:
   unsigned int m_x;
========


========
--- Level.cpp   19 Jan 2003 17:17:24 -0000      1.1
+++ Level.cpp   23 Jan 2003 07:23:30 -0000
@@ -19,9 +19,6 @@
 #include "Level.h"
 #include <stdio.h>

-#include <utility>              // For operator!=
-using namespace std::rel_ops;
-
 using namespace std;

 Marble::Marble()
@@ -99,6 +96,11 @@
   return true;
 }

+bool RubberBand::operator != (const RubberBand &other) const
+{
+  return !(*this == other);
+}
+
 ScrambleItem::ScrambleItem()
 : m_x(0)
 , m_y(0)
@@ -163,6 +165,11 @@
   }

   return true;
+}
+
+bool Oscillator::operator != (const Oscillator &other) const
+{
+  return !(*this == other);
 }

 SignalLocation::SignalLocation()
========





reply via email to

[Prev in Thread] Current Thread [Next in Thread]