Merge branch 'develop'

This commit is contained in:
Peter Dimov
2019-12-23 17:21:52 +02:00
3 changed files with 27 additions and 54 deletions

23
CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
# Copyright 2018 Mike Dev
# 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
cmake_minimum_required(VERSION 3.5)
project(BoostContainerHash LANGUAGES CXX)
add_library(boost_container_hash INTERFACE)
add_library(Boost::container_hash ALIAS boost_container_hash)
target_include_directories(boost_container_hash INTERFACE include)
target_link_libraries(boost_container_hash
INTERFACE
Boost::assert
Boost::config
Boost::core
Boost::detail
Boost::integer
Boost::static_assert
Boost::type_traits
)

View File

@@ -22,7 +22,6 @@
#include <boost/detail/container_fwd.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/static_assert.hpp>
#include <vector>
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
# include <array>
@@ -71,56 +70,6 @@ namespace boost
return seed;
}
inline std::size_t hash_range(
std::vector<bool>::iterator first,
std::vector<bool>::iterator last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
return seed;
}
inline std::size_t hash_range(
std::vector<bool>::const_iterator first,
std::vector<bool>::const_iterator last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
return seed;
}
inline void hash_range(
std::size_t& seed,
std::vector<bool>::iterator first,
std::vector<bool>::iterator last)
{
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
}
inline void hash_range(
std::size_t& seed,
std::vector<bool>::const_iterator first,
std::vector<bool>::const_iterator last)
{
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
}
template <class T, class A>
std::size_t hash_value(std::vector<T, A> const& v)
{

View File

@@ -18,6 +18,7 @@
#include <boost/container_hash/hash_fwd.hpp>
#include <functional>
#include <iterator>
#include <boost/container_hash/detail/hash_float.hpp>
#include <string>
#include <boost/limits.hpp>
@@ -118,7 +119,7 @@ namespace boost
{
namespace hash_detail
{
#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
#if defined(BOOST_NO_CXX98_FUNCTION_BASE)
template <typename T>
struct hash_base
{
@@ -426,7 +427,7 @@ namespace boost
for(; first != last; ++first)
{
hash_combine(seed, *first);
hash_combine<typename std::iterator_traits<It>::value_type>(seed, *first);
}
return seed;
@@ -437,7 +438,7 @@ namespace boost
{
for(; first != last; ++first)
{
hash_combine(seed, *first);
hash_combine<typename std::iterator_traits<It>::value_type>(seed, *first);
}
}