Relative Content

Tag Archive for c++20

Check if type T is a std::span

I am iterating over an argument sequence at compile-time, and I want to check if one of the arguments may be a span. If so, I will do span-things.

std::generate – access previous element in vector

I am using std::generate to construct a struct and push into a vector. In order to construct the struct, I need to refer to the previous struct in the sequence. Is there any way to do this in c++20 ? I would rather not use boost or a 3rd party library.
Thank you!