[Cmake-commits] CMake branch, master, updated. v2.8.5-292-g8e6352f

KWSys Robot kwrobot at kitware.com
Thu Sep 1 08:10:32 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  8e6352f8dbeedff1f529a800173b19d52ff69b6b (commit)
      from  917ca9f1428efc73b9f23db9e5aa3dccbb15a513 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e6352f8dbeedff1f529a800173b19d52ff69b6b
commit 8e6352f8dbeedff1f529a800173b19d52ff69b6b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 1 08:07:36 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 1 08:10:20 2011 -0400

    KWSys: Add hash function for std::string
    
    Added hashing fuction for std::string.  This adds default support for
    std::strings to KWSys hashing containers.
    
    Author: Bradley Lowekamp <blowekamp at mail.nih.gov>
    Suggested-by: Arnaud Gelas <arnaud_gelas at hms.harvard.edu>
    Change-Id: I7e7a0c356b73d19868a3df1db57b702ec7fffe9d

diff --git a/Source/kwsys/hash_fun.hxx.in b/Source/kwsys/hash_fun.hxx.in
index 926ec92..2a1305e 100644
--- a/Source/kwsys/hash_fun.hxx.in
+++ b/Source/kwsys/hash_fun.hxx.in
@@ -40,6 +40,7 @@
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 #include <@KWSYS_NAMESPACE@/FundamentalType.h>
 #include <@KWSYS_NAMESPACE@/cstddef>        // size_t
+#include <@KWSYS_NAMESPACE@/stl/string>     // string
 
 namespace @KWSYS_NAMESPACE@
 {
@@ -66,6 +67,16 @@ struct hash<const char*> {
 };
 
 @KWSYS_NAMESPACE at _CXX_DEFINE_SPECIALIZATION
+  struct hash<@KWSYS_NAMESPACE at _stl::string> {
+  size_t operator()(const @KWSYS_NAMESPACE at _stl::string & __s) const { return _stl_hash_string(__s.c_str()); }
+};
+
+ at KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+  struct hash<const @KWSYS_NAMESPACE at _stl::string> {
+  size_t operator()(const @KWSYS_NAMESPACE at _stl::string & __s) const { return _stl_hash_string(__s.c_str()); }
+};
+
+ at KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
 struct hash<char> {
   size_t operator()(char __x) const { return __x; }
 };

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/hash_fun.hxx.in |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list