parameters: (compiler, flagname)
return_statement: return True
docstring: Return a boolean indicating whether a flag name is supported on
      the specified compiler.
docstring_summary: Return a boolean indicating whether a flag name is supported on
      the specified compiler.
docstring_tokens: Return a boolean indicating whether a flag name is supported on the specified compiler .
function: def has_flag(compiler, flagname):
      """Return a boolean indicating whether a flag name is supported on
      the specified compiler.
      """
      import tempfile
      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
function_tokens: def has_flag ( compiler , flagname ) : import tempfile 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