[interprocess] set doesn't work when key_type is pointer.
Hello all,
It seems that boost::interprocess::set won't compile if the key_type is pointer.
However, bip::vector or std::set works fine.
I'm using g++ 4.5.2 and boost 1.46.0 with linux 2.6.37.
Here is my code:
// compile command: g++ a.cpp -lboost_thread
namespace bip = boost::interprocess;
struct comp {
template<class Pointer>
bool operator()(Pointer a, Pointer b) const {
return *a < *b;
}
bool operator()(int a, int b) const {
return a < b;
}
};
typedef bip::managed_mapped_file::segment_manager segment_manager_t;
#define fset(value_t) \
bip::set
El 26/03/2011 15:13, skywalker escribió:
Hello all,
It seems that boost::interprocess::set won't compile if the key_type is pointer. However, bip::vector or std::set works fine. I'm using g++ 4.5.2 and boost 1.46.0 with linux 2.6.37. Here is my code: // compile command: g++ a.cpp -lboost_thread
It seems this is an error in Boost.Intrusive, that creates ambiguous comparison functors, when pointer type is implicitly convertible from raw pointers. I'll try to fix it ASAP.
participants (2)
-
Ion Gaztañaga
-
skywalker