GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

add warehouse<T> #271

Closed GorNishanov closed 2 years ago

GorNishanov commented 2 years ago

The class Warehouse is intended to be used by clients of the impl::Lexicon to temporarily accumulate a sequence of references to data of type T to assist in construction of ipr nodes such as product or sum.

The expected use pattern:

ipr::impl::Warehouse<Type> types;
types.push_back(lexicon.int_type());
types.push_back(lexicon.char_type());
auto& product = lexicon.get_product(types);