zoukankan      html  css  js  c++  java
  • MSVC 12: compiler error in boost/type_traits/common_type.hpp

    来自: https://svn.boost.org/trac10/ticket/11885

    MSVC 12: compiler error in boost/type_traits/common_type.hpp(42)

    Reported by: sk.aquileia@… Owned by: John Maddock
    Milestone:   Component: type_traits
    Version: Boost 1.60.0 Severity: Problem
    Keywords:   Cc:  

    Description 

    Visual Studio 2013 fails to build Boost 1.60, whereas 1.58 is built correctly. When built with Visual Studio 2008, 1.60 doesn't show this issue.

    Command line:

    .2 --with-thread --toolset=msvc-12.0
    

    error:

    .oost/type_traits/common_type.hpp(42) : fatal error C1001: Interner Compilerfehler.
    (Compilerdatei 'msc1.cpp', Zeile 1325)
    

    This regression was likely introduced in commit Make common_type SFINAE-friendly, add tests
    ​https://github.com/boostorg/type_traits/commit/9fd4ee06b2



    full error message for one of the files:

    compile-c-c++ bin.v2libschronouildmsvc-12.0debuglink-static	hreading-multichrono.obj
    chrono.cpp
    C:GitHubexternal\_liboost_1_60_0oost/type_traits/common_type.hpp(42) : fatal error C1001: Interner Compilerfehler.
    (Compilerdatei 'msc1.cpp', Zeile 1325)
     Vereinfachen oder ändern Sie das Programm im Umfeld der oben aufgeführten Positionen. Wählen Sie im Menü "Hilfe" von Visual C++ den Befehl "Technischer Support", oder öffnen Sie die Hilfedatei des technischen Supports, um weitere Informationen zu erhalten.
    Interner Compilerfehler in C:Program Files (x86)Microsoft Visual Studio 12.0VCBINcl.exe. Sie werden aufgefordert, später einen Fehlerbericht an Microsoft zu senden.
    
        call "C:UsersSEBAST~2AppDataLocalTemp2_msvc_12.0_vcvarsall_x86.cmd" > nul
    cl /Zm800 -nologo @"bin.v2libschronouildmsvc-12.0debuglink-static	hreading-multichrono.obj.rsp"
    
    ...failed compile-c-c++ bin.v2libschronouildmsvc-12.0debuglink-static	hreading-multichrono.obj...
    
       
       

    Change History (6)

    comment:1Changed 2 years ago by John Maddock

    I'm unable to reproduce: the tests for both chrono and type_traits all build OK for me (other than some unrelated and expected type_traits failures) with msvc-10,11,12 and 14 and both Git develop and 1.60 release. This is with fully up to date / patched versions of Visual Studio though: is it possible your vc12 install is not patched with the latest updates?

    comment:2Changed 2 years ago by sk.aquileia@…

    Milestone: To Be Determined

    It was indeed fixed by Update 5, sorry that I didn't check for patches before reporting it - I had just assumed Microsoft wouldn't publish major patches 2 years after release.

    comment:3Changed 2 years ago by John Maddock

    Resolution: → worksforme
    Status: new → closed

    comment:4Changed 2 years ago by anonymous

    I hit the same issue with boost-1.60; I'm on "Update 3 of Visual Studio 2013 for Windows Desktop". As I had boost-1.55 downloaded, and didn't need the latest version, I've switched to using that, and the problem has gone away.

    comment:5Changed 2 years ago by anonymous

    the same problem and couldn't fixed unless switched to old versionso sad

    comment:6Changed 2 years ago by anonymous

    Don't you guys ever run Microsoft update? Seriously, update your VC12 install to update 5 and the issue goes away.

    [注]

    我用的是boost_1_67_0_b1_rc2, 也遇到了同样的编译错误,根据这篇文章的说法, 到这个网址上:

    https://support.microsoft.com/en-us/help/2994375/description-of-visual-studio-2013-update-4

    点击Download the latest Visual Studio 2013 update package now这个链接.

    点进去后发现网页已经不存在了,于是搜了半天,只找到了一个Update4的下载页面, 

    https://www.microsoft.com/en-us/download/details.aspx?id=45326

    下载了Update4, 先用着看看吧. 

    [更新]

    我下载了VS2013 Update 4,总是装不上,也找不到VS2013 Update5. 

    后来搜到了这篇文章:http://www.libsdl.cn/bbs/forum.php?mod=viewthread&tid=3

    于是在项目上定义BOOST_NO_CXX11_VARIADIC_TEMPLATES这个宏. 再次编译,就通过了.

  • 相关阅读:
    go 语言之fmt.Sprintf格式化使用
    golang 中string和int类型相互转换
    GO 获取时间的日期函数、时间戳函数
    go 字符串切割方法小结
    php获取中英文字符串字符长度mb_strlen,字节长度strlen
    linux 之 grep 命令
    linux 无界面环境安装chrome,chromedriver,selenium
    kafka 常用命令总结
    linux中系统中 /bin、/sbin、/usr/bin、/usr/sbin、/usr/local/bin、/usr/local/sbin 目录的含义及区别
    3306端口被占用导致MySQL无法启动
  • 原文地址:https://www.cnblogs.com/time-is-life/p/9143968.html
Copyright © 2011-2022 走看看