Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit 5edc68c

Browse files
Merge pull request #5 from Algunenano/update14
Fix C++20 interaction (LLVM 14)
2 parents e9f08df + e2ac306 commit 5edc68c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rose/rose_graph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct LeftEngInfo {
112112
}
113113
size_t hash() const;
114114
void reset(void);
115-
operator bool() const;
115+
explicit operator bool() const;
116116
bool tracksSom() const { return !!haig; }
117117
};
118118

@@ -133,7 +133,7 @@ struct RoseSuffixInfo {
133133
bool operator<(const RoseSuffixInfo &b) const;
134134
size_t hash() const;
135135
void reset(void);
136-
operator bool() const { return graph || castle || haig || rdfa || tamarama; }
136+
explicit operator bool() const { return graph || castle || haig || rdfa || tamarama; }
137137
};
138138

139139
/** \brief Properties attached to each Rose graph vertex. */

src/util/ue2_graph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class vertex_descriptor : totally_ordered<vertex_descriptor<Graph>> {
176176
vertex_descriptor() : p(nullptr), serial(0) {}
177177
explicit vertex_descriptor(vertex_node *pp) : p(pp), serial(pp->serial) {}
178178

179-
operator bool() const { return p; }
179+
explicit operator bool() const { return p; }
180180
bool operator<(const vertex_descriptor b) const {
181181
if (p && b.p) {
182182
/* no vertices in the same graph can have the same serial */
@@ -215,7 +215,7 @@ class edge_descriptor : totally_ordered<edge_descriptor<Graph>> {
215215
assert(tup.second == (bool)tup.first);
216216
}
217217

218-
operator bool() const { return p; }
218+
explicit operator bool() const { return p; }
219219
bool operator<(const edge_descriptor b) const {
220220
if (p && b.p) {
221221
/* no edges in the same graph can have the same serial */

0 commit comments

Comments
 (0)