Skip to content

Commit 07a1626

Browse files
committed
Correct the presence bit for the case of the groups
1 parent 9b1af73 commit 07a1626

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mfast/ext_ref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ class ext_cref<BaseCRef, group_type_tag, Properties>
205205
explicit ext_cref(const field_cref &base) : base_(base) {}
206206
explicit ext_cref(const aggregate_cref &base) : base_(base) {}
207207
cref_type get() const { return base_; }
208-
bool present() const { return !this->optional() || group_present_; }
208+
bool present() const { return group_present_; }
209209

210210
void set_group_present(bool present) { group_present_ = present; }
211211

212212
private:
213213
cref_type base_;
214-
bool group_present_ = true;
214+
bool group_present_ = this->optional()?false:true;
215215
};
216216

217217
template <typename Properties>

0 commit comments

Comments
 (0)