Fix gcc compilation error.

QUICHE fails to compile with gcc with the following error message:

quic/core/quic_crypto_stream.cc: In constructor 'QuicCryptoStream::QuicCryptoStream(QuicSession*)':
quic/core/quic_crypto_stream.cc:39:52: error: use of deleted function 'QuicCryptoStream::CryptoSubstream::CryptoSubstream(QuicCryptoStream::CryptoSubstream&&)'
                   {this, ENCRYPTION_FORWARD_SECURE}} {
                                                    ^
In file included from quic/core/quic_crypto_stream.cc:5:
quic/core/quic_crypto_stream.h:158:30: note: 'QuicCryptoStream::CryptoSubstream::CryptoSubstream(QuicCryptoStream::CryptoSubstream&&)' is implicitly deleted because the default definition would be ill-formed:
   struct QUIC_EXPORT_PRIVATE CryptoSubstream {
                              ^~~~~~~~~~~~~~~
quic/core/quic_crypto_stream.h:158:30: error: use of deleted function 'QuicStreamSendBuffer::QuicStreamSendBuffer(QuicStreamSendBuffer&&)'
In file included from quic/core/quic_stream.h:27,
                 from quic/core/quic_crypto_stream.h:15,
                 from quic/core/quic_crypto_stream.cc:5:
quic/core/quic_stream_send_buffer.h:65:3: note: declared here
   QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete;
   ^~~~~~~~~~~~~~~~~~~~

This CL changes QuicCryptoStrem::substreams_ type from array to std::array, and
uses aggregate initialization instead of initializer list as required for
std::array.  See also
https://stackoverflow.com/questions/8192185/using-stdarray-with-initialization-lists

I manually confirmed that this compiles in Chromium using clang, and compiles in
Envoy using either gcc or clang.  I have no idea why.

gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 284051434
Change-Id: I936020d8847e8109e73b9ffe1493ca1b74e159dc
2 files changed
tree: b69c9d3adfdb58aafc5df7ecbb6bea394a4da895
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.