title: Working example of accessing non-static member from static method
body: <p>I was studying <a href="http://www.nsnam.org/docs/release/3.13/tutorial/singlehtml/index.html#example-code" rel="nofollow noreferrer">ns-3 tutorial</a>. I cannot understand the following code snippet:</p>
  
  <pre><code>class MyObject : public Object
  {
  public:
    static TypeId GetTypeId (void)
    {
      static TypeId tid = TypeId ("MyObject")
         .SetParent (Object::GetTypeId ())
         .AddConstructor&lt;MyObject&gt; ()
         .AddTraceSource ("MyInteger",
                       "An integer value to trace.",
                        MakeTraceSourceAccessor (&amp;MyObject::m_myInt))
         ;
       return tid;
    }
  
    MyObject () {}
    TracedValue&lt;int32_t&gt; m_myInt;
  };
  </code></pre>
  
  <p>As I understand,  MyObject::m_myInt is an access to non-static class member m_myInt from static method and &amp; takes address of this member. This code is successfully compiled and executed. How can it be possible? What instance of class does the static method use?</p>