Top "Non-member-functions" questions

Operator overloading : member function vs. non-member function?

I read that an overloaded operator declared as member function is asymmetric because it can have only one parameter and …

c++ operator-overloading member-functions friend-function non-member-functions
Invalid use of 'this' in non-member function

I had working on a class and started writing everything in the same .cpp file. However, after a while I …

c++ compiler-errors this non-member-functions
Documenting functions in C++ with Doxygen

I've got a project that I'm using Doxygen to generate documentation for. The documentation of the classes is fine, but …

c++ doxygen non-member-functions
Free function versus member function

What is the advantage of having a free function (in anonymous namespace and accessible only in a single source file) …

c++ dependencies member-functions pimpl-idiom non-member-functions
Effective C++ Item 23 Prefer non-member non-friend functions to member functions

While puzzling with some facts on class design, specifically whether the functions should be members or not, I looked into …

c++ encapsulation member-functions non-member-functions effective-c++
Static member functions

After reading sbi and Eli Bendersky's answers in this question I started to wondering what static member functions are for. …

c++ function static static-members non-member-functions
Non-member vs member functions in Python

I'm relatively new to Python and struggling to reconcile features of the language with habits I've picked up from my …

python encapsulation member-functions non-member-functions
Error C2270: Modifiers not allowed on nonmember functions

I'm getting this error when compiling: error C2270: 'busco' : modifiers not allowed on nonmember functions I think I understand the …

c++ visual-studio-2012 compiler-errors modifiers non-member-functions
Multiplying an object with a constant from left side

I have a Matrix class and it has overloaded * operators for scalar and matrix multiplications. template <class T> …

c++ templates operator-overloading member-functions non-member-functions
Can C++ assignment operators be free functions?

I'm trying something like this: Foo & operator=(Foo & to, const Bar &from); But I'm getting this error: …

c++ operator-overloading non-member-functions