   friend namespace
  Is there a way to pull off something like "friend namespace" in a class? I need my namespace to have access to some private variables of a certain class, but I don''t want to create accessor functions for them that anything can use. Is there some kind of way to make it so only the private variables (or functions if I have to) are available only from inside the namespace? 
  just declare the functions in the namespace as friends of the class ;  Did you try to put all the functions in the namespace in a class and friending the class? 