当前位置:网站首页>static_assert报错为什么?
static_assert报错为什么?
2022-08-09 09:20:00 【y_dd】
mac os静态编译报错,下面报错:
static_assert(offsetof(sockaddr_in, sin_family) == 0, “sin_family offset 0”);
static_assert(offsetof(sockaddr_in6, sin6_family) == 0, “sin6_family offset 0”);
其中两个定义如下:
struct sockaddr_in {
__uint8_t sin_len;
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
struct sockaddr_in6 {
__uint8_t sin6_len; /* length of this struct(sa_family_t) /
sa_family_t sin6_family; / AF_INET6 (sa_family_t) /
in_port_t sin6_port; / Transport layer port # (in_port_t) /
__uint32_t sin6_flowinfo; / IP6 flow information /
struct in6_addr sin6_addr; / IP6 address /
__uint32_t sin6_scope_id; / scope zone index */
};
边栏推荐
- 初窥门径代码起手,Go lang1.18入门精炼教程,由白丁入鸿儒,首次运行golang程序EP01
- QT sets the icon of the exe executable
- 使用图新地球无法加载谷歌地球的完美解决方法(附软件下载)
- MySQL查漏补缺(五)不熟悉的知识点
- MySQL Leak Detection and Filling (2) Sorting and Retrieval, Filtering Data, Fuzzy Query, Regular Expression
- 上帝视角看高清村庄卫星地图,附下载高清卫星地图最新方法
- What does the test plan include?What is the purpose and meaning?
- 本体开发日记05-努力理解SWRL(Built-Ins)
- 本体开发日记01-Jena配置环境变量
- swap交换分区
猜你喜欢
JMeter参数化4种实现方式
全网最全的软件测试基础知识整理(新手入门必学)
接口测试主要测试哪方面?需要哪些技能?要怎么学习?
How much do you know about the mobile APP testing process specifications and methods?
MySQL event_single event_timed loop event
营养与健康(HIT2021秋)
功能自动化测试实施的原则以及方法有哪些?
软件测试外包公司怎么样?有什么好处和坏处?为什么没人去?
“摄像头用不了”+win8.1+DELL+外置摄像头+USB免驱的解决办法
web测试之功能测试常用的方法有哪几种?有什么要点要注意?
随机推荐
Do you know the basic process and use case design method of interface testing?
测试计划包括哪些内容?目的和意义是什么?
网络安全入门基础:IP地址
功能自动化测试实施的原则以及方法有哪些?
MySQL索引
接口测试主要测试哪方面?需要哪些技能?要怎么学习?
接口测试的概念、目的、流程、测试方法有哪些?
Ontology Development Diary 01-Jena Configuration Environment Variables
约瑟夫问题的学习心得
QT sets the icon of the exe executable
[Environmental Construction] tensorrt
MySQL transaction isolation
手机APP测试流程规范和方法你知道多少?
软件测试流程包括哪些内容?测试方法有哪些?
本体开发日记05-努力理解SWRL(Usage Suggestions)
MySQL事务隔离
mysql优化——show processlist命令详解
二叉树的遍历(非递归)
MySQL Leak Check (4) Stored Procedures and Cursors
多维度LSTM(长短期记忆)神经网络预测未来存款余额走势