Skip to content

Commit

Permalink
Move 'functional' headers and update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames committed Dec 29, 2017
1 parent c7fc03d commit 53fbb04
Show file tree
Hide file tree
Showing 55 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ boostbook standalone : hash :
<xsl:param>generate.section.toc.level=2
<xsl:param>toc.section.depth=1
<xsl:param>toc.max.depth=1
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/functional/hash/doc/html
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/container_hash/hash/doc/html
;

###############################################################################
Expand Down
14 changes: 7 additions & 7 deletions doc/changes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

* Use declarations for standard classes, so that the library
doesn't need to include all of their headers
* Deprecated the `<boost/functional/hash/*.hpp>` headers. Now a single header,
<[headerref boost/functional/hash.hpp]> is used.
* Deprecated the `<boost/container_hash/hash/*.hpp>` headers. Now a single header,
<[headerref boost/container_hash/hash.hpp]> is used.
* Add support for the `BOOST_HASH_NO_EXTENSIONS` macro, which
disables the extensions to TR1.

Expand Down Expand Up @@ -71,10 +71,10 @@

* Changed the warnings in the deprecated headers from 1.34.0 to errors. These
will be removed in a future version of Boost.
* Moved detail headers out of `boost/functional/detail`, since they are part of
functional/hash, not functional. `boost/functional/detail/container_fwd.hpp`
* Moved detail headers out of `boost/container_hash/detail`, since they are part of
container_hash/hash, not container_hash. `boost/container_hash/detail/container_fwd.hpp`
has been moved to `boost/detail/container_fwd.hpp` as it's used outside of
this library, the others have been moved to `boost/functional/hash/detail`.
this library, the others have been moved to `boost/container_hash/hash/detail`.

[h2 Boost 1.39.0]

