title: How to get the value of a non-type template parameter?
body: <p>Here is the example:</p>
  
  <pre><code>template &lt;int n&gt;
  class A { };
  
  class B {
  public:
    int foo() {
      return a.n;  // error
    }
  private:
    A&lt;10&gt; a;
  };
  </code></pre>
  
  <p>I want to get the value of instantiated class <code>A&lt;10&gt;</code>'s non-type template parameter in class <code>B</code> other than template <code>A</code> itself, is there a way to do this? Or should I use some other designs to avoid this problem?</p>