From d3c183186b832d7748e1094f6de1063b96ed9da3 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 20 Aug 2005 20:44:23 +0000 Subject: [PATCH] Merge in fix to hash example/documentation from 1.33 branch. [SVN r30610] --- 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 c58c127..ba44de2 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)); } +