title: Access to protected member through member-pointer: is it a hack?
body: <p>We all know members specified <code>protected</code> from a base class can only be accessed from a derived class own instance. This is a feature from the Standard, and this has been discussed on Stack Overflow multiple times:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/45146025/5470596" title="a similar question on Stack Overflow">Cannot access protected member of another instance from derived type's scope
  </a>;</li>
  <li><a href="https://stackoverflow.com/q/17717027/5470596" title="a similar question on Stack Overflow">Why can't my object access protected members of another object defined in common base class?</a></li>
  <li>And others.</li>
  </ul>
  
  <p>But it seems possible to walk around this restriction with member pointers, as user chtz <a href="https://stackoverflow.com/a/49538355/5470596" title="their answer to a related question">has shown me</a>:</p>
  
  <pre><code>struct Base { protected: int value; };
  struct Derived : Base
  {
      void f(Base const&amp; other)
      {
          //int n = other.value; // error: 'int Base::value' is protected within this context
          int n = other.*(&amp;Derived::value); // ok??? why?
          (void) n;
      }
  };
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/7680e07f219a73a7" rel="noreferrer" title="(external)">Live demo on coliru</a></p>
  
  <p>Why is this possible, is it a wanted feature or a glitch somewhere in the implementation or the wording of the Standard?</p>
  
  <hr>
  
  <p>From comments emerged another question: <a href="http://coliru.stacked-crooked.com/a/185e06f44865b243" rel="noreferrer">if <code>Derived::f</code> is called with an actual <code>Base</code></a>, is it undefined behaviour?</p>