forked from boostorg/container_hash
Merge branch 'develop'
This commit is contained in:
@@ -179,4 +179,8 @@
|
|||||||
* Fixed strict aliasing violation
|
* Fixed strict aliasing violation
|
||||||
([@https://github.com/boostorg/functional/pull/3 GitHub #3]).
|
([@https://github.com/boostorg/functional/pull/3 GitHub #3]).
|
||||||
|
|
||||||
|
[h2 Boost 1.63.0]
|
||||||
|
|
||||||
|
* Fixed some warnings.
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
@@ -168,10 +168,10 @@ namespace boost
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline std::size_t hash_value_signed(T val)
|
inline std::size_t hash_value_signed(T val)
|
||||||
{
|
{
|
||||||
const int size_t_bits = std::numeric_limits<std::size_t>::digits;
|
const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
|
||||||
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
|
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
|
||||||
const int length = (std::numeric_limits<T>::digits - 1)
|
const int length = (std::numeric_limits<T>::digits - 1)
|
||||||
/ size_t_bits;
|
/ static_cast<int>(size_t_bits);
|
||||||
|
|
||||||
std::size_t seed = 0;
|
std::size_t seed = 0;
|
||||||
T positive = val < 0 ? -1 - val : val;
|
T positive = val < 0 ? -1 - val : val;
|
||||||
@@ -189,10 +189,10 @@ namespace boost
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline std::size_t hash_value_unsigned(T val)
|
inline std::size_t hash_value_unsigned(T val)
|
||||||
{
|
{
|
||||||
const int size_t_bits = std::numeric_limits<std::size_t>::digits;
|
const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
|
||||||
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
|
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
|
||||||
const int length = (std::numeric_limits<T>::digits - 1)
|
const int length = (std::numeric_limits<T>::digits - 1)
|
||||||
/ size_t_bits;
|
/ static_cast<int>(size_t_bits);
|
||||||
|
|
||||||
std::size_t seed = 0;
|
std::size_t seed = 0;
|
||||||
|
|
||||||
@@ -236,7 +236,7 @@ namespace boost
|
|||||||
inline void hash_combine_impl(boost::uint64_t& h,
|
inline void hash_combine_impl(boost::uint64_t& h,
|
||||||
boost::uint64_t k)
|
boost::uint64_t k)
|
||||||
{
|
{
|
||||||
const uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
|
const boost::uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
|
||||||
const int r = 47;
|
const int r = 47;
|
||||||
|
|
||||||
k *= m;
|
k *= m;
|
||||||
|
@@ -12,7 +12,7 @@ project hash-tests
|
|||||||
#<toolset>intel:<cxxflags>-strict-ansi
|
#<toolset>intel:<cxxflags>-strict-ansi
|
||||||
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
|
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
|
||||||
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
|
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
|
||||||
<toolset>clang:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
|
<toolset>clang:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wsign-conversion -Wconversion -Wfloat-equal -Wshadow"
|
||||||
#<toolset>msvc:<warnings-as-errors>on
|
#<toolset>msvc:<warnings-as-errors>on
|
||||||
#<toolset>gcc:<warnings-as-errors>on
|
#<toolset>gcc:<warnings-as-errors>on
|
||||||
#<toolset>darwin:<warnings-as-errors>on
|
#<toolset>darwin:<warnings-as-errors>on
|
||||||
|
Reference in New Issue
Block a user