mirror of
https://github.com/boostorg/container_hash.git
synced 2026-02-03 21:55:15 +01:00
Merge hash warning fixes from trunk.
[SVN r58032]
This commit is contained in:
@@ -19,20 +19,21 @@ int main() {}
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(disable:4244) // conversion from 'unsigned long' to 'unsigned short', possible loss of data
|
||||
#pragma warning(disable:4245) // conversion from 'int' to 'const unsigned short', signed/unsigned mismatch
|
||||
#pragma warning(disable:4305) // truncation from 'double' to 'const std::complex<float>::_Ty'
|
||||
#pragma warning(disable:4309) // truncation of constant value
|
||||
#pragma warning(disable:4512) // assignment operator could not be generated
|
||||
#if BOOST_MSVC < 1400
|
||||
#pragma warning(disable:4267) // conversion from 'size_t' to 'unsigned int', possible loss of data
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <complex>
|
||||
#include <sstream>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244) // conversion from 'unsigned long' to 'unsigned short', possible loss of data
|
||||
#pragma warning(disable:4512) // assignment operator could not be generated
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
void generic_complex_tests(std::complex<T> v)
|
||||
{
|
||||
@@ -80,13 +81,17 @@ void complex_integral_tests(Integer*)
|
||||
|
||||
int main()
|
||||
{
|
||||
// I've comments out the short and unsigned short tests
|
||||
// as they cause warnings and don't really test
|
||||
// anything that the other tests already deal with.
|
||||
|
||||
complex_float_tests((float*) 0);
|
||||
complex_float_tests((double*) 0);
|
||||
complex_float_tests((long double*) 0);
|
||||
complex_integral_tests((short*) 0);
|
||||
//complex_integral_tests((short*) 0);
|
||||
complex_integral_tests((int*) 0);
|
||||
complex_integral_tests((long*) 0);
|
||||
complex_integral_tests((unsigned short*) 0);
|
||||
//complex_integral_tests((unsigned short*) 0);
|
||||
complex_integral_tests((unsigned int*) 0);
|
||||
complex_integral_tests((unsigned long*) 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user