title: Alternative to using namespace as template parameter
body: <p>I know I cannot use a namespace as a template parameter. However, I'm trying to achieve behavior similar to this:</p>
  
  <pre><code>template &lt;typename T&gt;
  void foo(T::X* x)
  {
      T::bar(x);
  }
  </code></pre>
  
  <p>Except T is a namespace rather than a struct or a class. What is the best way to achieve the most similar result to what I am expecting?</p>