Boost.Multiindex namespace problem
Hello I m using boost 1.35 and g++ v4.1.3 20070929 (Ubuntu 4.1.2-16ubuntu2) on ubuntu gutsy, I have a problem when using multindex namespaces. This compiles without problem : (this is in a class) using namespace boost::multi_index ; class myClass { public: struct foo { public: int getLocalDataId() ; } ; typedef hashed_unique<boost::multi_index::mem_fun<foo, int, &foo::getLocalDataId> > myIndex ; }; But the same code without the prefix "boost::multi_index" doesnt compile : typedef hashed_unique<mem_fun<foo, int, &foo::getLocalDataId> > myIndex ; I can obviously add the namespace before mem_fun, I just wonder why this compile error occurs. Thanks in advance.
Hi Axel, ________________________________________ De: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] En nombre de Axel [axel.azerty@laposte.net] Enviado el: viernes, 05 de septiembre de 2008 14:56 Para: boost-users@lists.boost.org Asunto: [Boost-users] Boost.Multiindex namespace problem
Hello
I m using boost 1.35 and g++ v4.1.3 20070929 (Ubuntu 4.1.2-16ubuntu2) on ubuntu gutsy, I have a problem when using multindex namespaces.
This compiles without problem : (this is in a class)
using namespace boost::multi_index ; class myClass { public: struct foo { public: int getLocalDataId() ; } ; typedef hashed_unique<boost::multi_index::mem_fun<foo, int, &foo::getLocalDataId> > myIndex ; };
But the same code without the prefix "boost::multi_index" doesnt compile : typedef hashed_unique<mem_fun<foo, int, &foo::getLocalDataId> > myIndex ;
I can obviously add the namespace before mem_fun, I just wonder why this compile error occurs.
What's the compiler error you're getting? I presume this is a name clash, possibly with std::mem_fun in case you're also having the directive "using namespace std;". Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (2)
-
Axel
-
JOAQUIN M. LOPEZ MUÑOZ