[Bug c++/53173] PROD02

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 1 09:41:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53173

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-01 09:40:53 UTC ---
(In reply to comment #0)
> 4. error: no matching function for call to ‘make_pair(std::string&,
> std::string&)’

If you're calling make_pair with an explicit template argument list e.g. 
  pair<string&, string&> p = make_pair<string&, string&>(s1, s2);
then that won't work in C++11

Just construct a pair directly, it's pointless to use make_pair if you don't
want to deduce the argument types:

  auto p = pair<string&, string&>(s1, s2);
or
  pair<string&, string&> p(s1, s2);



More information about the Gcc-bugs mailing list