Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55588 - sandbox/libs/mapreduce/examples/wordcount
From: cdm.henderson_at_[hidden]
Date: 2009-08-14 17:16:09


Author: chenderson
Date: 2009-08-14 17:16:08 EDT (Fri, 14 Aug 2009)
New Revision: 55588
URL: http://svn.boost.org/trac/boost/changeset/55588

Log:
specialisation moved into namespace for GCC compilation
Text files modified:
   sandbox/libs/mapreduce/examples/wordcount/wordcount.cpp | 14 +++++++++++---
   1 files changed, 11 insertions(+), 3 deletions(-)

Modified: sandbox/libs/mapreduce/examples/wordcount/wordcount.cpp
==============================================================================
--- sandbox/libs/mapreduce/examples/wordcount/wordcount.cpp (original)
+++ sandbox/libs/mapreduce/examples/wordcount/wordcount.cpp 2009-08-14 17:16:08 EDT (Fri, 14 Aug 2009)
@@ -120,8 +120,10 @@
 } // namespace wordcount
 
 
+namespace std {
+
 template<>
-bool std::less<wordcount::reduce_key_t>::operator()(wordcount::reduce_key_t const &first, wordcount::reduce_key_t const &second) const
+bool less<wordcount::reduce_key_t>::operator()(wordcount::reduce_key_t const &first, wordcount::reduce_key_t const &second) const
 {
     std::ptrdiff_t const len = std::min(first.second, second.second);
     int const cmp = strnicmp(first.first, second.first, len);
@@ -134,7 +136,7 @@
 }
 
 template<>
-bool std::operator==(wordcount::reduce_key_t const &first, wordcount::reduce_key_t const &second)
+bool operator==(wordcount::reduce_key_t const &first, wordcount::reduce_key_t const &second)
 {
     if (first.second != second.second)
         return false;
@@ -144,11 +146,17 @@
     return (strnicmp(first.first, second.first, first.second) == 0);
 }
 
+} // namespace std
+
+namespace boost {
+namespace mapreduce {
 template<>
-unsigned boost::mapreduce::hash_partitioner::operator()(wordcount::reduce_key_t const &key, unsigned partitions) const
+unsigned hash_partitioner::operator()(wordcount::reduce_key_t const &key, unsigned partitions) const
 {
     return boost::hash_range(key.first, key.first+key.second) % partitions;
 }
+} // namespace mapreduce {
+} // namespace boost {
 
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk