Opened 8 years ago

Closed 8 years ago

#2975 closed Bugs (fixed)

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

Reported by: Jeffrey Hellrung <jhellrung@…> Owned by: danieljames
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 8 years ago by danieljames

  • Status changed from new to assigned

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 8 years ago by danieljames

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

comment:3 Changed 8 years ago by danieljames

  • Resolution set to fixed
  • Status changed from assigned to closed

(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.


Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain danieljames.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.