Opened 9 years ago

Closed 9 years ago

#2975 closed Bugs (fixed)

in boost::unordered, incorrect prime_list_template<T>::length

Reported by: Jeffrey Hellrung <jhellrung@…> Owned by: Daniel James
Milestone: Boost 1.39.0 Component: unordered
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:


In boost/unordered/detail/hash_table.hpp, line 89-90, there is the definition

template<typename T> std::ptrdiff_t const prime_list_template<T>::length = 28;

I believe 28 should be 40 (the number of primes in prime_list_template<T>::value[])...? Otherwise, it seems resizing your hash table past 1.5 million buckets does no good...

Sorry if this has already been reported, but I couldn't find anything when searching the bug tracker.

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Daniel James

Status: newassigned

How embarrasing! Thanks for reporting this.

Duplicates are fine by me, a duplicated bug report is better than no reports. And frankly, if someone had reported this and I hadn't fixed it, I'd deserve much worse.

comment:2 Changed 9 years ago by Daniel James

(In [52658]) Fix the length of the prime number list. Refs #2975

comment:3 Changed 9 years ago by Daniel James

Resolution: fixed
Status: assignedclosed

(In [52707]) Last minute merge, remove google analytics script tags and fixes #2975.

Merged revisions 52665,52674 via svnmerge from


r52665 | danieljames | 2009-04-29 22:16:10 +0100 (Wed, 29 Apr 2009) | 1 line

Remove google analytics script tags.


r52674 | danieljames | 2009-04-30 06:10:57 +0100 (Thu, 30 Apr 2009) | 1 line

Fix the prime number list length in unordered.


Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Daniel James.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.