Next block of code compiles pretty successfully:
#include <map>
template<typename KEY>
using umap = std::map<KEY, std::wstring>;
int main()
{
umap<int> m;
umap<double> m2;
}
Meanwhile, adding an iterator template the same way as the map makes the compiler swear and complain about error C2061: syntax error. So the next block won't compile:
template<typename KEY>
using umap = std::map<KEY, std::wstring>;
template<typename KEY>
using iter = std::map<KEY, std::wstring>::iterator;
int main()
{
umap<int> m;
umap<double> m2;
}
Can't we using alias declarations with iterators? Why? And would be a workaround?