gcc/testsuite/gdc.test/compilable/imports/b33a.d
raw| 1 | module imports.b33a; |
| 2 | |
| 3 | struct IsEqual( T ) |
| 4 | { |
| 5 | bool opCall( char p1, char p2 ) |
| 6 | { |
| 7 | return p1 == p2; |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | template find_( Elem, Pred = IsEqual!(Elem) ) |
| 12 | { |
| 13 | size_t fn( char[] buf, Pred pred = Pred.init ) |
| 14 | { |
| 15 | return 3; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | template find() |
| 20 | { |
| 21 | size_t find( char[3] buf ) |
| 22 | { |
| 23 | return find_!(char).fn( buf ); |
| 24 | } |
| 25 | } |