Closed Bug 1127639 Opened 9 years ago Closed 8 years ago

Pack Maybe<T> better

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1287006

People

(Reporter: shu, Assigned: seth)

Details

Currently, Maybe<T>'s payload is always 8-byte aligned. We should pack it better for use with smaller types like chars.
Assignee: nobody → seth
That's because AlignedStorage is always 8-bytes aligned (and worse, always takes at least 8 bytes).
(In reply to Mike Hommey [:glandium] from comment #1)
> That's because AlignedStorage is always 8-bytes aligned (and worse, always
> takes at least 8 bytes).

Yep. It shouldn't be hard to do better.
I see MOZ_ALIGNED_DECL in Alignment.h; can that be used on all platforms?
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.