Slightly rearrange the unordered container headers so that prev_prime is defined before it's used.

[SVN r57152]
This commit is contained in:
Daniel James
2009-10-25 10:55:08 +00:00
parent 8727de1a1b
commit 060acb3f25
4 changed files with 9 additions and 6 deletions

View File

@ -10,12 +10,19 @@
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/unordered/detail/node.hpp>
#include <boost/unordered/detail/util.hpp>
namespace boost { namespace unordered_detail {
////////////////////////////////////////////////////////////////////////////
// Buckets
template <class A, class G>
inline std::size_t hash_buckets<A, G>::max_bucket_count() const {
// -1 to account for the sentinel.
return prev_prime(this->bucket_alloc().max_size() - 1);
}
template <class A, class G>
inline BOOST_DEDUCED_TYPENAME hash_buckets<A, G>::bucket_ptr
hash_buckets<A, G>::get_bucket(std::size_t num) const

View File

@ -298,10 +298,7 @@ namespace boost { namespace unordered_detail {
return allocators_.first(); }
node_allocator& node_alloc() {
return allocators_.second(); }
std::size_t max_bucket_count() const {
// -1 to account for the sentinel.
return prev_prime(this->bucket_alloc().max_size() - 1);
}
std::size_t max_bucket_count() const;
// Constructors

View File

@ -14,7 +14,6 @@
#include <boost/iterator/iterator_categories.hpp>
#include <boost/unordered/detail/buckets.hpp>
#include <boost/unordered/detail/util.hpp>
namespace boost { namespace unordered_detail {

View File

@ -11,7 +11,7 @@ project unordered-test/unordered
<toolset>intel:<warnings>on
<toolset>intel:<cxxflags>-strict-ansi
<toolset>msvc:<cxxflags>/W4
<toolset>gcc:<cxxflags>"-Wsign-promo -Wunused-parameter"
<toolset>gcc:<cxxflags>"-Wsign-promo -Wunused-parameter -pedantic"
;
test-suite unordered