ituple
A tuple that has all the features of std::tuple + these:
- you can get a new tuple by calling
.structured<N>()- this new tuple will be a resized version of the original
- this is done to make structured binding of unknown lengths of tuples possible.
nothing_typewill be returned if the index is higher
todo
- [x] rename
- [x] chose a place to put it
- [x] copy implementation
- [x] implement todo comments in the code
- [x] copy simple tests from codeshells
- [x] test the newly implemented parts
- [ ] figure out how this tuple can be used inside a structured bindings in a for loop. It's for
sql_statement(there's a test for it insql_test.cpp) - [x] fix tests
- [ ] Make ituple iterator work with tuples as well
- [ ] Make ituple iterator work with custom types that support "structured bindings"
- [ ] tuplifying the sql stmt binder (or column)
- [ ] renaming sql stmt binder to something better or separating the idea of binder and column
- [x] sql statement iterator
- [ ] ituple_iterator that supports sql stmt iter
- [ ] ituple which supports default type and default value generator
- [x] use ituple options in ituple_iterable
- [x] use ituple options in ituple_iterator
- [ ] fix type traits tests
other names
resizable_tupleistl::tuplemituplemi_tupleexpandable_tupleituplefor improved tuple
I've already implement most of it here: https://github.com/the-moisrex/codeshells/blob/main/cpp.tuple.structured.binding/main.cpp
It's done now. I just have to figure out how to decompose this in a for loop.
Do I have to reimplement all of the ituple_iterator just like I did with rapidjson? Come on!
Somewhere along the way I forgot how sql statement was made and now I can't use ituple for it without changing what ituple is now.
Lazy Iterators
Seems like a good idea to be used here.