Custom Query (146 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (67 - 69 of 146)

Ticket Owner Reporter Resolution Summary
#223 ajbeach fixed Cannot Convert Function Pointer to Bool
Description

Actually there is a way which is:

bool variable = functionPointer != (ReturnType (*)(ParameterType))0;

I guess a more accurate name would be "None of the initially obvious methods of converting a function pointer to a Boolean work and the one way that does is excessively complex" but that is wordy.

The "initially obvious" solutions started with simple assignment, which works in C, but when that failed I tried != with 0 and 0p and those did not work either.

I believe this is more likely to be from missing functions in the prelude.

#235 Michael Brooks <mlbrooks@…> mlbrooks fixed Wrong disambiguation in the presence of extra type variables
Description
    forall( dtype T, dtype U )
    struct map {};

    forall( dtype T )
    void f( T & ) {
        printf("f-generic\n");
    }

    forall( dtype T )
    void f( map(T, T) & ) {
        printf("f-specific\n");
    }

    int main() {
        float one;
        map(float, float) two;
        f(one);
        f(two);
    }

Actual output:

f-generic
f-generic

Expected output:

f-generic
f-specific
#241 pabuhr Thierry Delisle fixed Parser doesn't handle pragmas correctly
Description

This code doesn't parse unless it's inside a function

#pragma GCC diagnostic push
#pragma GCC diagnostic pop
Note: See TracQuery for help on using queries.