报的完整错误为:

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 >的更多相关文章

  1. error C2039: “bind2nd”: 不是“std”的成员

    VS2012 出现如下错误: error C2039: "bind2nd": 不是"std"的成员     头文件中加上 #include <functi ...

  2. 编译时错误之 error C2338: tuple_element index out of bounds

    part 1 编译器 vs2015 VC++. 完整的错误信息粘贴如下: d:\program files (x86)\microsoft visual studio 14.0\vc\include\ ...

  3. C++ error C2440: “类型转换” : 无法从“std::vector::iterator”转换为“

    原文地址:http://blog.csdn.net/onlyou930/article/details/5602654 圆环套圆环之迭代器 话说这一日是风平浪静,万里乌云,俺的心情好的没得说,收到命令 ...

  4. g++: error: unrecognized command line option ‘-std=C++11’

    一个小程序,在编译的时候出错,原来使用的编译命令是 g++ -std=C++11 array.cpp -o array.exe g++: error: unrecognized command lin ...

  5. error: unrecognized command line option "-std=c11" 解决办法

    今天在安装php版本 grpc扩展的时候报错如下: cc1: error: unrecognized command line option "-std=c11" cc1: war ...

  6. 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. ...

  7. 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 ...

  8. 进行编译时提示'error: unrecognized command line option "-std=gnu11"'如何处理?

    答: 说明编译器不支持此选项,那么在Makefile中替换此选项-std=gnu11 替换成-std=gnu99或-std=c99或-std=c11等,主要看编译器都支持哪些编译选项,笔者的支持-st ...

  9. error C2338: No Q_OBJECT in the class with the signal (NodeCreator.cpp)

    在Qt中,当派生类需要用到信号与槽机制时,有两个要求. 1.该类派生自QObject类. 2.类中有Q_OBJECT宏. 本次报错的原因就是因为没有在类中添加Q_OBJECT宏. 而我的出错原因更傻逼 ...

随机推荐

  1. 安装docker (centos7.6)

    Docker 更新yum包 sudo yum update 卸载旧版本sudo yum remove docker docker-common docker-selinux docker-engine ...

  2. 范仁义html+css课程---3、图片和超链接

    范仁义html+css课程---3.图片和超链接 一.总结 一句话总结: img标签是图片标签,定义 HTML 页面中的图像 a标签是超链接标签,用于从一个页面链接到另一个页面. 1.img标签要点? ...

  3. vue 创建监听,和销毁监听(addEventListener, removeEventListener)

    最近在做一个有关监听scroll的功能, 发现我添加监听之后一直不起作用: 1 2 mounted() {     window.addEventListener("scroll" ...

  4. 还在用难用的AssetBundle?快来运用Unity新的可寻址资源系统,助力游戏开发

    Unity Addressables可寻址资源系统是一个强大的Unity资源包,它能够帮助解决游戏开发中最重要的一些挑战:高效率和轻松的内容管理. 在管理游戏资源时,往往很难维持好的标准,从而避免让项 ...

  5. MySQL中的比较操作符<=>

    对于=操作符,两个值被比较,结果是0(不相等)或者1(相等). 比较操作符<=>表示NULL安全的等价.这个比较操作符执行等价比较,和=操作符类似,但是如果两个操作数都是NULL,会返回1 ...

  6. <img>的title和Alt有什么区别?

    Alt是<img>的特有属性,是图片内容的等价描述,用于图片无法加载时显示,读屏器阅读图片. title 可提高图片高可访问性,除了纯装饰图片外都必须设置有意义的值,搜索引擎会重点分析.鼠 ...

  7. SD-WAN基础---SD-WAN简单了解

    一:推文(摘录.转载自) 关于SD-WAN,你不得不了解的10个常识 那些让人怦然心动的SD-WAN功能(上) 那些让人怦然心动的SD-WAN功能(中) 二:SD-WAN是什么 SD-WAN,即软件定 ...

  8. LeetCode 704. 二分查找(Binary Search)

    704. 二分查找 704. Binary Search 题目描述 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target,写一个函数搜索 nums 中的 target,如果 ...

  9. 基于卷积神经网络的人脸识别项目_使用Tensorflow-gpu+dilib+sklearn

    https://www.cnblogs.com/31415926535x/p/11001669.html 基于卷积神经网络的人脸识别项目_使用Tensorflow-gpu+dilib+sklearn ...

  10. Django重新添加字段然后迁移给定默认值依然迁移不生效

    1.将对应app下的migrations文件夹下面的除了__init__.py文件外全部删除 2.delete from django_migrations where app='当前模型的app名称 ...