I'm trying to statically initialize a map that contains a pair:
typedef map<int, pair<int, int>> mytype;
static const mytype mymap = { 3, {3, 0} };
I'm using Visual Studio 2013, but I get the error:
error C2440: 'initializing' : cannot convert from 'initializer-list' to 'std::map<int,std::pair<int,int>,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>'
Any idea what would cause this? I thought VS2013 had this C++11 functionality.
Aucun commentaire:
Enregistrer un commentaire