Skip to content

Commit

Permalink
Add workaround for q++ 8.3.0 (QNX 7.1) compiler by making
Browse files Browse the repository at this point in the history
sure MaskedPointer is trivially copyable and copy constructible.

Fixes #1758

PiperOrigin-RevId: 679618900
Change-Id: Ia0ebacd8bb43b3fe3b9cd654259bef9072cec46c
  • Loading branch information
derekmauro authored and copybara-github committed Sep 27, 2024
1 parent 482ca0b commit c6b2735
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions absl/flags/internal/flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,13 @@ class MaskedPointer {

static constexpr int RequiredAlignment() { return 4; }

constexpr MaskedPointer() : ptr_(nullptr) {}
constexpr explicit MaskedPointer(ptr_t rhs) : ptr_(rhs) {}
MaskedPointer(ptr_t rhs, bool is_candidate);

MaskedPointer(const MaskedPointer& rhs) = default;
MaskedPointer& operator=(const MaskedPointer& rhs) = default;

void* Ptr() const {
return reinterpret_cast<void*>(reinterpret_cast<mask_t>(ptr_) &
kPtrValueMask);
Expand Down

0 comments on commit c6b2735

Please sign in to comment.