Opened 8 years ago

Closed 8 years ago

#10349 closed Feature Requests (wontfix)

atomic misses specialization for enums

Reported by: ingo.loehken@… Owned by: timblechmann
Milestone: To Be Determined Component: atomic
Version: Boost 1.56.0 Severity: Optimization
Keywords: enum, atomic Cc: Andrey.Semashev@…

Description

Maybe there is a reason, that boost::atomic does not support a specialization for enums and handles them like user-defined types, but lock-free access to enums would be nice.

I just extended the existing implementation. Ofc, now code is redundant and functions common to integral and enum specializations maybe moved into a base class to avoid that.

Attachments (1)

atomic_enum.patch (7.5 KB ) - added by ingo.loehken@… 8 years ago.
patch for enum specialization to atomic

Download all attachments as: .zip

Change History (4)

by ingo.loehken@…, 8 years ago

Attachment: atomic_enum.patch added

patch for enum specialization to atomic

comment:1 by Andrey Semashev, 8 years ago

Cc: Andrey.Semashev@… added

The interface for atomic enums is the same as for user-defined structs, and structs up to the supported size are lock-free. What is the purpose of a separate specialization?

comment:2 by ingo.loehken@…, 8 years ago

you are right, i missed that. sorry. plz then just close the ticket.

comment:3 by Andrey Semashev, 8 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.