From 26ba72d50f72905145e5111caf5440ea81da04a0 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 20 Aug 2005 20:39:21 +0000 Subject: [PATCH] Fixed stupid error in hash point example. [SVN r30609] --- hash/doc/hash.qbk | 2 +- hash/examples/point.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hash/doc/hash.qbk b/hash/doc/hash.qbk index d68e765..eb574d6 100644 --- a/hash/doc/hash.qbk +++ b/hash/doc/hash.qbk @@ -209,7 +209,7 @@ Say you have a point class, representing a two dimensional location: bool operator==(point const& other) const { - return x = other.x && y == other.y; + return x == other.x && y == other.y; } }; diff --git a/hash/examples/point.cpp b/hash/examples/point.cpp index 30e6080..b295cc5 100644 --- a/hash/examples/point.cpp +++ b/hash/examples/point.cpp @@ -20,7 +20,7 @@ public: bool operator==(point const& other) const { - return x = other.x && y == other.y; + return x == other.x && y == other.y; } friend std::size_t hash_value(point const& p) @@ -49,3 +49,4 @@ int main() assert(point_hasher(p1) != point_hasher(p2)); assert(point_hasher(p1) != point_hasher(p3)); } +