"Fossies" - the Fresh Open Source Software Archive

Member "ldc-1.7.0-src/tests/d2/dmd-testsuite/compilable/imports/a13226.d" (5 Jan 2018, 355 Bytes) of package /linux/misc/ldc-1.7.0-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 module imports.a13226;
    2 
    3 enum isFunction(alias f) = is(typeof(f) == function);
    4 enum isIntField(alias f) = is(typeof(f) == int);
    5 
    6 string t(alias cls, string method)()
    7 {
    8     static if (isFunction!(mixin("cls."~method)))
    9     {}
   10     return "";
   11 }
   12 
   13 string u(alias cls, string member)()
   14 {
   15     static if (isIntField!(mixin("cls."~member)))
   16     {}
   17     return "";
   18 }