title: Naming tuple elements
body: <p>I am developping a some kind of tuple structure, and I would like to allow the user to use its elements as fields,</p>
  
  <p><strong>EXPLAINING :</strong> </p>
  
  <p>this is my tuple :</p>
  
  <pre><code>template&lt;typename ...Ts&gt;
  struct myTuple{
     std::tuple&lt;Ts...&gt; data;
  
     template&lt;size_t I&gt;
     inline type&lt;I&gt;&amp; get_t() {   // type&lt;I&gt; is the I'th type
        return std::get&lt;I&gt;(data);
     }
  
     // Other stuff
  };
  </code></pre>
  
  <p>For the moment the user can have it this way :</p>
  
  <pre><code>struct UserStruct{
     myTuple&lt;int,bool,string&gt; t;
     // Other stuff
  }
  </code></pre>
  
  <p>and use it like, </p>
  
  <pre><code>UserStruct ob;
  ob.t.get_t&lt;0&gt;() = 0;
  </code></pre>
  
  <p>Which is a little bit complex... So i made it this way</p>
  
  <pre><code>struct UserStruct{
     myTuple&lt;int,bool,string&gt; t;
  
     decltype(mo.get_t&lt;0&gt;()) myInt() {
        return mo.get_t&lt;0&gt;();
     }
  
     decltype(t.get_t&lt;1&gt;()) myChar() {
        return t.get_t&lt;1&gt;();
     }
  
     decltype(t.get_t&lt;2&gt;()) myString() {
        return t.get_t&lt;2&gt;();
     }
  };
  </code></pre>
  
  <p>so he can use it directly : myInt() = 0;</p>
  
  <p><strong>My goal is that he could use the tuple as if he had an <code>int, bool, string</code> data members</strong> without storing the references, which means I need a function ( or a functor ) to get the reference, so my solution is good, but it needs the user to define the functions. (And the getter looks much worse in the real code)</p>
  
  <p>So I would like something like this :</p>
  
  <pre><code>struct UserStruct{
     myTuple&lt;int,bool,string&gt; t;
  
     MyFunctor&lt;0&gt; myInt;   //or an alias to a function
  
     MyFunctor&lt;1&gt; myChar;
  
     MyFunctor&lt;2&gt; myString;
  };
  </code></pre>