Boost logo

Boost :

Subject: Re: [boost] [type_traits][function_types] Discard param const qualification, bug or feature?
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-09-26 07:58:19


On 26 September 2013 12:50, Andrey Semashev wrote:
> On Thu, Sep 26, 2013 at 2:40 PM, Jonathan Wakely
> <jwakely.boost_at_[hidden]>wrote:
>
>
>> It should be able to modify it or
>> not, without that affecting the function signature the caller sees.
>> Whether the parameter is const or not is an internal detail to the
>> function, not part of the interface.
>>
>
> True. I'm not really arguing with that.

But that's the fundamental reason it's not part of the signature!

> It's just that the outcome of this
> reasoning appears unexpected for newcomers.

If the language changed every time a newcomer finds something
unexpected the standard would be revised daily.


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