Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54142 - in trunk: boost/functional/hash libs/functional/hash/test
From: daniel_james_at_[hidden]
Date: 2009-06-21 05:42:05


Author: danieljames
Date: 2009-06-21 05:42:05 EDT (Sun, 21 Jun 2009)
New Revision: 54142
URL: http://svn.boost.org/trac/boost/changeset/54142

Log:
Get <boost/functional/hash/extensions.hpp> to work.
Added:
   trunk/libs/functional/hash/test/extensions_hpp_test.cpp (contents, props changed)
Text files modified:
   trunk/boost/functional/hash/extensions.hpp | 5 +++++
   trunk/libs/functional/hash/test/Jamfile.v2 | 1 +
   2 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/boost/functional/hash/extensions.hpp
==============================================================================
--- trunk/boost/functional/hash/extensions.hpp (original)
+++ trunk/boost/functional/hash/extensions.hpp 2009-06-21 05:42:05 EDT (Sun, 21 Jun 2009)
@@ -7,6 +7,9 @@
 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
 // issue 6.18.
 
+// This implements the extensions to the standard.
+// It's undocumented, so you shouldn't use it....
+
 #if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
 #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP
 
@@ -14,6 +17,8 @@
 # pragma once
 #endif
 
+#include <boost/functional/hash/hash.hpp>
+
 #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
 #include <boost/type_traits/is_array.hpp>
 #endif

Modified: trunk/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- trunk/libs/functional/hash/test/Jamfile.v2 (original)
+++ trunk/libs/functional/hash/test/Jamfile.v2 2009-06-21 05:42:05 EDT (Sun, 21 Jun 2009)
@@ -36,6 +36,7 @@
         [ run hash_complex_test.cpp ]
         [ run link_test.cpp link_test_2.cpp ]
         [ run link_ext_test.cpp link_no_ext_test.cpp ]
+ [ run extensions_hpp_test.cpp ]
         [ run container_fwd_test.cpp ]
         [ compile-fail hash_no_ext_fail_test.cpp ]
         [ compile-fail namespace_fail_test.cpp ]

Added: trunk/libs/functional/hash/test/extensions_hpp_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/functional/hash/test/extensions_hpp_test.cpp 2009-06-21 05:42:05 EDT (Sun, 21 Jun 2009)
@@ -0,0 +1,17 @@
+
+// Copyright 2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Check that boost/functional/hash/extensions.hpp works okay.
+//
+// It probably should be in boost/functional/hash/detail, but since it isn't it
+// should work.
+
+#include <boost/functional/hash/extensions.hpp>
+
+int main() {
+ int x[2] = { 2, 3 };
+ boost::hash<int[2]> hf;
+ hf(x);
+}


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