2Why is it there? It is not part of the class so it must be declared outside of the class declaration (i.e. after theclosing }; ).There are many different sorts of “helper” free functions that are not part of the class but are closelyassociated with it, and which must appear in the same namespace. It is a common convention to declare thesefunctions in the same header file as the class.