[Bug libstdc++/48472] some flavors of std::bind are included in the global namespace when you include <functional> with -std=c++0x

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 5 21:22:00 GMT 2011


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-05 21:22:03 UTC ---
No this is not in the global namespace but rather namelookup looks at std::bind
when one of the arguments are in std namespace.

namespace std
{
class A
{};
}

namespace std
{
  template<typename A>
  void g(void (*a)(A), A);
}

void h(std::A a)
{
  g(&h, a);
}



More information about the Gcc-bugs mailing list