Skip to content

Commit eba23b0

Browse files
Merge pull request #133 from vient/vient/fix-clang-19
Fix build with Clang 19
2 parents 236a5c7 + de5aa3b commit eba23b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mfast/ext_ref.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ext_cref : public ext_ref_properties<OpType, Properties> {
101101
explicit ext_cref(const field_cref &base) : base_(base) {}
102102
explicit ext_cref(const aggregate_cref &base) : base_(base) {}
103103
cref_type get() const { return base_; }
104-
bool present() const { return !this->optional() || base_.present(); }
104+
bool present() const { return !static_cast<cref_type*>(this)->optional() || base_.present(); }
105105

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

133133
private:
134134
decimal_cref base_;
@@ -193,7 +193,7 @@ class ext_cref<nested_message_cref, group_type_tag, Properties>
193193

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

198198
private:
199199
field_cref base_;

0 commit comments

Comments
 (0)