"Fossies" - the Fresh Open Source Software Archive

Member "dmd-2.089.0/test/runnable/extra-files/linkdebug_primitives.d" (2 Nov 2019, 211 Bytes) of package /linux/misc/dmd-2.089.0.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 linkdebug_primitives;
    2 
    3 size_t popBackN(R)(ref R r, size_t n)
    4 {
    5     n = cast(size_t) (n < r.length ? n : r.length);
    6     r = r[0 .. $ - n];
    7     return n;
    8 }
    9 
   10 auto moveAt(R, I)(R r, I i)
   11 {
   12     return r[i];
   13 }