|
Boost : |
Subject: Re: [boost] [type_traits][function_types] Discard param const qualification, bug or feature?
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-10-01 13:02:39
On Tue, 01 Oct 2013 03:22:10 -0700, Rob Stewart
<robertstewart_at_[hidden]> wrote:
> On Sep 30, 2013, at 9:46 PM, Mostafa <mostafa_working_away_at_[hidden]>
> wrote:
>
>> On Mon, 30 Sep 2013 14:20:40 -0700, Jonathan Wakely
>> <jwakely.boost_at_[hidden]> wrote:
>>
>>> On 30 September 2013 21:53, Mostafa wrote:
>>>>>
>>>>> Why do you choose a different "efficient type" for an 'int'
>>>>> parameter vs a 'const int' parameter?
>>>>
>>>> You're most likely reading this message out of context. If you start
>>>> with Sergey's response it'll probably make more sense.
>>>
>>> No, I've read the whole thread.
>>>
>>> It sounds like your code to generate signatures has a bug and doesn't
>>> model the rules of C++.
>>>
>>> I repeat: Why would you choose a different "efficient type" for an
>>> 'int' parameter vs a 'const int' parameter?
>
> Let me rephrase that. int and int const are passed from the caller to
> the function by value. What the function does with the parameters is
> immaterial to the caller, so why would you treat them differently when
> forwarding them?
See my last response to Gavin.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk