
I have been using the STL for some time now and have been investigating possible use of the boost libraries in future projects. The most useful library I have found so far was the boost::lamda library. I was reading the documentation and experimenting around with the boost::tuples
Thanks for everyone's input on this. Dennis Bingaman Raytheon "Scott McMurray" <me22.ca+boost@gmail.com> Sent by: boost-bounces@lists.boost.org 07/06/2007 11:36 PM Please respond to boost@lists.boost.org To boost@lists.boost.org cc Subject Re: [boost] boost::tuples On 06/07/07, Dennis D Bingaman <ddbingaman@raytheon.com> wrote: library.
The documentation is excellent and very complete and now I understand how to create tuples and maybe use them is some limited way. Thing is, I can't seem to grasp what advantages there are of tuples over structures and classes? Can someone tell me; what are the benefits of tuples over structures or classes?
You might want to look into a language such as ML that has both records (like structs) and tuples built-in, and see where they use which. I think Jarrad Waterloo's explanation is good though. Tuples are great when you need a compound type for some reason, such as returning more than one value from a function, like a map's insert, but that compound type itself is unimportant. Those situations are often also those where the ability to tie comes in very handy. (Which is pretty much just an emulation of the pattern matching in something like ML.) ~ Scott McMurray _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost