title: C++ how to generate all the permutations of function overloads?
body: <p>Lets say I have classes <code>Date</code> and classes <code>Year</code>, <code>Month</code> and <code>Day</code>.</p>
  
  <pre><code>struct Date {
    Date(Year year, Month month, Day day) : d(day), m(month), y(year) {};
    Date(Month month, Day day, Year year) : d(day), m(month), y(year) {};
    Date(Day day, Month month, Year year) : d(day), m(month), y(year) {};
    Date(Day day, Year year, Month month) : d(day), m(month), y(year) {};
    ...
    ...
  
    private:
      Day d;
      Month m;
      Year y;
  }
  </code></pre>
  
  <p>This allows me not to have a specific layout of arguments for <code>Date</code> as I have a lot of overloadings.</p>
  
  <p><strong>Am I able to generate all the permutations/overloadings automatically?</strong></p>
  
  <p>Just to be clear:</p>
  
  <ul>
  <li>Permutations are only of argument layout, nothing about them should
  change as I know that would not be possible to automate.</li>
  <li>All the generated overloadings should have the same code as only the
  layout of arguments changes not the logic itself.</li>
  </ul>