Expand Down Expand Up @@ -132,7 +132,7 @@
* [@http://svn.boost.org/trac/boost/ticket/6806 Ticket 6806]:
Support `std::array` and `std::tuple` when available.
* Add deprecation warning to the long deprecated
`boost/functional/detail/container_fwd.hpp`.
`boost/container_hash/detail/container_fwd.hpp`.

[h2 Boost 1.51.0]

Expand Down Expand Up @@ -177,7 +177,7 @@
[h2 Boost 1.58.0]

* Fixed strict aliasing violation
([@https://github.com/boostorg/functional/pull/3 GitHub #3]).
([@https://github.com/boostorg/container_hash/pull/3 GitHub #3]).

[h2 Boost 1.63.0]

Expand Down
2 changes: 1 addition & 1 deletion doc/disable.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ to turn them of in order to check that your code will work with other
implementations of TR1. To do this define the macro `BOOST_HASH_NO_EXTENSIONS`.
When this macro is defined, only the specialisations detailed
in TR1 will be declared. But, if you later undefine the macro and include
<[headerref boost/functional/hash.hpp]> then the non-specialised form will be defined
<[headerref boost/container_hash/hash.hpp]> then the non-specialised form will be defined
- activating the extensions.

It is strongly recommended that you never undefine the macro - and only define
Expand Down
4 changes: 2 additions & 2 deletions doc/hash.qbk
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[library Boost.Functional/Hash
[library Boost.ContainerHash
[quickbook 1.5]
[authors [James, Daniel]]
[copyright 2005 2006 2007 2008 Daniel James]
[purpose A TR1 hash function object that can be extended to hash user
defined types]
[category higher-order]
[id hash]
[dirname functional/hash]
[dirname container_hash]
[license
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
Expand Down
2 changes: 1 addition & 1 deletion doc/portability.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ boost namespace:
}

Full code for this example is at
[@boost:/libs/functional/hash/examples/portable.cpp /libs/functional/hash/examples/portable.cpp].
[@boost:/libs/container_hash/hash/examples/portable.cpp /libs/container_hash/hash/examples/portable.cpp].

[endsect]
8 changes: 4 additions & 4 deletions doc/ref.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1837.pdf">Library Extension Technical Report Issues List</ulink> (page 63).
</para>
</section>
<header name="boost/functional/hash.hpp">
<header name="boost/container_hash/hash.hpp">
<para>
Defines <code><classname>boost::hash</classname></code>,
and helper functions.
Expand Down Expand Up @@ -57,7 +57,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</para>
<para>
Forward declared in
<code>&lt;boost/functional/hash_fwd.hpp&gt;</code>
<code>&lt;boost/container_hash/hash_fwd.hpp&gt;</code>
</para>
<para>
This hash function is not intended for general use, and isn't
Expand Down Expand Up @@ -542,7 +542,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<para>This is an extension to TR1</para>
<para>
Forward declared in
<code>&lt;boost/functional/hash_fwd.hpp&gt;</code>
<code>&lt;boost/container_hash/hash_fwd.hpp&gt;</code>
</para>
<para>
This hash function is not intended for general use, and isn't
Expand Down Expand Up @@ -615,7 +615,7 @@ for(; first != last; ++first)
<para>This is an extension to TR1</para>
<para>
Forward declared in
<code>&lt;boost/functional/hash_fwd.hpp&gt;</code>
<code>&lt;boost/container_hash/hash_fwd.hpp&gt;</code>
</para>
<para>
This hash function is not intended for general use, and isn't
Expand Down
14 changes: 7 additions & 7 deletions doc/tutorial.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ associative containers and you wish to use

To use [classref boost::hash] directly, create an instance and call it as a function:

#include <``[headerref boost/functional/hash.hpp]``>
#include <``[headerref boost/container_hash/hash.hpp]``>

int main()
{
Expand Down Expand Up @@ -110,9 +110,9 @@ And you can now use [classref boost::hash] with book:
assert(books.find(dandelion) == books.end());

The full example can be found in:
[@boost:/libs/functional/hash/examples/books.hpp /libs/functional/hash/examples/books.hpp]
[@boost:/libs/container_hash/hash/examples/books.hpp /libs/container_hash/hash/examples/books.hpp]
and
[@boost:/libs/functional/hash/examples/books.cpp /libs/functional/hash/examples/books.cpp].
[@boost:/libs/container_hash/hash/examples/books.cpp /libs/container_hash/hash/examples/books.cpp].

[tip
When writing a hash function, first look at how the equality function works.
Expand Down Expand Up @@ -170,7 +170,7 @@ of point, it can be repeatedly called for any number of elements. It calls
[funcref boost::hash_value hash_value] on the supplied element, and combines it with the seed.

Full code for this example is at
[@boost:/libs/functional/hash/examples/point.cpp /libs/functional/hash/examples/point.cpp].
[@boost:/libs/container_hash/hash/examples/point.cpp /libs/container_hash/hash/examples/point.cpp].

[note
When using [funcref boost::hash_combine] the order of the
Expand Down Expand Up @@ -200,13 +200,13 @@ To calculate the hash of an iterator range you can use [funcref boost::hash_rang

Note that when writing template classes, you might not want to include the main
hash header as it's quite an expensive include that brings in a lot of other
headers, so instead you can include the `<boost/functional/hash_fwd.hpp>`
headers, so instead you can include the `<boost/container_hash/hash_fwd.hpp>`
header which forward declares [classref boost::hash],
[funcref boost::hash_range] and [funcref boost::hash_combine]. You'll need to
include the main header before instantiating [classref boost::hash]. When using
a container that uses [classref boost::hash] it should do that for you, so your
type will work fine with the boost hash containers. There's an example of this
in [@boost:/libs/functional/hash/examples/template.hpp template.hpp] and
[@boost:/libs/functional/hash/examples/template.cpp template.cpp].
in [@boost:/libs/container_hash/hash/examples/template.hpp template.hpp] and
[@boost:/libs/container_hash/hash/examples/template.cpp template.cpp].

[endsect]
2 changes: 1 addition & 1 deletion examples/books.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include "./books.hpp"
#include <boost/functional/hash.hpp>
#include <boost/container_hash/hash.hpp>
#include <cassert>

// If std::unordered_set was available:
Expand Down
2 changes: 1 addition & 1 deletion examples/point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#undef NDEBUG
#endif

#include <boost/functional/hash.hpp>
#include <boost/container_hash/hash.hpp>
#include <cassert>

// This example illustrates how to use boost::hash_combine to generate a hash
Expand Down
2 changes: 1 addition & 1 deletion examples/portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#undef NDEBUG
#endif

#include <boost/functional/hash.hpp>
#include <boost/container_hash/hash.hpp>
#include <cassert>

// This example illustrates how to customise boost::hash portably, so that
Expand Down
2 changes: 1 addition & 1 deletion examples/template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This is an example of how to write a hash function for a template
// class.

#include <boost/functional/hash_fwd.hpp>
#include <boost/container_hash/hash_fwd.hpp>

template <typename A, typename B>
class my_pair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// 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)

#include <boost/functional/hash/hash.hpp>
#include <boost/container_hash/hash/hash.hpp>

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#pragma once
#endif

#include <boost/functional/hash/detail/float_functions.hpp>
#include <boost/functional/hash/detail/limits.hpp>
#include <boost/container_hash/hash/detail/float_functions.hpp>
#include <boost/container_hash/hash/detail/limits.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/integer/static_log2.hpp>
#include <boost/cstdint.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#pragma once
#endif

#include <boost/functional/hash/hash.hpp>
#include <boost/container_hash/hash/hash.hpp>
#include <boost/detail/container_fwd.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/static_assert.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
#define BOOST_FUNCTIONAL_HASH_HASH_HPP

#include <boost/functional/hash/hash_fwd.hpp>
#include <boost/container_hash/hash/hash_fwd.hpp>
#include <functional>
#include <boost/functional/hash/detail/hash_float.hpp>
#include <boost/container_hash/hash/detail/hash_float.hpp>
#include <string>
#include <boost/limits.hpp>
#include <boost/type_traits/is_enum.hpp>
Expand Down Expand Up @@ -591,5 +591,5 @@ namespace boost

#if !defined(BOOST_HASH_NO_EXTENSIONS) \
&& !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
#include <boost/functional/hash/extensions.hpp>
#include <boost/container_hash/hash/extensions.hpp>
#endif
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
#pragma once
#endif

#include <boost/functional/hash/hash_fwd.hpp>
#include <boost/container_hash/hash/hash_fwd.hpp>
6 changes: 3 additions & 3 deletions meta/libraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
{
"key": "functional/hash",
"boost-version": "1.33.0",
"name": "Functional/Hash",
"name": "Container Hash",
"authors": [
"Daniel James"
],
"maintainers": [
"Daniel James <dnljms -at- gmail.com>"
],
"description": "A TR1 hash function object that can be extended to hash user defined types.",
"description": "An STL-compatible hash function object that can be extended to hash user defined types.",
"std": [
"tr1"
],
"category": [
"Function-objects"
]
}
]
]
8 changes: 4 additions & 4 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project hash-tests
#<toolset>darwin:<warnings-as-errors>on
;

test-suite functional/hash
test-suite container_hash/hash
:
[ compile check_float_funcs.cpp ]
[ run hash_fwd_test_1.cpp ]
Expand Down Expand Up @@ -56,7 +56,7 @@ test-suite functional/hash
[ run hash_no_ext_macro_2.cpp ]
;

test-suite functional/hash_no_ext
test-suite container_hash/hash_no_ext
:
[ run hash_number_test.cpp : : : <define>BOOST_HASH_NO_EXTENSIONS : no_ext_number_test ]
[ run hash_pointer_test.cpp : : : <define>BOOST_HASH_NO_EXTENSIONS : no_ext_pointer_test ]
Expand All @@ -69,7 +69,7 @@ test-suite functional/hash_no_ext

# Tests to see if the floating point hash is using the binary hash.
# Not run normally because on some platforms these should fail.
test-suite functional/hash_no_generic_float
test-suite container_hash/hash_no_generic_float
:
[ run hash_float_test.cpp
: : : <define>BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC
Expand All @@ -78,6 +78,6 @@ test-suite functional/hash_no_generic_float
: : : <define>BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC
: hash_long_double_test_no_generic ]
;
explicit functional/hash_no_generic_float ;
explicit container_hash/hash_no_generic_float ;

build-project ../examples ;
6 changes: 3 additions & 3 deletions test/extensions_hpp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// 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.
// Check that boost/container_hash/hash/extensions.hpp works okay.
//
// It probably should be in boost/functional/hash/detail, but since it isn't it
// It probably should be in boost/container_hash/hash/detail, but since it isn't it
// should work.

#include "./config.hpp"

#include <boost/functional/hash/extensions.hpp>
#include <boost/container_hash/hash/extensions.hpp>

int main() {
int x[2] = { 2, 3 };
Expand Down
2 changes: 1 addition & 1 deletion test/hash_built_in_array_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion test/hash_complex_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int main() {}
#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
#endif

#include <boost/core/lightweight_test.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/hash_custom_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace boost
# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion test/hash_deque_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion test/hash_enum_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
#endif

#include <boost/core/lightweight_test.hpp>
Expand Down
6 changes: 3 additions & 3 deletions test/hash_float_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
# include <boost/container_hash/hash.hpp>
#endif

#include <boost/core/lightweight_test.hpp>

#include <cmath>
#include <boost/functional/hash/detail/limits.hpp>
#include <boost/functional/hash/detail/float_functions.hpp>
#include <boost/container_hash/hash/detail/limits.hpp>
#include <boost/container_hash/hash/detail/float_functions.hpp>
#include <boost/config/workaround.hpp>

#include <iostream>
Expand Down

0 comments on commit 53fbb04

Please sign in to comment.