I want to use a triplet class, as similar as possible to std::pair. STL doesn't seem to have one. I don't want to use something too heavy, like Boost. Is there some useful FOSS non-restrictive-license triplet class I could lift from somewhere? Should I roll my own? Should I do something else entirely?
template<typename T1, typename T2, typename T3> std::tuple<T1, T2, T3> triple;
Take a look at
std::tuple - it's a generalization of
std::pair. So here's a value-initialized triple of
std::tuple<int, int, int> triple;
If you want, you can have a type alias for triples only:
template<typename T1, typename T2, typename T3> using triple = std::tuple<T1, T2, T3>;