本文介绍了GCC二进制文字和C ++ 14之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

C ++ 14似乎正在和编译器已尝试实施这一新版本的核心功能。我有一个看看,发现一些关于二进制文字部分:GCC实现它们但似乎使GNU二进制文本和C ++ 14二进制文本之间的区别。下面是两个各自引用:

C++14 seems to be coming and compilers are already trying to implement the core features of this new revision. I was having a look at GCC support for these core features and noticed something about the binary literals part: GCC implements them but seems to make a difference between GNU binary literals and C++14 binary literals. Here are the respective references for both:




  • GNU binary literals
  • C++1y binary literals

我试图找到两者之间的一些差异他们因为GCC似乎有所区别,但是找不到任何东西。 ?是否有你更了解可能的不兼容性

I tried to find some differences between the two of them since GCC seems to make the difference, but could not find anything. Does any of you know more about possible incompatibilities?

推荐答案

从的的,唯一的区别是,GCC现在接受二进制文字作为一种语言特性,如果指定了C ++ 1y支持,则不会警告它们是gcc扩展。 。还有就是要实际执行没有变化。

From the commit diff which introduced support in gcc 4.9, the only difference is that gcc now accepts binary literals as a language feature of C++1y, and doesn't warn that they're a gcc extension if C++1y support is specified. There is no change to the actual implementation.

此前:

warning : binary constants are a GCC extension

现在,除非 -std = c ++ 1y

warning : binary constants are a C..1y feature or GCC extension

这篇关于GCC二进制文字和C ++ 14之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:43