from my view , i thinks the use of import std; may be the problem . If you use #include instead it will work perfectly fine.
for use of import std; latest version of gcc will work ,i think