|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67664 - in branches/release: boost/functional/hash boost/functional/hash/detail libs/functional/hash libs/functional/hash/doc libs/functional/hash/test
From: dnljms_at_[hidden]
Date: 2011-01-04 18:06:55
Author: danieljames
Date: 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
New Revision: 67664
URL: http://svn.boost.org/trac/boost/changeset/67664
Log:
Merge hash from trunk.
- Avoid `-Wconversion` warnings.
Properties modified:
branches/release/boost/functional/hash/ (props changed)
branches/release/libs/functional/hash/ (props changed)
Text files modified:
branches/release/boost/functional/hash/detail/hash_float_generic.hpp | 4 ++--
branches/release/boost/functional/hash/hash.hpp | 4 ++--
branches/release/libs/functional/hash/doc/Jamfile.v2 | 3 +++
branches/release/libs/functional/hash/doc/changes.qbk | 4 ++++
branches/release/libs/functional/hash/test/Jamfile.v2 | 8 ++++----
branches/release/libs/functional/hash/test/hash_complex_test.cpp | 2 +-
branches/release/libs/functional/hash/test/hash_number_test.cpp | 3 ++-
7 files changed, 18 insertions(+), 10 deletions(-)
Modified: branches/release/boost/functional/hash/detail/hash_float_generic.hpp
==============================================================================
--- branches/release/boost/functional/hash/detail/hash_float_generic.hpp (original)
+++ branches/release/boost/functional/hash/detail/hash_float_generic.hpp 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -53,7 +53,7 @@
v = ldexp(v, limits<std::size_t>::digits);
std::size_t seed = static_cast<std::size_t>(v);
- v -= seed;
+ v -= static_cast<T>(seed);
// ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
std::size_t const length
@@ -66,7 +66,7 @@
{
v = ldexp(v, limits<std::size_t>::digits);
std::size_t part = static_cast<std::size_t>(v);
- v -= part;
+ v -= static_cast<T>(part);
hash_float_combine(seed, part);
}
Modified: branches/release/boost/functional/hash/hash.hpp
==============================================================================
--- branches/release/boost/functional/hash/hash.hpp (original)
+++ branches/release/boost/functional/hash/hash.hpp 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -210,8 +210,8 @@
#endif
{
#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
- // for some reason ptrdiff_t on OpenVMS compiler with
- // 64 bit is not 64 bit !!!
+ // for some reason ptrdiff_t on OpenVMS compiler with
+ // 64 bit is not 64 bit !!!
std::size_t x = static_cast<std::size_t>(
reinterpret_cast<long long int>(v));
#else
Modified: branches/release/libs/functional/hash/doc/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/doc/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/doc/Jamfile.v2 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -3,6 +3,9 @@
# 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)
+using boostbook ;
+using quickbook ;
+
xml hash : hash.qbk ;
boostbook standalone : hash :
<xsl:param>boost.root=../../../../..
Modified: branches/release/libs/functional/hash/doc/changes.qbk
==============================================================================
--- branches/release/libs/functional/hash/doc/changes.qbk (original)
+++ branches/release/libs/functional/hash/doc/changes.qbk 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -119,4 +119,8 @@
it's opt-in for now. This, or something like it, will become the
default in a future version.
+[h2 Boost 1.46.0]
+
+* Avoid warning due with gcc's `-Wconversion` flag.
+
[endsect]
Modified: branches/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/test/Jamfile.v2 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -11,8 +11,8 @@
<warnings>all
<toolset>intel:<warnings>on
<toolset>intel:<cxxflags>-strict-ansi
- <toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
- <toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
+ <toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion"
+ <toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion"
<toolset>msvc:<warnings-as-errors>on
#<toolset>gcc:<warnings-as-errors>on
#<toolset>darwin:<warnings-as-errors>on
@@ -25,8 +25,8 @@
[ run hash_number_test.cpp ]
[ run hash_pointer_test.cpp ]
[ run hash_function_pointer_test.cpp ]
- [ run hash_float_test.cpp : : : <test-info>always_show_run_output ]
- [ run hash_long_double_test.cpp : : : <test-info>always_show_run_output ]
+ [ run hash_float_test.cpp ]
+ [ run hash_long_double_test.cpp ]
[ run hash_string_test.cpp ]
[ run hash_range_test.cpp ]
[ run hash_custom_test.cpp ]
Modified: branches/release/libs/functional/hash/test/hash_complex_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_complex_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_complex_test.cpp 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -69,7 +69,7 @@
generic_complex_tests(complex(0.5,0));
generic_complex_tests(complex(25,0));
generic_complex_tests(complex(25,0));
- generic_complex_tests(complex(-67.5324535,56.23578678));
+ generic_complex_tests(complex(static_cast<Float>(-67.5324535),static_cast<Float>(56.23578678)));
}
template <class Integer>
Modified: branches/release/libs/functional/hash/test/hash_number_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_number_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_number_test.cpp 2011-01-04 18:06:53 EST (Tue, 04 Jan 2011)
@@ -113,7 +113,8 @@
if(T(1) != T(2))
BOOST_TEST(x1(T(1)) != x2(T(2)));
if((limits::max)() != (limits::max)() - 1)
- BOOST_TEST(x1((limits::max)()) != x2((limits::max)() - 1));
+ BOOST_TEST(x1(static_cast<T>((limits::max)()))
+ != x2(static_cast<T>((limits::max)() - 1)));
}
void bool_test()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk