Spicy
Public Types | Public Member Functions | List of all members
hilti::node::Set< T > Class Template Reference

#include <node.h>

Public Types

using iterator = SetIterator< T >
 
using const_iterator = SetIterator< T >
 

Public Member Functions

 Set (const Set &other)=default
 
 Set (Set &&other) noexcept=default
 
auto begin () const
 
auto end () const
 
size_t size () const
 
bool empty () const
 
void insert (const T &t)
 
std::vector< T > copy () const
 
const T & operator[] (size_t i) const
 
bool operator== (const Set &other) const
 
Setoperator= (const Set &other)=default
 
Setoperator= (Set &&other) noexcept=default
 

Detailed Description

template<typename T>
class hilti::node::Set< T >

A set of AST nodes. The set creates a view of nodes that can be iterated over, yielding a reference to each node in turn. In contrast to Range, a set can include nodes that are not all part of a continuous slice inside a vector.

Member Function Documentation

◆ copy()

template<typename T>
std::vector<T> hilti::node::Set< T >::copy ( ) const
inline

Returns a new vector containing copies of all nodes that the range includes.


The documentation for this class was generated from the following file: