On 4/13/2016 3:58 AM, Marco Leise wrote:
How about this style as an alternative?:immutable bool mmx; immutable bool hasPopcnt; shared static this() { import gcc.builtins; mmx = __builtin_cpu_supports("mmx" ) > 0; hasPopcnt = __builtin_cpu_supports("popcnt") > 0; }
Please do not invent an alternative interface, use the one in core.cpuid: http://dlang.org/phobos/core_cpuid.html#.mmx