Can anyone advise on the correct syntax for the std::make_pair call in the std::vector::push_back call in the code below:
#include <array>
#include <vector>
#include <utility>
int main()
{
typedef std::pair<double, double> PairType;
std::vector<std::pair<double, std::array<PairType, 3> > > myVector;
double Key = 0.0;
PairType Pair1 = std::make_pair(1.0, 2.0);
PairType Pair2 = std::make_pair(3.0, 4.0);
PairType Pair3 = std::make_pair(5.0, 6.0);
myVector.push_back(std::make_pair(Key, { Pair1, Pair2, Pair3 } )); // Syntax Error
return 0;
}
The compiler (MS VS2015.2) cannot determine the type of the second argument in the std::make_pair call, which is understandable yet I don't know how to enlighten it.