Skip to content

Commit

Permalink
Fix C++20 interaction (LLVM 14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Algunenano committed Mar 1, 2022
1 parent e9f08df commit e2ac306
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rose/rose_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct LeftEngInfo {
}
size_t hash() const;
void reset(void);
operator bool() const;
explicit operator bool() const;
bool tracksSom() const { return !!haig; }
};

Expand All @@ -133,7 +133,7 @@ struct RoseSuffixInfo {
bool operator<(const RoseSuffixInfo &b) const;
size_t hash() const;
void reset(void);
operator bool() const { return graph || castle || haig || rdfa || tamarama; }
explicit operator bool() const { return graph || castle || haig || rdfa || tamarama; }
};

/** \brief Properties attached to each Rose graph vertex. */
Expand Down
4 changes: 2 additions & 2 deletions src/util/ue2_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class vertex_descriptor : totally_ordered<vertex_descriptor<Graph>> {
vertex_descriptor() : p(nullptr), serial(0) {}
explicit vertex_descriptor(vertex_node *pp) : p(pp), serial(pp->serial) {}

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

operator bool() const { return p; }
explicit operator bool() const { return p; }
bool operator<(const edge_descriptor b) const {
if (p && b.p) {
/* no edges in the same graph can have the same serial */
Expand Down

0 comments on commit e2ac306

Please sign in to comment.