名前空間
変種
操作

Alternative operator representations

提供: cppreference.com
< cpp‎ | language

 
 
C + +言語
一般的なトピック
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
フロー制御
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件付き実行文
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
繰り返し文
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
文をジャンプします
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
関数の宣言
ラムダ関数の宣言
関数テンプレート
の歴史。インライン指定
例外仕様 (廃止予定)
noexcept指定子 (C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
名前空間
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
タイプ
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
指定子
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
CV指定
貯蔵期間指定
constexprの指定子 (C++11)
自動指定 (C++11)
alignas指定子 (C++11)
初期化
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
リテラル
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
代替表現
ユーティリティ
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
タイプ
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
型の別名宣言 (C++11)
属性 (C++11)
キャストします
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
暗黙の型変換
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Cスタイルキャストと機能
メモリの割り当て
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラス
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラス固有の機能特性
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
明示 (C++11)
静的
特殊なメンバ関数
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
テンプレート
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラステンプレート
関数テンプレート
テンプレートの特殊化
パラメーターパック (C++11)
その他
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
インラインアセンブリ
 
との互換性。 C + +(とC)のソースコードはISO 646/ECMA-6不変文字セットを含む任意の非ASCII 7ビット文字セットで書かれているかもしれません。しかし、いくつかのC + +演算子と切子のISO 646コードセットの外にある文字を必要とする:{, }, [, ], #, \, ^, |, ~。追加キーワードは、これらの文字と解釈されている2つまたは3つのISO 646互換性のある特殊な文字の組み合わせを使用する演算子に対応していますこれらの記号の一部またはすべてが存在していない文字エンコードを使用できるようにするには、C + +の代替案の2種類を定義彼らは、単一の非ISO 646文字だったかのよう.
Original:
C++ (and C) source code may be written in any non-ASCII 7-bit character set that includes the ISO 646/ECMA-6 invariant character set. However, several C++ operators and punctuators require characters that are outside of the ISO 646 codeset: {, }, [, ], #, \, ^, |, ~. To be able to use character encodings where some or all of these symbols do not exist, C++ defines two kinds of alternatives: additional keywords that correspond to the operators that use these characters and special combinations of two or three ISO 646 compatible characters that are interpreted as if they were a single non-ISO 646 character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] 代替キーワード

C + +標準のキーワードとして定義されたいくつかの演算子の代替スペルがあります.
Original:
There are alternative spellings for several operators defined as keywords in the C++ standard.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Primary Alternative
&& and
&= and_eq
& bitand
| bitor
~ compl
! not
!= not_eq
|| or
|= or_eq
^ xor
^= xor_eq

[編集] C

同じ単語がマクロとしてインクルードファイル<iso646.h>でCプログラミング言語で定義されています。 、C + +では、これらは、C + +<iso646.h>のバージョンと同様に、<ciso646>言語のキーワードですが、何かを定義していませんので.
Original:
The same words are defined in the C programming language in the include file <iso646.h> as macros. Because in C++ these are language keywords, the C++ version of <iso646.h>, as well as <ciso646>, does not define anything.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] ダイグラフやトリグラフ

2と3文字(ダイグラフやトリグラフ)の次の組合せは、それぞれの主要な文字の有効な置換である:
Original:
The following combinations of two and three characters (digraphs and trigraphs) are valid substitutions for their respective primary characters:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Primary Digraph Trigraph
{ <% ??<
None} %> ??>
[ <: ??(
] :> ??)
# %: ??=
\ ??/
^ ??'
| ??!
~ ??-

[編集] キーワード

and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq

[編集]

次の例では、いくつかの代替キーワードの使用方法を示しています
Original:
The following example demonstrates the use of several alternative keywords:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

%:include <iostream>
 
int main(int argc, char *argv<::>) 
<%
    if (argc > 1 and argv<:1:> not_eq '\0') <%
        std::cout << "Hello " << argv<:1:> << '\n';
    %>
%>