Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-12 14:31:07


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> Because it's not a push_back.
>
> push_back(c, v) is a mutating operation on c. After it c has one
additional
> element pushed to its back, v.

Okay, I see your point. There arer indeed some strange non-correspondences
between MPL functions and their STL counterparts. For example, copy, which
takes two input sequences and adds the elements of the first to the end of
the second.

> append(a, b) is a pure function that returns the concatenation of a and b.
>
> I might be wrong, though; it's been a while since I looked at anything
> Lisp-related.

In elisp, the docs say:

Concatenate all the arguments and make the result a list.
The result is a list whose elements are the elements of all the arguments.
Each argument may be a list, vector or string.
The last argument is not copied, just used as the tail of the new list.

So I guess that would be a better name for what MPL calls copy.


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