Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-09-19 10:44:30


Hi Dave,

There's three things you point out:

1. replacing 'plugin' with 'property' and changing the order of
  the tag and value type.
  This seems reasonable to me.

2. Not using an extra typedef.
  Of course we don't have control over how users will do this,
  by I can certainly change the examples to use this style.

3. Using 'weight' instead of 'weight_tag'.
  I'm hesitant because this will cause annoying name conflicts. I like
  to use 'weight' for local variables. We've been using 'S' at
  the end of the names of selectors in the interface, perhaps
  'weightS'?

Cheers,

Jeremy

David Abrahams writes:
> Hi Jeremy et al,
>
> I've been looking at the new graph documentation; it's much improved!
>
> I just ran across the following snippet, and got to thinking about how I
> would want to interface to the library if I were a user:
>
> typedef plugin<weight_tag, int> weightp;
> typedef adjacency_list<listS, vecS, directedS,
> no_plugin, weightp> Graph;
>
> The first typedef there acts almost like a declaration for a member of the
> graph's edge, if I understand correctly. So I'd like to calll it
> "int_weight", if I had to name it, and it's type should be
> property<...something...>. In fact, it looks clearer if I can write:
>
> typedef adjacency_list<listS, vecS, directedS,
> no_property, property<int, weight> > Graph;
>
> If there's no reason to mention weightp again (I haven't seen it needed in
> any of your examples), then I think this is much easier to read.


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