[cfe-dev] bug with USRs and fixed-length arrays?

Dmitri Gribenko gribozavr at gmail.com
Fri Nov 2 12:12:27 PDT 2012


On Fri, Nov 2, 2012 at 8:49 PM, Iestyn Bleasdale-Shepherd
<iestyn at valvesoftware.com> wrote:
> Hi Dmitri - thanks for the response!
>
> The line you quote ends with "...where the type qualifiers (if any) are those specified within the [ and ] of the array type derivation."

I don't see how it is relevant -- there are no qualifiers within [].

> This qualification allows disambiguation between my two example functions - as it must, since they may have completely different implementations and may be passed as different function pointers.
>
> Am I missing something here? We use these kinds of overloads in our code, in cases which depend on their resolving to *different* functions.

This is not valid both in C and C++:
void func(char a[16]) {}
void func(char a[32]) {}

So the overloads you refer to probably have more than one argument and
they differ in those extra arguments.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list