title: Error recovering values from boost::unordered::unordered_map using std::string keys
body: <p>I'm storing in an unordered_map the results I get from a regex match. 
  std::cout the sub matches m[1].str() and m[2].str() shows the pair key-value correctly.</p>
  
  <p>Although when I store them in an unordered_map I always get an exception reporting that the key wasn't found.This is the code:</p>
  
  <pre><code>boost::unordered::unordered_map&lt;std::string, std::string&gt;
  loadConfigFile(std::string pathToConfFile) throw(std::string){
      std::fstream fs;
      fs.open(pathToConfFile.c_str());
      if(!fs)
          throw std::string("Cannot read config file.");
  
      boost::unordered::unordered_map&lt;std::string, std::string&gt; variables;
  
      while(!fs.eof())
      {
          std::string line;
          std::getline(fs, line);
          //std::cout &lt;&lt; line &lt;&lt; std::endl;
          boost::regex e("^(.+)\\s*=\\s*(.+)");
          boost::smatch m; //This creates a boost::match_results
          if(boost::regex_match(line, m, e)){
              std::cout &lt;&lt; m[1].str() &lt;&lt; " " &lt;&lt; m[2].str() &lt;&lt; std::endl;
              variables[m[1].str()] = m[2].str();
          }
      }
      std::cout &lt;&lt; variables.at(std::string("DEPOT_PATH")) &lt;&lt; std::endl; //Here I get the exception
  
      return variables;
  }
  </code></pre>
  
  <p>DEPOT_PATH is the name of a "variable" in a config file. std::cout &lt;&lt; m[1].str() shows it perfectly, but not found in the unordered_map.
  Any ideas?</p>