|
Boost Users : |
From: Hughes, James (jhughes_at_[hidden])
Date: 2006-11-16 06:06:36
Clip..
> >>{ }
> >>
> >
> >
> > I did something along these lines but still got a load of compile
> > faults. Will post a more accurate code snippet when time
> allows, but
> > have a deadline end of today!!
>
> You also need to call the constructor when you call map_list_of():
>
> map_list_of(1, data( "hello", list_of(3)(4)(4) ) );
>
> -Thorsten
> ____
Thanks Thorsten, that did the trick. I had actually tried something
along those line when trying to figure it out myself, but didn't know
how to handle the range stuff you put in your example. Thanks again.
As a sort of aside, this example would make a good addition to the
documentation, for those coming to C++ from C where this sort of nested
structure initialisation is common (well, in my world it is!).
James
___________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law. If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system. If you
have any questions about this e-mail please notify the sender
immediately.
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