Boost logo

Boost :

Subject: Re: [boost] [type traits] add a set of templates to propagate constetc from one type to another?
From: Vasilis Vasaitis (v.vasaitis_at_[hidden])
Date: 2010-03-04 12:23:12


On Wed, Mar 03, 2010 at 10:30:47AM -0800, Jeffrey Hellrung wrote:

..[edited]..

> Stewart, Robert wrote:
> >However, if From already is const, copying "const" from To to From
> >won't make From any more const, so "copy" does capture the
> >augmentation idea pretty well.
>
> I'm tending to interpret "copy" as overwrite or replace whatever cv
> qualifiers are on To with whatever is on From, rather than
> "augment". This might be a stretch, but that seems consistent with
> the use of the word copy elsewhere, e.g., std::copy.
>
> I think both could be useful. That said, I've only ever used the
> "propagation"/"augmentation" form.

  Personally, even though the example I presented implements the
"augmentation" form, in practice what I had in mind was the
"replacement" form. I'm inclined to agree with John here: just have
the "replacement" version and call it copy_* (for const / volatile /
cv).

> Speaking of the OP, I've cc'ed Vasilis back onto this thread
> (although that's easy to forget to do; I'd encourage Vasilis to
> either set to receive emails or check the thread yourself.)

  Thanks. Yes, in the end it looks like receiving emails is the only
workable option. (I ended up following the conversation through gmane,
but of course replying becomes complicated.)

-- 
Vasilis Vasaitis
"A man is well or woe as he thinks himself so."

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