$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [type_traits][function_types] Discard param const qualification, bug or feature?
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-09-30 16:53:33
On Mon, 30 Sep 2013 12:49:44 -0700, Jonathan Wakely
<jwakely.boost_at_[hidden]> wrote:
> On 30 September 2013 20:22, Mostafa wrote:
>>
>> I should have been more specific, bar is some member function of T. So
>> in
>> Foo:mybar, the goal is to reconstruct T::bar's paramtypes as "efficient
>> types". That's what the other person's post was also referring to. So
>> if a
>> client passes the following struct as a template parameter to Foo:
>>
>> struct ClientClass
>> {
>> static void bar(int const) { ... }
>> };
>
> You're presenting this class as having a function of that type, but it
> doesn't, your example is:
>
> struct ClientClass
> {
> static void bar(int) { ... }
> };
>
>> the library is able to instantiate the following Foo::mybar
>>
>> void Foo::mybar(int const & x) { ClientClass::bar(x); }
>
> 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.