Search This Blog

Saturday, June 12, 2010

Anonymous namespaces vs statics

static function: visible to other function in the same file.
anonymous namespace: visible to other stuff in the same file.

but if you want to hide the symbol entirely, use static.


Reference:
http://stackoverflow.com/questions/558122/what-is-a-static-function
http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes

No comments: