error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align >
报的完整错误为:
error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)).
Before VS 2017 15.8, the member type would non-conformingly have an alignment of only alignof(max_align_t).
VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (*only* for uses of
aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this
message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and
get the old non-conformant behavior.
大概意思就是:VS2017 15.8版本修复了老版本有关对齐存储部分缺陷,但修复本身也有缺陷。如果不想编译时报这个问题,就在预编译时定义一个宏 _ENABLE_EXTENDED_ALIGNED_STORAGE 或者 _DISABLE_EXTENDED_ALIGNED_STORAGE(博主的理解是按照修复后的逻辑处理就定义带enable那个,按照老版本的逻辑处理就定义带disable那个)
参考解决方法:
打开 项目属性页 -- > C/C++ --> Preprocessor --> Preprocessor Definitions
里面添加,_DISABLE_EXTENDED_ALIGNED_STORAGE
即可。
参考文章
error C2338: You've instantiated std::aligned_storage《Len, Align》 with an extended alignment.(讨论)
error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align >的更多相关文章
- error C2039: “bind2nd”: 不是“std”的成员
VS2012 出现如下错误: error C2039: "bind2nd": 不是"std"的成员 头文件中加上 #include <functi ...
- 编译时错误之 error C2338: tuple_element index out of bounds
part 1 编译器 vs2015 VC++. 完整的错误信息粘贴如下: d:\program files (x86)\microsoft visual studio 14.0\vc\include\ ...
- C++ error C2440: “类型转换” : 无法从“std::vector::iterator”转换为“
原文地址:http://blog.csdn.net/onlyou930/article/details/5602654 圆环套圆环之迭代器 话说这一日是风平浪静,万里乌云,俺的心情好的没得说,收到命令 ...
- g++: error: unrecognized command line option ‘-std=C++11’
一个小程序,在编译的时候出错,原来使用的编译命令是 g++ -std=C++11 array.cpp -o array.exe g++: error: unrecognized command lin ...
- error: unrecognized command line option "-std=c11" 解决办法
今天在安装php版本 grpc扩展的时候报错如下: cc1: error: unrecognized command line option "-std=c11" cc1: war ...
- Qt5.编译错误.error: C2338: The slot requires more arguments than the signal provides.
1.Qt563x86vs2015,遇到如下 编译错误: error: C2338: The slot requires more arguments than the signal provides. ...
- atlcomcli.h(1756): error C2338: CVarTypeInfo< char > cannot be compiled with /J or _CHAR_UNSIGNED fl
我拿到一个VS的工程,用VS2010 编译 时提示: atlcomcli.h(1756): error C2338: CVarTypeInfo< char > cannot be comp ...
- 进行编译时提示'error: unrecognized command line option "-std=gnu11"'如何处理?
答: 说明编译器不支持此选项,那么在Makefile中替换此选项-std=gnu11 替换成-std=gnu99或-std=c99或-std=c11等,主要看编译器都支持哪些编译选项,笔者的支持-st ...
- error C2338: No Q_OBJECT in the class with the signal (NodeCreator.cpp)
在Qt中,当派生类需要用到信号与槽机制时,有两个要求. 1.该类派生自QObject类. 2.类中有Q_OBJECT宏. 本次报错的原因就是因为没有在类中添加Q_OBJECT宏. 而我的出错原因更傻逼 ...
随机推荐
- ICEM-R-b
原视频下载地址:https://pan.baidu.com/s/1i4JGk8d ;密码: 4xr2
- 使用建造者模式和Lombok简化代码
在项目开发中,我们经常需要构建对象.常见的做法有getter/setter,或者构造器构建对象. 可能会有人写出类似如下的代码: Company company=new Company(); comp ...
- Python3爬取王者官方网站英雄数据
爬取王者官方网站英雄数据 众所周知,王者荣耀已经成为众多人们喜爱的一款休闲娱乐手游,今天就利用python3 爬虫技术爬取官方网站上的几十个英雄的资料,包括官方给出的人物定位,英雄名称,技能名称,CD ...
- `ll/sc` 指令在`linux`中的软件实现
load-link与store-conditional (LL/SC)是一对用于并发同步访问内存的CPU指令.Load-link返回内存位置处的当前值,随后的store-conditional在该内存 ...
- 如何在IDEA上配置Maven
IDEA 全称 IntelliJ IDEA,是java语言开发的集成环境,IntelliJ在业界被公认为最好的Java开发工具之一, IDEA是JetBrains公司的产品,现在有逐步取代老牌Java ...
- C#构建可扩展的应用程序(插件)
构建可扩展的应用程序,特别是对于WinForm应用程序是特别有好处的.我们知道,企业的需求是瞬息万变的,企业在使用软件的过程中,很可能对于现有的需求有变动甚至是提出新的需求来,可是我们的软件已经部署在 ...
- Unity3D获取Android平台的电量
刚开始的时候以为这个应该不简单.我也开始百度,寻找获取手机的电量的方法.大概有俩种方式:一种是直接访问一个文件,意思是说Android手机的电量等信息保存到了这个文件中.但是我试验的时候没有访问出来, ...
- 【转】史上最强Tomcat8性能优化
https://blog.csdn.net/ThinkWon/article/details/102744033 文章目录授人以鱼不如授人以渔目的服务器资源Tomcat配置优化Linux环境安装运行T ...
- Nodejs介绍和环境搭建
Nodejs是JavaScript的运行环境,它让 Java Script 可以开发后端程序,实现几乎其他后端 Node.js 是一个 Javascript 运行环境(runtime) 可以与 PHP ...
- latex怎样生成table字样和caption换行的表格
\begin{table} \caption{\newline The results of running algorithm parallel using MapReduce.} \hline ...