|
Boost : |
Subject: Re: [boost] [type traits] add a set of templates to propagate constetc from one type to another?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-03 13:39:09
Jeffrey Hellrung wrote:
> 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.
std::copy doesn't necessarily affect existing elements. The use of "copy" is a bit varied.
> > "Propagate" is probably not a good choice because it
> > doesn't quite imply the addition to existing state you mean,
> > at least to me.
>
> A common meaning of "propagate" is "to pass along to
> offspring", which seems appropriate enough here.
But the offspring doesn't have anything not provided by its progenitors. Thus, it isn't augmentation but creation.
> I'll point out that the original poster also chose the word
> "propagate" independently of myself.
I understand, but just as you are concerned about "copy," I'm reporting that "propagate" doesn't help me.
> > Furthermore, "propagate" is frequently misspelled as "propogate."
>
> I understand your concern here., but I consider this a minor
> issue at best.
I just wanted to note that folks are likely to make many more mistakes with "propagate" than "copy" that compilers will happily report, but developers will curse.
> > "Augment" seems a bit stilted, but it does capture the idea
> > well. "Add" actually captures the idea pretty well, but we
> > can't use that.
>
> Both fail to convey the directionality and "from-to" or "source-dest"
> nature of the operator.
That applies to "copy" and "propagate" just as easily.
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk