报的完整错误为:

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. Spark安装(standalone)

    文档:http://spark.apache.org/docs/latest/spark-standalone.html 安装scalahttps://www.scala-lang.org/downl ...

  2. uniapp - 键盘弹起背景图片不会被挤压

    [释义] uni.getSystemInfoSync()获取屏幕可用高度windowScreen做为背景图高度即可(非虚拟DOM也可以使用本思路). [源码] <template> < ...

  3. sql查询最近7天数据(以年-月-日结果展示)

    sql代码如下: , 查询结果如下:

  4. 工具系列 | VScode VS Live Share 实时编码分享(和你的小伙伴一起写代码吧)

    Visual Studio Live Share能干啥? 分享任何语言,任何应用程序 无论您正在构建什么类型的应用程序,您正在编写什么语言,或者您的操作系统如何:在您需要协作时,Live Share会 ...

  5. Nginx配置简单基于域名的虚拟主机

    首先修改hosts文件,让浏览器在看到a.com或是www.a.com的网址时知道上哪里去找: # Copyright (c) 1993-2009 Microsoft Corp. # # This i ...

  6. java图片处理(加水印、生成缩略图)等之Thumbnailator库

    Thumbnailator 是一个为Java界面更流畅的缩略图生成库.从API提供现有的图像文件和图像对象的缩略图中简化了缩略过程,两三行代码就能够从现有图片生成缩略图,且允许微调缩略图生成,同时保持 ...

  7. Python3教程—很经典可以快速上手

    原文地址:https://www.runoob.com/python3/python3-tutorial.html Python 3 教程 Python 的 3.0 版本,常被称为 Python 30 ...

  8. centos安装redis 5.0版本的集群

    我在本地VM-Centos里安装5.0.5时安装遇到了些问题,参考了Blog:https://www.cnblogs.com/shawhe/p/9548620.html 顺利安装完成. 安装redis ...

  9. 【视频开发】ffmpeg实现dxva2硬件加速

    这几天在做dxva2硬件加速,找不到什么资料,翻译了一下微软的两篇相关文档.这是第二篇,记录用ffmpeg实现dxva2. 第一篇翻译的Direct3D device manager,链接:http: ...

  10. C/C++ 面试-面向对象的特性

    面向对象的三大特性 此文只是简单介绍一下三大特性   详细介绍在: 封装:http://www.cnblogs.com/52why/p/7631381.html 继承:http://www.cnblo ...