mirror of
https://github.com/boostorg/container_hash.git
synced 2026-04-29 02:03:37 +02:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 171c012d47 | |||
| e0331c0bd4 | |||
| e30bbab19f | |||
| 1818113f4c | |||
| 8a7fc581ed | |||
| 5048576921 | |||
| 5f858645a0 | |||
| fd310d2706 | |||
| 90a0e36638 | |||
| 1ce57acc41 | |||
| 81a65eb01c | |||
| 9fbda1a98a | |||
| 62f29ea201 | |||
| f054fe932f | |||
| 83a874ed49 | |||
| 59f9543c10 | |||
| a6da082784 |
+2
-2
@@ -18,9 +18,9 @@ environment:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- cd c:\projects
|
- cd c:\projects
|
||||||
- curl -sSL -o boost.7z https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z
|
- curl -sSL -o boost.7z https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.7z
|
||||||
- 7z x boost.7z
|
- 7z x boost.7z
|
||||||
- set BOOST_ROOT=c:\projects\boost_1_66_0
|
- set BOOST_ROOT=c:\projects\boost_1_67_0
|
||||||
- rd /s /q %BOOST_ROOT%\boost\functional\hash
|
- rd /s /q %BOOST_ROOT%\boost\functional\hash
|
||||||
- cd %BOOST_ROOT%\tools\build
|
- cd %BOOST_ROOT%\tools\build
|
||||||
- cmd /c bootstrap
|
- cmd /c bootstrap
|
||||||
|
|||||||
+6
-6
@@ -12,11 +12,11 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: |
|
env: |
|
||||||
USER_CONFIG="using gcc : : g++-4.8 -Werror ;"
|
USER_CONFIG="using gcc : : g++-4.8 ;"
|
||||||
CXXSTD=03,11
|
CXXSTD=03,11
|
||||||
- compiler: g++-7
|
- compiler: g++-7
|
||||||
env: |
|
env: |
|
||||||
USER_CONFIG="using gcc : : g++-7 -Werror ;"
|
USER_CONFIG="using gcc : : g++-7 ;"
|
||||||
CXXSTD=11,14,17
|
CXXSTD=11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@@ -26,16 +26,16 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: |
|
env: |
|
||||||
USER_CONFIG="using clang : : clang++ -Werror ;"
|
USER_CONFIG="using clang : : clang++ ;"
|
||||||
CXXSTD=03,11
|
CXXSTD=03,11
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: |
|
env: |
|
||||||
USER_CONFIG="using clang : : clang++ -Werror -D_HAS_AUTO_PTR_ETC=0 ;"
|
USER_CONFIG="using clang : : clang++ -D_HAS_AUTO_PTR_ETC=0 ;"
|
||||||
CXXSTD=11
|
CXXSTD=11
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- export BOOST_VERSION=1.66.0
|
- export BOOST_VERSION=1.67.0
|
||||||
- export BOOST_FILENAME=boost_1_66_0
|
- export BOOST_FILENAME=boost_1_67_0
|
||||||
- export BOOST_ROOT=${HOME}/boost
|
- export BOOST_ROOT=${HOME}/boost
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
- touch Jamroot.jam
|
- touch Jamroot.jam
|
||||||
|
|||||||
@@ -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
|
||||||
|
)
|
||||||
|
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <boost/detail/container_fwd.hpp>
|
#include <boost/detail/container_fwd.hpp>
|
||||||
#include <boost/core/enable_if.hpp>
|
#include <boost/core/enable_if.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
|
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
|
||||||
# include <array>
|
# include <array>
|
||||||
@@ -32,9 +31,7 @@
|
|||||||
# include <tuple>
|
# include <tuple>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_MEMORY)
|
#include <memory>
|
||||||
# include <memory>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
||||||
#include <boost/type_traits/is_array.hpp>
|
#include <boost/type_traits/is_array.hpp>
|
||||||
@@ -71,56 +68,6 @@ namespace boost
|
|||||||
return seed;
|
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>
|
template <class T, class A>
|
||||||
std::size_t hash_value(std::vector<T, A> const& v)
|
std::size_t hash_value(std::vector<T, A> const& v)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <boost/container_hash/hash_fwd.hpp>
|
#include <boost/container_hash/hash_fwd.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <iterator>
|
||||||
#include <boost/container_hash/detail/hash_float.hpp>
|
#include <boost/container_hash/detail/hash_float.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/limits.hpp>
|
#include <boost/limits.hpp>
|
||||||
@@ -118,7 +119,7 @@ namespace boost
|
|||||||
{
|
{
|
||||||
namespace hash_detail
|
namespace hash_detail
|
||||||
{
|
{
|
||||||
#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
|
#if defined(BOOST_NO_CXX98_FUNCTION_BASE)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct hash_base
|
struct hash_base
|
||||||
{
|
{
|
||||||
@@ -426,7 +427,7 @@ namespace boost
|
|||||||
|
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
{
|
{
|
||||||
hash_combine(seed, *first);
|
hash_combine<typename std::iterator_traits<It>::value_type>(seed, *first);
|
||||||
}
|
}
|
||||||
|
|
||||||
return seed;
|
return seed;
|
||||||
@@ -437,11 +438,11 @@ namespace boost
|
|||||||
{
|
{
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
{
|
{
|
||||||
hash_combine(seed, *first);
|
hash_combine<typename std::iterator_traits<It>::value_type>(seed, *first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
|
||||||
template <class T>
|
template <class T>
|
||||||
inline std::size_t hash_range(T* first, T* last)
|
inline std::size_t hash_range(T* first, T* last)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace boost
|
|||||||
template <class It> std::size_t hash_range(It, It);
|
template <class It> std::size_t hash_range(It, It);
|
||||||
template <class It> void hash_range(std::size_t&, It, It);
|
template <class It> void hash_range(std::size_t&, It, It);
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
|
||||||
template <class T> inline std::size_t hash_range(T*, T*);
|
template <class T> inline std::size_t hash_range(T*, T*);
|
||||||
template <class T> inline void hash_range(std::size_t&, T*, T*);
|
template <class T> inline void hash_range(std::size_t&, T*, T*);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void float_tests(char const* name, T* = 0)
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Doing anything with infinity causes borland to crash.
|
// Doing anything with infinity causes borland to crash.
|
||||||
#if defined(__BORLANDC__)
|
#if defined(BOOST_BORLANDC)
|
||||||
std::cerr
|
std::cerr
|
||||||
<< "Not running infinity checks on Borland, as it causes it to crash."
|
<< "Not running infinity checks on Borland, as it causes it to crash."
|
||||||
"\n";
|
"\n";
|
||||||
@@ -292,7 +292,7 @@ void float_tests(char const* name, T* = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NaN also causes borland to crash.
|
// NaN also causes borland to crash.
|
||||||
#if !defined(__BORLANDC__) && defined(BOOST_HASH_TEST_EXTENSIONS)
|
#if !defined(BOOST_BORLANDC) && defined(BOOST_HASH_TEST_EXTENSIONS)
|
||||||
if(boost::hash_detail::limits<T>::has_quiet_NaN) {
|
if(boost::hash_detail::limits<T>::has_quiet_NaN) {
|
||||||
if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(1.0)) {
|
if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(1.0)) {
|
||||||
std::cerr<<"x1(quiet_NaN) == x1(1.0) == "<<x1(1.0)<<"\n";
|
std::cerr<<"x1(quiet_NaN) == x1(1.0) == "<<x1(1.0)<<"\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user