Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-06-10 14:47:20


Hello Matias,

Sunday, June 10, 2007, 6:47:18 PM, you wrote:

> On 6/10/07, Matias Capeletto <matias.capeletto_at_[hidden]> wrote:

>> > bm::value_type

> Today is definitely not my day... lets try one last time:

> left : is the left element
> right : is the right element
> info : is the information, that do not participate in the set

As I've said, there are two problems with these:
1. bm::value_type is dependent on bm which is both Boost.Bimap and my
component implementation detail. I don't want to put that dependency
on the user's code.
2. left, right and info members are not self-explaining to users.
There is no left or right side of my component.

This might be better if bimap allowed to express relations between
opaque structure members, something like:

struct MyData
{
  std::string Wildcard;
  unsigned int ID;
  std::string Rule;
  int Whatever;
};

typedef bimap<
  set_of< string, WildcardOrder >,
  unordered_set_of< unsigned int >,
  contains<
    MyData,
    left_is< MyData, string, &MyData::Wildcard >,
    right_is< MyData, unsigned int, &MyData::ID >
>
> MyBimap_t;

But I guess, that leads us to Boost.MultiIndex.

> Very sorry :(

Don't mention, it happens. :)

-- 
Best regards,
 Andrey                            mailto:andysem_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk