diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index c91691f..0f43439 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -36,6 +36,7 @@ test-suite functional/hash [ 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 ] diff --git a/hash/test/extensions_hpp_test.cpp b/hash/test/extensions_hpp_test.cpp new file mode 100644 index 0000000..182ec01 --- /dev/null +++ b/hash/test/extensions_hpp_test.cpp @@ -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 + +int main() { + int x[2] = { 2, 3 }; + boost::hash hf; + hf(x); +} diff --git a/include/boost/functional/hash/extensions.hpp b/include/boost/functional/hash/extensions.hpp index c289056..7d416f1 100644 --- a/include/boost/functional/hash/extensions.hpp +++ b/include/boost/functional/hash/extensions.hpp @@ -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 + #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) #include #endif