主要几个发行版的 gcc 对 c++ 新标准的支持情况区别

纯自用总结,无任何技术含量,
结论是,基本没区别。。。。
 
目前常用的系统:
debian系的
与centOS7对应的 ubuntu14.04LTS
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
 
最新的16.04LTS
g++ (Ubuntu 5.3.1-10ubuntu2) 5.3.1 20160225
 
---------------------------------------------------
查看redhat系列的版本:
cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
 
公司使用centOS6.3 的:
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
太老了,逐步迁移出来ing,不看也罢。
 
 
公司使用centOS7.1 的:
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
未来几年内主要使用的生产平台
 
 
-----------------------------------------------------
g++从4.8开始支持--std=c++11 (c++1x = c++11,1y=14,1Z=17)
 
14.04 4.8.4
cent7 4.8.5
      4.8.0 thread_local
            [[noreturn]] void f(); 属性器语法
            alignas(double) int i; alignment specifier
            inheriting constructors:
                struct A { A(int); };
                struct B: A { using A::A; }; // defines B::B(int)
                B b(42); // OK
 
      4.8.1 decltype ref-qualifiers
      
      
      4.9   ISO C11 : _Atomic <stdatomic.h> _Generic _Thread_local __auto_type
            C++1y   :decltype(auto)
                      [[deprecated]]
                      lambda capture initializers 
                          [x = 42]{ ... };
                      digit separators
                      generic (polymorphic) lambdas.
            libstdc++:std::make_unique
 
16.04 5.3.1 ISO C11 : default mode for C is now -std=gnu11 instead of -std=gnu89
            c++14   : variable templates
                      extended constexpr
 
g++5最重要的:
A new implementation of std::string is enabled by default, using the small string optimization instead of copy-on-write reference counting.
A new implementation of std::list is enabled by default, with an O(1) size() function;
难以置信list坚持不缓存size,直到5.0版本。。。。。
 
Full support for C++11, including the following new features:
 
    std::deque and std::vector<bool> meet the allocator-aware container requirements;
    movable and swappable iostream classes;
    support for std::align and std::aligned_union;
    type traits std::is_trivially_copyable, std::is_trivially_constructible, std::is_trivially_assignable etc.;
    I/O manipulators std::put_time, std::get_time, std::hexfloat and std::defaultfloat;
    generic locale-aware std::isblank;
    locale facets for Unicode conversion;
    atomic operations for std::shared_ptr;
    std::notify_all_at_thread_exit() and functions for making futures ready at thread exit.
 

转载于:https://www.cnblogs.com/wardenlym/p/5341392.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值