//import std.stdio; void main() { uint base; uint exp; static assert(is(typeof(base ^^ exp) == uint)); } test.d(8): Error: static assert (is(typeof(__error) == uint)) is false If the import is uncommented, the code compiles.
That's because ^^ requires import std.math; To make it work without the import, we need to move the intpow function out of std.math, and into the runtime. That's quite reasonable, provided we don't have to do the same for floating point powers. (To implement floating point powers, most of std.math would need to move to the runtime. In fact to do it with correct rounding, parts of bigint would be required as well).
Works since v2.064.