Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with Clang 19 #133

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mfast/ext_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ext_cref : public ext_ref_properties<OpType, Properties> {
explicit ext_cref(const field_cref &base) : base_(base) {}
explicit ext_cref(const aggregate_cref &base) : base_(base) {}
cref_type get() const { return base_; }
bool present() const { return !this->optional() || base_.present(); }
bool present() const { return !static_cast<cref_type*>(this)->optional() || base_.present(); }

private:
cref_type base_;
Expand All @@ -128,7 +128,7 @@ class ext_cref<decimal_cref, std::tuple<ExponentOp, MantissaOp>, Properties> {
exponent_type get_exponent() const {
return exponent_type(base_.get_exponent());
}
bool present() const { return !this->optional() || base_.present(); }
bool present() const { return !static_cast<cref_type*>(this)->optional() || base_.present(); }

private:
decimal_cref base_;
Expand Down Expand Up @@ -193,7 +193,7 @@ class ext_cref<nested_message_cref, group_type_tag, Properties>

explicit ext_cref(const field_cref &other) : base_(other) {}
cref_type get() const { return cref_type(aggregate_cref(base_)[0]); }
bool present() const { return !this->optional() || base_.present(); }
bool present() const { return !static_cast<cref_type*>(this)->optional() || base_.present(); }

private:
field_cref base_;
Expand Down