是C ++ 14添加新的关键字到C ++? [英] Is C++14 adding new keywords to C++?
本文介绍了是C ++ 14添加新的关键字到C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
C ++标准委员会倾向于不向该语言添加新关键字,但是使用C ++ 11不是这样。一些示例:
The C++ Standards Committee tends to shy away from adding new keywords to the language, yet with C++11 that was not the case. Some examples:
constexpr
decltype
thread_local
auto // New usage
noexcept
nullptr
static_assert
alignof
alignas
C ++ 14引入了新关键字吗
推荐答案
在N3936(C ++ 14)中:
Table 4 (Keywords) in N3936 (C++14):
alignas continue friend register true
alignof decltype goto reinterpret_cast try
asm default if return typedef
auto delete inline short typeid
bool do int signed typename
break double long sizeof union
case dynamic_cast mutable static unsigned
catch else namespace static_assert using
char enum new static_cast virtual
char16_t explicit noexcept struct void
char32_t export nullptr switch volatile
class extern operator template wchar_t
const false private this while
constexpr float protected thread_local
const_cast for public throw
表4在N3337(C ++ 11)中:
Table 4 in N3337 (C++11):
alignas continue friend register true
alignof decltype goto reinterpret_cast try
asm default if return typedef
auto delete inline short typeid
bool do int signed typename
break double long sizeof union
case dynamic_cast mutable static unsigned
catch else namespace static_assert using
char enum new static_cast virtual
char16_t explicit noexcept struct void
char32_t export nullptr switch volatile
class extern operator template wchar_t
const false private this while
constexpr float protected thread_local
const_cast for public throw
。
( override
和 final
是具有特殊含义的标识符,并在表3中列出; 和
等是替代表示...对于某些运算符和标点符号并且列在表5中。在C ++ 11和C ++ 14之间没有表改变。 )
(override
and final
are "identifiers with special meaning" and are listed in Table 3; and
etc. are "alternative representations...for certain operators and punctuators" and are listed in Table 5. Neither table changed between C++11 and C++14.)
这篇关于是C ++ 14添加新的关键字到C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文