Why it's not possible to create a pair object in the following way:
pair<int,int> p1 = {0,42}
in C++03 you should use
std::make_pair(0, 42);
since pair is not simple data-structure. or by calling constructor of pair i.e.
std::pair<int, int> p1(0, 42);
in C++11
pair<int, int> p1 = {0, 42}
is okay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With