Why can I use std::unordered_map with references but not with std::stack?

101 views Asked by At

I have std::unordered_map<char, Argument&> and it works fine, but when I try to declare std::stack<Argument&>, I'm getting the following error:

In template: 'allocate' declared as a pointer to a reference of type 'ArgumentParser::ArgParser::Argument &'

0

There are 0 answers