From: Daniel Spangenberg (dsp_at_[hidden])
Date: 2003-11-06 07:14:28
David Abrahams schrieb:
> When I posted, before you gave a loose definition of swappability, I
> thought that swappable probably meant "swappable with std::swap".
> That does for all intents and purposes imply copyability **today**,
> though that would change after Howard's proposal is accepted.
I see your view know and I accept it absolutely. Thanks for your explanation.
> I'll be happy to accept now anything you tell me you meant. As for
> earlier, I had no idea what you meant, and after reading your last
> posting I was left with an entirely different impression: that your
> "swappable" depended on the presence of a member function.
Yes, my explanations were awfully and somewhat crowed. It became better
during development, though.
> It's awfully simple to define as Howard's paper shows, so I don't see
> why not. I think it's reasonable to have a complete definition of a
> simple concept before we start discussing its implications.
You are right. Because I originally wasn't aware of Howards ansatz, I
reinvented the wheel by starting with bad preconditions.
> What makes you so sure I understood why you left out the valid
> expressions? I really didn't. Maybe I missed an important part of
> the thread.
Sorry, Dave. I did not want to sound harsh, we both had misunderstandings
from each other. Lets forget that, now.
> > Now, finally: What about the swappability of named_object?
> I really have no idea or opinion about that issue.
Sigh.. OK, I can accept this.
> I don't think I was asking a question.
> For the record, I don't think I'd like to accept any definition of
> Swappable in Boost that differs from Howard's (which does work for
> ints). You now seem to be saying that your definition is the same as
> Howard's, but it seemed markedly different just a few messages ago.
> >> > and how does it's definition relate to boost::scoped_ptr, which I
> >> > would in fact describe as "swappable but not copyable"?
> > Reply?
> I don't understand the question.
I just gave boost::scoped_ptr as an example of a "swappable, but not
copyable" type, which is a case which is in accordance to Howards proposal.
I tried to use this example to explain, why I think, that named_object,
which is part of the current development tree of boost.thread, could/should
provide Swappability (but not Copyablility, which it currently doesn't have due
to explainable reasons).
Following the results from our discussion I would add to propose a namespace
scope function swap accepting two mutable named_object references, provided
that this proposal seems generally accepted. If not, I would be glad, if someone
could explain me, why he/she does not think so.
Thank you for your patience,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk