http://d.puremagic.com/issues/show_bug.cgi?id=5703
Summary: std.intrinsic. and core.bitop.bsf, bsr and bswap should be CTFE-able Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-03-05 06:20:20 PST --- import core.bitop; enum x = bsf(0b111100); enum y = bsr(0b111100); enum z = bswap(0b111100); static assert(x == 2); static assert(y == 5); static assert(z == 0x3C000000); The three functions bsr, bsf and bswap are pure nothrow, but cannot be used in CTFE because there is no source code. These functions should be rewritten in D like bitswap and popcnt. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------