title: C++ Tuple vs Struct
body: <p>Is there is any difference between using a <code>std::tuple</code> and a data-only <code>struct</code>?</p>
  
  <pre><code>typedef std::tuple&lt;int, double, bool&gt; foo_t;
  
  struct bar_t {
      int id;
      double value;
      bool dirty;
  }
  </code></pre>
  
  <p>From what I have found online, I found that there are two major differences: the <code>struct</code> is more readable, while the <code>tuple</code> has many generic functions that can be used.
  Should there be any significant performance difference?
  Also, is the data layout compatible with each other (interchangeably casted)?</p>