title: Alias to a double array from another byte array
body: <p>I am trying to create an alias to a double array from an array of bytes. But it happens to be behaving differently than I have expected.
  The array of bytes stores - sensor code (int) followed by location data (double[3]). This is what I have tried</p>
  <pre><code>std::byte mSensorData[sizeof(int32_t) + 3 * sizeof(double)];
  int32_t&amp;  mSensorCode   = *((int32_t*)     &amp;mSensorData);
  double (&amp; mLocation)[3] = *((double (*)[3])&amp;mSensorData + sizeof(int32_t));
  
  /* some code, byte* gpsData contains location data */
  memcpy(mLocation, gpsData, sizeof(mLocation));
  
  DEBUG(std::cout&lt;&lt;mSensorCode  &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;mLocation[0] &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;mLocation[1] &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;mLocation[2] &lt;&lt;std::endl;)
  
  DEBUG(std::cout&lt;&lt;*((int*)&amp;mSensorData[0])     &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;*((double*)&amp;mSensorData[4])  &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;*((double*)&amp;mSensorData[12]) &lt;&lt;std::endl;)
  DEBUG(std::cout&lt;&lt;*((double*)&amp;mSensorData[20]) &lt;&lt;std::endl;)
  </code></pre>
  <p>Result I got:</p>
  <pre><code>120
  37.422
  -122.084
  16.6551
  120
  0
  0
  0
  </code></pre>