Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-04-28 08:56:27

"Rob Stewart" <stewart_at_[hidden]> wrote in message
| From: "Thorsten Ottosen" <nesotto_at_[hidden]>
| > "Bob Bell" <belvis_at_[hidden]> wrote in message

| > | The absence of copying in scoped_ptr is not about enforcing or even
| > | encouraging a programming paradigm. Scoped_ptr denies copying because of
| > | what scoped _ptr _is_: a non-copyable type.
| >
| > but we could have made it copyable just like you're trying to say we can
| > pointer containers copyable.
| Are you seriously making that point? scoped_ptr wouldn't be
| scoped_ptr if it copied. A pointer container remains every bit a
| pointer container if it provides the usual spellings for copying
| and assignment.

apparently we disagree.

| > at the bottom line, C++ copies too much and sometimes its just a benefit
to be
| > made aware
| > of that fact
| Why should one library assume the pedagogical role of teaching
| C++ programmers that C++ copies too much? If you're that
| concerned that people will copy pointer containers more than they
| realize, with resulting performance problems, and perhaps lead to
| abandoning the library, just add a manifest constant controlled
| diagnostic when copies occur.

not sure what you by diagnostic.

| > | The same argument cannot be made for ptr_container, for two reasons.
| > | ptr_container is a kind of container,
| > ^^^^^^^^^^^^^^^^
| > | and containers (as I understand them)
| > ^^^^^^^^^^^^^^
| >
| > as you remark, pointer containers are "a kind of " containers; so they are
| > containers in the usual sense.
| Why are you picking at nits like this? Yep, it's "a kind of"
| container, so one expects it to work like most every other
| container one encounters.

its the nits that makes all the difference in our viewpoints.

to me, this whole thread is a nit.

| > in 10 lines of code you can have a copyable ptr_vector if you want, I
| > see why you can't
| > just do that if you want that?
| Because then most users of the library will need to write that
| same code.

I doubt that.


Boost list run by bdawes at, gregod at, cpdaniel at, john at