forked from boostorg/unordered
Run most of the unordered container tests (not the exception tests) on warning
level 4 on Visual C++. [SVN r38648]
This commit is contained in:
1 parent
3ebd8bc9f2
commit
36f4508019
10 files changed
+67
-7
No files matched your search
@@ -10,6 +10,11 @@
|
||||
#include <cstdlib>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#endif
|
||||
|
||||
namespace test
|
||||
{
|
||||
template <class T>
|
||||
@@ -26,8 +31,8 @@ namespace test
|
||||
template <class U> struct rebind { typedef malloc_allocator<U> other; };
|
||||
|
||||
malloc_allocator() {}
|
||||
template <class Y> malloc_allocator(malloc_allocator<Y> const& x) {}
|
||||
malloc_allocator(malloc_allocator const& x) {}
|
||||
template <class Y> malloc_allocator(malloc_allocator<Y> const&) {}
|
||||
malloc_allocator(malloc_allocator const&) {}
|
||||
|
||||
pointer address(reference r) { return &r; }
|
||||
const_pointer address(const_reference r) { return &r; }
|
||||
@@ -37,7 +42,7 @@ namespace test
|
||||
}
|
||||
|
||||
pointer allocate(size_type n, const_pointer u) { return allocate(n); }
|
||||
void deallocate(pointer p, size_type n) { free(p); }
|
||||
void deallocate(pointer p, size_type) { free(p); }
|
||||
void construct(pointer p, T const& t) { new(p) T(t); }
|
||||
void destroy(pointer p) { p->~T(); }
|
||||
|
||||
@@ -59,4 +64,9 @@ namespace test
|
||||
};
|
||||
}
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(pop)
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -59,7 +59,7 @@ namespace test
|
||||
inline signed char generate(signed char const*)
|
||||
{
|
||||
using namespace std;
|
||||
return rand();
|
||||
return static_cast<signed char>(rand());
|
||||
}
|
||||
|
||||
inline std::string generate(std::string const*)
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
#include "./helpers.hpp"
|
||||
#include "./allocator.hpp"
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
namespace test
|
||||
{
|
||||
template <class X>
|
||||
@@ -92,5 +97,9 @@ namespace test
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user