Section 11.5 “The C++ Programming Language” by Bjarne Stroustrup states that ordinary member functions get 3 things:
- access to internals of class
- are in the scope of the class
- must be invoked on an instance
friend
s get only 1.
static
functions get 1 and 2.
More Related Contents:
- Operator overloading : member function vs. non-member function?
- Superiority of unnamed namespace over static?
- How do we declare a friend function with a class template into .h file and define them into a .cpp file (not all in one header file)?
- How to make std::make_unique a friend of my class
- Upcast, downcasting, and hiding methods in C++ [closed]
- What is the fastest way to transpose a matrix in C++?
- Lifetime of temporaries
- Will using goto leak variables?
- How to convert string to char array in C++?
- Interacting with C++ classes from Swift
- What makes more sense – char* string or char *string? [duplicate]
- How can i use member initialization list to initialize an array?
- Why is initializing an integer in C++ to 010 different from initializing it to 10?
- DLL redirection using manifests
- Cuda kernel returning vectors
- Can I turn unsigned char into char and vice versa?
- Generating m distinct random numbers in the range [0..n-1]
- OpenCV: process every frame
- Integer division rounding with negatives in C++
- Where are member functions stored for an object?
- Does accessing the first field of a struct via a C cast violate strict aliasing?
- What is the use of 0-length array (or std::array)?
- Looking for 16-bit x86 compiler
- strdup or _strdup?
- Calling “C++” class member function from “C” code
- Copying non null-terminated unsigned char array to std::string
- What is the performance implication of converting to bool in C++?
- C++ linking error after upgrading to Mac OS X 10.9 / Xcode 5.0.1
- how to specify vc11 lambda calling convention
- Optimize template replacement of a switch