
上QQ阅读APP看书,第一时间看更新
How to do it...
A very handy use case for this is constructing std::pair and std::tuple instances. These can be specialized and instantiated and specialized in one step:
std::pair my_pair (123, "abc"); // std::pair<int, const char*>
std::tuple my_tuple (123, 12.3, "abc"); // std::tuple<int, double,
// const char*>