ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: Interest in bidirectional map?
by Dirk Gerrits other posts by this author
Oct 23 2002 6:11AM messages near this date
[PMX:#] [boost] Interest in bidirectional map? | [boost] Re: Interest in bidirectional map?
David B. Held wrote:

>  Dirk Gerrits wrote:
> 
>  > [...]
>  > How exactly did multi-threading come into play? Or did you refer to
>  > some other meaning of 'threaded'? :)
> 
> 
>  Yes.  In tree terminology, "threading" means to use leaf child pointers
>  to create a "fast" inorder traversal.  I was just abusing this term
>  somewhat to refer to tree pointers in general (imagine two trees over
>  the same set of nodes, where each node occupies a different location in
>  each tree...the "branches" of the trees are like "threads" that are
>  "interwoven").

Ah, ok.

> 
>  > [...]
>  > > Possibly a syntax like this could be possible:
>  > >
>  > > nmap map;
>  > > map.key<1>["joe"] = employee_record;
>  > > map.key<2>["123-45-6789"] = employee2;
>  > > employee_id = map[35]; // defaults to .key<0>

[snip]

> 
>  Hmm...after playing around with it, my preferred syntax doesn't seem
>  possible.  However, this looks promising, and can probably be
>  implemented with the preprocessor library:
> 
>  template
>  class map
>  {
>  public:
>      template
>      class key
>      {
>      public:
>          int operator[](T) { return 5; }
>      };
>      key key0;
>      key key1;
>  };
> 
>  int main()
>  {
>      map m;
>      m.key0[3];
>  }

I think I'd prefer the other notation because it allows you to use 
compile-time constants as indices. Perhaps you could offer both a 
preferred syntax and a compatible syntax in the spirit of Boost.Function 
and Boost.Signals?

> 
>  > In any case, the library suggestions in this thread seem promising.
> 
> 
>  Oh, so now we're back to single threading? ;)

LOL, I commented about your 'threads' and didn't even notice my own. :)

Regards,
Dirk Gerrits



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:

Dirk Gerrits
David B. Held
Dirk Gerrits
=?iso-8859-1?Q?Joaqu=EDn=20M=AA=20L=F3pez=20Mu=F1oz?=
David B. Held
David B. Held
David B. Held
David B. Held
Jeremy B. Maitin-Shepard

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved