parameters: (clean_lines, line_number, file_state, error)
docstring: Looks for 'using std::foo;' statements which should be replaced with 'using namespace std;'.
  
      Args:
        clean_lines: A CleansedLines instance containing the file.
        line_number: The number of the line to check.
        file_state: A _FileState instance which maintains information about
                    the state of things in the file.
        error: The function to call with any errors found.
docstring_summary: Looks for 'using std::foo;' statements which should be replaced with 'using namespace std;'.
docstring_tokens: Looks for using std :: foo ; statements which should be replaced with using namespace std ; .
function: def check_using_std(clean_lines, line_number, file_state, error):
      """Looks for 'using std::foo;' statements which should be replaced with 'using namespace std;'.
  
      Args:
        clean_lines: A CleansedLines instance containing the file.
        line_number: The number of the line to check.
        file_state: A _FileState instance which maintains information about
                    the state of things in the file.
        error: The function to call with any errors found.
      """
  
      # This check doesn't apply to C or Objective-C implementation files.
      if file_state.is_c_or_objective_c():
          return
  
      line = clean_lines.elided[line_number]  # Get rid of comments and strings.
  
      using_std_match = match(r'\s*using\s+std::(?P<method_name>\S+)\s*;\s*$', line)
      if not using_std_match:
          return
  
      method_name = using_std_match.group('method_name')
      error(line_number, 'build/using_std', 4,
            "Use 'using namespace std;' instead of 'using std::%s;'." % method_name)
function_tokens: def check_using_std ( clean_lines , line_number , file_state , error ) : # This check doesn't apply to C or Objective-C implementation files. if file_state . is_c_or_objective_c ( ) : return line = clean_lines . elided [ line_number ] # Get rid of comments and strings. using_std_match = match ( r'\s*using\s+std::(?P<method_name>\S+)\s*;\s*$' , line ) if not using_std_match : return method_name = using_std_match . group ( 'method_name' ) error ( line_number , 'build/using_std' , 4 , "Use 'using namespace std;' instead of 'using std::%s;'." % method_name )