I get the error with following code (error.cpp):
#include <map>
#include <functional>
#include <vector>
int main()
{
std::map<
int, std::map< std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::map<std::string, std::map<std::string,
std::map<std::string, std::string>
> > >
> > >
> > >
> > >
> > >
> > >
> > oups;
}
When compiling with debug flag:
g++ error.cpp -g -o error
My system is Ubuntu 18.04 with g++ 7.5.0 running as a VM. RAM is 5GB and Swap is 2.5GB. Hard disk space left 1GB.
Is this normal? A bug? A limitation?
What would be a "nicer" alternative for above code ? (c++14)