Commit 40d61f3f authored by Brandon Schlinker's avatar Brandon Schlinker Committed by Facebook GitHub Bot

Use is_pod, add <system_error> include for TcpInfo

Summary:
- `std::is_pod_v` is only available in C++17, shifting to `std::is_pod`
- `std::errc` needs the `system_error` header; missing header wasn't causing an error on most platforms because it is included indirectly

Differential Revision: D29355681

fbshipit-source-id: e035c3f4ffac9d2c6f0d8ec511f7e0ea8544ba80
parent c634f9c3
......@@ -17,6 +17,7 @@
#pragma once
#include <chrono>
#include <system_error>
#include <folly/Expected.h>
#include <folly/Optional.h>
......@@ -229,7 +230,7 @@ struct TcpInfo {
*/
template <typename T1, typename T2>
static size_t constexpr getFieldOffset(T1 T2::*field) {
static_assert(std::is_pod_v<T1>);
static_assert(std::is_pod<T1>());
constexpr T2 dummy{};
return size_t(&(dummy.*field)) - size_t(&dummy);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment