title: Applying a boost::mpl::list to the template parameter of a type
body: <p>I have a class that requires a boost::variant containing shared pointers to various types as follows:</p>
  
  <pre><code>template &lt;typename ToySharedPtrVariant, typename ColorSharedPtrVariant&gt;
  class ToyPicker {
     typedef std::pair&lt;
       ToySharedPtrVariant, 
       ColorSharedPtrVariant 
     &gt; toyAndColorPair;
     typedef std::map&lt;
       std::string,
       std::vector&lt; 
         toyAndColoPair 
       &gt; 
     &gt; stringToToyColorPairMap;
  
     // ... methods that use the defined types...
  }
  </code></pre>
  
  <p>This class currently requires template parameters of the following form to compile:</p>
  
  <pre><code>ToyPicker&lt;
             boost::variant&lt;
               boost::shared_ptr&lt;ToyModel&gt; 
             &gt;,
             boost::variant&lt;
               boost::shared_ptr&lt;BlueToy&gt;,
               boost::shared_ptr&lt;RedToy&gt;,
               boost::shared_ptr&lt;GreenToy&gt; 
             &gt; 
           &gt; toyPicker;
  </code></pre>
  
  <p>How do I use an mpl list so that I can allow the following much simpler definition for users, then convert it into the example format above inside my class implementation?</p>
  
  <pre><code>ToyPicker&lt;
         boost::mpl::list&lt;
           ToyModel
         &gt;,
         boost::mpl::list&lt;
           BlueToy,
           RedToy,
           GreenToy 
         &gt; 
       &gt; toyPicker;
  </code></pre>