I have most of my classes separated into two files (.h and .cpp). All of their methods (public, private or protected) are declared in .h file and defined in the .cpp file.
However, sometimes I just need a quick helper method that is used by only one of the member methods. In these cases, is it ok to just declare/define this method in .cpp file as a non-member function without declaring it in the .h file?
What are the possible cons of this approach? The one I see is that the definition of this method has to come before its usage in .cpp file (if we don't want to use forward declaration). Also IDE might have troubles finding these functions if they are entirely in .cpp file.
The reason I am asking this is that sometimes it almost feels like I am polluting .h file with declarations of these methods that do not access member data and are not used by any other class/file. It looks like I am making the really important declarations in .h file harder to find/read by introducing these helper method declarations.