Boost logo

Boost Users :

Subject: [Boost-users] Boost.Multiindex namespace problem
From: Axel (axel.azerty_at_[hidden])
Date: 2008-09-05 08:56:30


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net