Improved support for Visual C++.

[SVN r2985]
This commit is contained in:
Daniel James
2006-06-12 23:30:46 +00:00
parent 58dda15273
commit ff91c72eec
19 changed files with 154 additions and 81 deletions

View File

@@ -10,6 +10,7 @@
#define BOOST_UNORDERED_TEST_HELPERS_INVARIANT_HEADER
#include <set>
#include <cmath>
#include "./metafunctions.hpp"
#include "./helpers.hpp"
@@ -80,7 +81,9 @@ namespace test
// Finally, check that size matches up.
if(x1.size() != size)
BOOST_ERROR("x1.size() doesn't match actual size.");
if(static_cast<float>(size) / static_cast<float>(x1.bucket_count()) != x1.load_factor())
float load_factor = static_cast<float>(size) / static_cast<float>(x1.bucket_count());
using namespace std;
if(fabs(x1.load_factor() - load_factor) > x1.load_factor() / 64)
BOOST_ERROR("x1.load_factor() doesn't match actual load_factor.");
}
}