STL-pair-like triplet class - do I roll my own?

前端 未结 5 583
感动是毒
感动是毒 2021-01-03 18:52

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

5条回答
  •  抹茶落季
    2021-01-03 19:27

    If you're using C++11, you can use std::tuple.

    If you're using C++03, then you'll either need to resort to rolling your own (which isn't too hard), or using tuple from Boost.

提交回复
热议问题