How to identify instance methods and header methods in documentation

I have been reviewing the site's reference documentation a lot and I still can't tell when a method is global or an instance method. For example, if the foo header says it has a class called bar, and that has a public member function zop(), and that Foo module is in the standard namespace, it is not clear to me if I should be doing

1
2
  #include <foo>
  std::zop()


or

1
2
3
  #include <foo>
  Bar b;
  b.zop()


Let me give you an example, basic_istream is a class template in the istream header file, and the documentation says it has a public member function called 'getline'. It is not clear to me that I am supposed to do

1
2
  #include <istream>
  std::getline(myinput,line);


and not

1
2
  #include <istream>
  myinput.getline(line);


Can somebody please explain to me how, from reading the reference documentation, I can tell if a function should be invoked on an instance, or if it should be invoked using std::?
It says on the title of the page. For example:

std::getline(...) vs std::istream::getline(...)

One is just in the std namespace. The other is inside the class istream inside the std namespace.
Topic archived. No new replies allowed.