blob: 97202cd0afd5b7241ba43b61cc1c412742aa9086 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef QUICHE_QUIC_PLATFORM_API_QUIC_IOVEC_H_
6#define QUICHE_QUIC_PLATFORM_API_QUIC_IOVEC_H_
7
8#include <cstddef>
9#include <type_traits>
10
11#include "net/quic/platform/impl/quic_iovec_impl.h"
12
13namespace quic {
14
15// The impl header has to export struct iovec, or a POSIX-compatible polyfill.
16// Below, we mostly assert that what we have is appropriate.
17static_assert(std::is_standard_layout<struct iovec>::value,
18 "iovec has to be a standard-layout struct");
19
20static_assert(offsetof(struct iovec, iov_base) < sizeof(struct iovec),
21 "iovec has to have iov_base");
22static_assert(offsetof(struct iovec, iov_len) < sizeof(struct iovec),
23 "iovec has to have iov_len");
24
25} // namespace quic
26
27#endif // QUICHE_QUIC_PLATFORM_API_QUIC_IOVEC_H_