Skip to content

Commit baa2185

Browse files
committed
refactor: update precondition based on the pointer arithmetic
1 parent 5fe3edf commit baa2185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/cppfront.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ class cppfront
18521852
auto is_dependent(const qualified_id_node& n, bool exclude_last = false)
18531853
-> bool
18541854
{
1855-
assert(n.ids.size() > 0);
1855+
assert(n.ids.size() > int{exclude_last});
18561856
return is_dependent(*n.ids[0].id, true, true)
18571857
|| std::any_of(n.ids.begin() + 1, n.ids.end() - int{exclude_last}, [&](auto& id) {
18581858
return is_dependent(*id.id, true, false);

0 commit comments

Comments
 (0)