Modify

Opened 3 years ago

Closed 4 months ago

#10665 closed Bugs (fixed)

boost::uuids::name_generator::operator() is not const, as promised in the documentation

Reported by: lars.rohwedder@… Owned by: James E. King, III
Milestone: Boost 1.66.0 Component: uuid
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

The uuids::name_generator holds an internal state (detail::sha1 sha), which is resetted on every operator() call, hence the operator() cannot be const.

So the generators aren't reentrant and cannot be shared between threads. :-(

Solution:

Make the state a local variable in the operator(). So the operator() can be const (as documentation promises) and the class becomes reentrant.

Attachments (0)

Change History (3)

comment:1 Changed 4 months ago by James E. King, III

Owner: changed from Andy Tompkins to James E. King, III

comment:2 Changed 4 months ago by James E. King, III

comment:3 Changed 4 months ago by James E. King, III

Milestone: To Be DeterminedBoost 1.66.0
Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain James E. King, III.
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.