title: Can I template the type of a template value parameter?
body: <p>Suppose I want to create a struct that converts the value of an enum to a meta int, such as <code>boost::mpl::int_</code>. I could do something like this:</p>
  
  <pre><code>template &lt;typename Enum, Enum value&gt;
  struct Convert
  {
    using type = boost::mpl::int_&lt;static_cast&lt;int&gt;(value)&gt;;
  };
  </code></pre>
  
  <p>This would work fine, but to call it I'd have to write <code>Convert&lt;Enum, Enum::VALUE&gt;::type</code>. Is it possible to write a class so I simply have to write <code>Convert&lt;Enum::VALUE&gt;::type</code> to have <code>Convert</code> <em>deduce</em> the type of <code>Enum</code>?</p>
  
  <p>I don't know the type of <code>Enum</code>, so <code>Convert</code> should be able to take <em>any</em> enum. I'd like to avoid macros.</p>