Я использую MinGW64 с G CC 7.5.0, который включает C ++ 17 на Dev C ++ 5.11 на Windows 7.
Теперь, как получить доступ к .second
в следующем pair
?
#include <iostream>
#include <vector>
#include <variant>
using namespace std;
int main()
{
vector<pair<char,variant<bool,int,string>>> x;
x.push_back(make_pair('i',5));
cout<<x[0].first; //ok
cout<<x[0].second; //error: no match for 'operator<<'
}