code: def has_flag(compiler, flagname):
      
      with tempfile.NamedTemporaryFile("w", suffix=".cpp") as f:
          f.write("int main (int argc, char **argv) { return 0; }")
          try:
              compiler.compile([f.name], extra_postargs=[flagname])
          except setuptools.distutils.errors.CompileError:
              return False
      return True
docs: Return a boolean indicating whether a flag name is supported on
      the specified compiler.