Keywords (C++)
Lists the C++ standard language keywords, Microsoft-specific keywords, and context-specific keywords.
docs.microsoft.com
이미 정의된 키워드는 특별한 의미를 같은 식별자로도 예약되어 있습니다. 그것들은 당신 프로그램에서 식별자들로 사용 될수 없습니다. 아래 마이크로소프트c++에서 예약된 키워드들이 있습니다. c++/cx and c++/cli에 지정된 이름과 언더스코어로 시작하는 이름들은 마이크로소프트 확장입니다.
Standard C++ keywords
alignas
alignof
and b
and_eq b
asm a
auto
bitand b
bitor b
bool
break
case
catch
char
char8_t c
char16_t
char32_t
class
compl b
concept c
const
const_cast
consteval c
constexpr
constinit c
continue
co_await c
co_return c
co_yield c
decltype
default
delete
do
double
dynamic_cast
else
enum
explicit
export c
extern
false
float
for
friend
goto
if
inline
int
long
mutable
namespace
new
noexcept
not b
not_eq b
nullptr
operator
or b
or_eq b
private
protected
public
register reinterpret_cast
requires c
return
short
signed
sizeof
static
static_assert
static_cast
struct
switch
template
this
thread_local
throw
true
try
typedef
typeid
typename
union
unsigned
using declaration
using directive
virtual
void
volatile
wchar_t
while
xor b
xor_eq b
a 마이크로소프트가 지정한 _asm 키워드는 c++ asm 구문으로 대체 됐습니다. asm 은 다른 c++ 구현과의 호환성을 위해 예약되어 있습니다. 그러나 구현되지 않았습니다. x86 타겟에서 인라인 어셈블리를 위해서 _asm을 사용하세요. 마이크로 소프트는 다른 타겟에서는 인라인 어셈블리를 지원하지 않습니다.
b 확장 연산자 동의어는 permissive 또는 /Za (Disable Language extenstions)가 지정 되었을 때 키워드 입니다. 그들은 마이크로소프트 확장이 가능 했을 때는 키워드가 아닙니다.
c /std:c++ 20 그 이상에 지정된 경우 지원합니다.
Microsoft-specific C++ keywords
C++에서 두개의 연속된 언더스코워를 포함하는 식별자는 컴파일러 구현을 위해 예약된 것입니다. 마이크로소프트 규칙은 마이크로소프트 키워드 앞에 더블 언더스코어를 두는 것 입니다. 이러한 단어는 식별자 이름으로 사용될 수 없다.
마이크로소프트 확장은 기본적으로 사용가능하다. 당신 프로그램이 완전히 호환적이게 하기 위해서는 당신은 컴파일 되는 동안 /eprmisiive or /Za(Diable language extension)의해 지정된 마이크로 소프트 확장기능을 비활성화 해야합니다. 이러한 옵션은 일부 마이크로소프트 관련 키워드를 비활성화 시킬 수 있다.
마이크로소프트 확장기능이 사용가능 할 때, 당신은 당신 프로그램에서 마이크로소프트 관련 키워드를 쓸수 있다. ANSI 준수하기 위해 이러한 키워드 앞에 더블언더스코어가 표시됩니다. 이전 버전과의 호환성을위해 많은 더블언더스코어 키워드의 싱글언더스코어 버전들은 지원됩니다. __cdel 키워드는 선행 언더스코어가 없이 사용 가능합니다.
__asm 키워드는 c++ asm 키워드로 대체 됩니다. asm은 다른 c++ 구현과의 호환성을 위해 예약되어 있습니다. 그러나 구현되어 있지 않습니다. __asm을 사용하세요.
__based 키워드는 32 64 bit 타겟 컴파일 유저만 사용 가능합니다.
__alignof e
__asm e
__assume e
__based e
__cdecl e
__declspec e
__event
__except e
__fastcall e
__finally e
__forceinline e
__hook d
__if_exists
__if_not_exists
__inline e
__int16 e
__int32 e
__int64 e
__int8 e
__interface
__leave e
__m128
__m128d
__m128i
__m64
__multiple_inheritance e
__ptr32 e
__ptr64e
__raise
__restrict e
__single_inheritancee
__sptre
__stdcall e
__super
__thiscall
__unaligned e
__unhook d
__uptr e
__uuidof e
__vectorcall e
__virtual_inheritance e
__w64 e
__wchar_t
d 이벤트 처리에 사용되는 고유 함수
e 이전 버전과의 하위 호환성을 위해 이러한 키워드는 마이크로소프트 확장기능을 사용할수 있으면(기본으로 사용가능함), 더블언더스코어와 싱글언더스코어 두가지 사용 가능합니다.
__declspec modifiers에 마이크로 소프트 키워드
이 식별자들은 __declspec 수정자를 위한 확장된 속성들입니다. 그런 맥락으로 키워드로 취급됩니다.
C++/CLI and C++/CX keywords
__abstract f
__box f
__delegate f
__gc f
__identifier
__nogc f
__noop
__pin f
__property f
__sealed f
__try_cast f
__value f
abstract g
array g
as_friend
delegate g
enum class
enum struct
event g
finally
for each in
gcnew g
generic g
initonly
interface class g
interface struct g
interior_ptr g
literal g
new g
property g
ref class
ref struct
safecast
sealed g
typeid
value class g
value struct g
f c++에 대해서 관리되는 확장 기능에만 적용 가능. 이 구문들은 현재 사용됮 ㅣ않는다. 더 많은 정보를 위해서는 Component Extions for runtime platforms를 확인하세요.
g C++/CLI에 저굥ㅇ 가능.
'English > Development' 카테고리의 다른 글
MSDN_C++LanguageReference_Numeric,Boolean,and Pointer literals (0) | 2021.08.24 |
---|---|
MSDN_C++LanguageReference_Punctunators(C++) (0) | 2021.08.23 |
MSDN_C++LanguageReference_Identifiers(C++) (0) | 2021.08.19 |
MSDN_C++LanguageReference_Comments(C++) (0) | 2021.08.19 |
MSDN_C++LanguageReference_Tokens and character sets (0) | 2021.08.18 |