Top "Std-pair" questions

A std::pair is an ordered, heterogeneous sequence of exactly two objects (it is a special case of std::tuple).

pair<int,int> pair as key of unordered_map issue

My code: typedef pair<int,int> Pair tr1::unordered_map<Pair,bool> h; h.insert(make_…

c++ unordered-map std-pair
Any STL data structure like pair that gives three items(types) instead of two?

Question 1: I'm using C++ 11, and I'm learning. I realize I can do this with two pairs: pair<pair<&…

c++ data-structures c++11 std-pair
C++ std::transform vector of pairs->first to new vector

Sorry for a little bit beginner question. There are vector and vector of pairs typedef std::vector <int> …

c++ vector transform functor std-pair
lower_bound of vector of pairs with lambda

I want to find the std::lower_bound of the a std::vector of std::pair's according to the second …

c++ lambda stdvector std-pair
Implementation of lower_bound on vector pairs

I know we need to include some compare function in order to achieve this. But not able to write for …

c++ vector std-pair lower-bound
struct with 2 cells vs std::pair?

Possible Duplicate: What is the difference between using a struct with two fields and a pair? Dear all, I have …

c++ struct std-pair
Return empty std::pair from function

Is it possible to return an empty pair from a function? Meaning, follow the rules of the function prototype, but …

c++ std-pair
std::pair<int, int> vs struct with two int's

In an ACM example, I had to build a big table for dynamic programming. I had to store two integers …

c++ performance std-pair
Using move semantics with std::pair or std::tuple

Suppose you want to take advantage of move semantics, but one of your movable classes needs to be part of …

c++ c++11 move-semantics std-pair move-constructor
C++ typedef a std::pair and then use the typedef to declare a map

Let's say I have this typedef typedef std::pair<std::string, uint32_t> MyType; Then, if I also …

c++ dictionary typedef std-pair