title: How can I emulate destructuring in C++?
body: <p>In JavaScript ES6, there is a language feature known as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">destructuring</a>. It exists across many other languages as well.</p>
  
  <p>In JavaScript ES6, it looks like this:</p>
  
  <pre><code>var animal = {
      species: 'dog',
      weight: 23,
      sound: 'woof'
  }
  
  //Destructuring
  var {species, sound} = animal
  
  //The dog says woof!
  console.log('The ' + species + ' says ' + sound + '!')
  </code></pre>
  
  <p>What can I do in C++ to get a similar syntax and emulate this kind of functionality?</p>