title: What is visible in the output file as a result of name mangling?
body: <p>Are only public functions visible after name mangling ? What happens to private, and protected functions ? What about class member variables, constants, enums etc ? Nested classes ?</p>
  
  <p>I am aware that each compiler mangles differently, but I imagine they mangle the same things ? Is that right ?</p>
  
  <p>After compiling a class, how do I inspect the output file to see what is visible ?</p>
  
  <p>For example, if i have the following class, and it is compiled, when can an end user determine just by inspecting the output file (they won't have access to the source code).</p>
  
  <pre><code>class SomeSwearWord{
  
  private:
       int _anotherSwearWord;
       int getNextSwearWord();
  protected:
       std::string _aCurseWord;
       std::string refineMyCurseWord();
  public:
      int _aVeryBadWord;
      int getPreviousBadWord();
  }
  </code></pre>
  
  <p>EDIT: For purposes of example, let us consider LLVM or gcc...</p>
  
  <p>EDIT: Will a customer, who has no access to the source code, be able to determine the above curse words just from the executable or object files ?</p>
  
  <p>EDIT: Can anyone give a comprehensive answer ? The actual platform doesn't matter, I'm just trying to get an idea of what is visible. I understand that different compilers mangle differently, but I just want to understand in the worst case, how much can an outsider see ?</p>