Re: GCC behave different for cv-qualifier function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15 December 2010 08:50, zhang qingshan wrote:
>
> Sadly, I cannot understand what the situation would be if T is
> replaced by function.

That is governed by 8.3.5 not 8.3.2

> When the template argument substitudition happens, T --> void (),
> const T --> void (), as it is a const qualifier function, which const
> is ignore.
> finally, reference apply for this type descriptor. const T& -->
> void(&)(). I believe that, I have missed something here.


I showed in my example that void (const&)() and void(&)() are equivalent.

The reason you can't compile your other examples is only because
you're using invalid syntax.  C++ has very unhelpful declarator syntax
for function types.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux