class Tree::ChildIteratorBase
Declaration
template <typename DerivedT, typename NodeT>
class Tree::ChildIteratorBase { /* full declaration omitted */ };
Description
Iterator over children (common base for const/non-const). Not invalidated by tree mutations (holds a stable node pointer).
Declared at: clang/include/clang/Tooling/Syntax/Tree.h:148
Templates
- DerivedT
- NodeT
Member Variables
- protected NodeT* N = nullptr
Method Overview
- public ChildIteratorBase<DerivedT, NodeT>()
- public ChildIteratorBase<DerivedT, NodeT>(NodeT * N)
- public NodeT * asPointer() const
- public bool operator bool() const
Methods
¶ChildIteratorBase<DerivedT, NodeT>()
ChildIteratorBase<DerivedT, NodeT>()
Declared at: clang/include/clang/Tooling/Syntax/Tree.h:156
¶ChildIteratorBase<DerivedT, NodeT>(NodeT* N)
ChildIteratorBase<DerivedT, NodeT>(NodeT* N)
Declared at: clang/include/clang/Tooling/Syntax/Tree.h:157
Parameters
- NodeT* N
¶NodeT* asPointer() const
NodeT* asPointer() const
Description
The element, or nullptr if past-the-end.
Declared at: clang/include/clang/Tooling/Syntax/Tree.h:173
¶bool operator bool() const
bool operator bool() const
Description
Truthy if valid (not past-the-end). This allows: if (auto It = find_if(N.children(), ...) )
Declared at: clang/include/clang/Tooling/Syntax/Tree.h:171