报的完整错误为:

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. 使用 Spring Cloud Sleuth、Elastic Stack 和 Zipkin 做微服务监控

    关于迁移微服务架构,最常被提及的挑战莫过于监控.每个微服务应独立于其他服务的运行环境,所以他们之间不会共享如数据源.日志文件等资源. 然而,较容易的查看服务的调用历史,并且能够查看多个微服务的请求传播 ...

  2. docker 安装redis cluster集群

    安装Redis镜像 docker pull yyyyttttwwww/redis 创建redis容器 docker run -it -d --name r1 -p 5001:6379 --net=ne ...

  3. spring4.x企业应用开发读书笔记1

    第一章 概述 1 spring 以 ioc 和 aop 为内核,提供了展现层 springMVC.持久层SpringJDBC及业务层事务管理等一站式企业级应用技术. 2spring的特性 方便解耦,简 ...

  4. PLSQL Developer连接远程oracle配置(详细解读)

    转自:https://blog.csdn.net/zhige_j/article/details/80832654 一.安装Instant Client 1. 下载Instant Client(轻量级 ...

  5. EF6中的SQL监控

    在MVC或WEBAPI中的监控 System.Action<string> action = (string message) => { Debug.WriteLine(messag ...

  6. odoo开发笔记--ValueError Expected singleton

    异常处理参考:https://stackoverflow.com/questions/31070640/valueerror-expected-singleton-odoo8 报错: ValueErr ...

  7. 学习使用Lombok生成代码

    一.介绍 Lombok官网:https://projectlombok.org/ Lombok的功能简单一点说,就是可以帮我们生成一些代码,这些代码并不是在源码(source code)体现出来的,而 ...

  8. django项目mysite 2

    一.表单form 为了接收用户的投票选择,我们需要在前端页面显示一个投票界面 polls/detail.html <h1>{{ question.question_text }}</ ...

  9. [LeetCode] 687. Longest Univalue Path 最长唯一值路径

    Given a binary tree, find the length of the longest path where each node in the path has the same va ...

  10. Jenkins - 参数化构建

    1 - 设置 根据输入的参数来执行不同的构建过程. 参数TIME作为环境变量,可以被引用. 项目的首页会出现" Build with Parameters"功能链接,没有了&quo ...