C++/キーワード
< C++
(C++/C++のキーワード一覧 から転送)キーワード[編集]
C++のキーワードは次のとおりです[1]。
- alignas
- alignof
- asm
- auto
- bool
- break
- case
- catch
- char
- char8_t
- char16_t
- char32_t
- class
- concept
- const
- consteval
- constexpr
- constinit
- const_cast
- continue
- co_await
- co_return
- co_yield
- decltype
- default
- delete
- do
- double
- dynamic_cast
- else
- enum
- explicit
- export
- extern
- false
- float
- for
- friend
- goto
- if
- inline
- int
- long
- mutable
- namespace
- new
- noexcept
- nullptr
- operator
- private
- protected
- public
- register[2]
- reinterpret_cast
- requires
- return
- short
- signed
- sizeof
- static
- static_assert
- static_cast
- struct
- switch
- template
- this
- thread_local
- throw
- true
- try
- typedef
- typeid
- typename
- union
- unsigned
- using
- virtual
- void
- volatile
- wchar_t
- while
これに加え、モジュールに関する export import module も構文要素 keyword: の一部を構成する。
演算子の代替表現もキーワードに準じた扱いとなります[1]。
- and
- and_eq
- bitand
- bitor
- compl
- not
- not_eq
- or
- or_eq
- xor
- xor_eq
脚注[編集]
- ^ 1.0 1.1 Working Draft, Standard for Programming Language C++, Document Number: N4950, Date: 2023-05-10 :: §5.11 Keywords P-20
- ^ registerキーワードは未使用ですが、将来の使用のために予約されています。