Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost ICL not working as expected, expects std::set operator+=
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2012-08-29 15:11:03


2012/8/28 Adam Baxter <adam.m.baxter_at_[hidden]>:
> Hello All,
>
> I'm trying to use Boost (1.51) ICL to simplify some interval searches.
>
> Types:
>
> SequenceI::shp_set is a std::set of shared pointers
> types::mz_t is a Boost::Units quantity
>
> interval_map<types::mz_t, SequenceI::shp_set> is the typedef for the
> interval map
>
> I have a function that creates the appropriate segments and then I try to do
>
> msMap.add(segment);
>
> segment is: make_pair(interval<types::mz_t>::closed(lowerRange,upperRange),
> returnSet); (returnSet is just a SequenceI::shp_set)
>
> I then get the below error during compile. Looking at the "Party"
> code, nothing special is done to set to make things work. Would anyone
> be able to help me?

I suspect this is a clang bug. All other compilers and even older
clang versions compile the "party" example and code from similar use
cases. There are probably workarounds for this problem. You can try to
write a wrapper class around SequenceI::shp_set like in

http://www.boost.org/doc/libs/1_46_1/libs/icl/doc/html/boost_icl/examples/partys_height_average.html

so you can control the operator += and it's definition directly.

Since I don't have a clang compiler here and not much time, I won't be
able to work on this.

Regards,
Joachim

-- 
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de

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