約397,000,000件1ページ目

2021/12/23 -"explicit"は構造体(struct)やクラス(class)のコンストラクタにつけることで「暗黙的型変換」を防止するキーワードです。 ※キーワード:入力すると色 ...

2021/4/21 -クラスのコンストラクタの宣言で explicit をつけると、次の2つの制限が適用される。 コピー初期化ができない; 暗黙の型変換ができない.

explicit 関数指定子は、望ましくない暗黙的型変換を制御します。 それは、クラス宣言内のコンストラクターの宣言にだけ使用されます。

2021/1/31 -コンストラクタはexplicitを付けないとコンパイラが暗黙的に型変換する仕様となっているので、それだと意図しないものが型変換されてコンパイルが通って ...

2023/2/23 -1) Specifies that a constructor or conversion function(since C++11)or deduction guide(since C++17) is explicit, that is, it cannot be used for ...

C++20では、関数を条件付きで explicit にする構文が追加された。コンストラクタと変換演算子に指定する explicit 指定子に、 explicit(true) 、 explicit(false) のように ...

2024/3/13 -Explicit specialization has to appear after the non-specialized template declaration. namespace N { template<class T> // primary template class ...

In this example, the constructor is explicitly defined. The declaration tree will contain two constructors. The first one is the one we defined explicitly, and ...

2008/9/23 -Using the explicit keyword in a class interface enforces the user of the interface to be explicit about a desired conversion. · "constructor to ...

2023/4/11 -Use the operator and implicit or explicit keywords to define an implicit or explicit conversion, respectively. ... class UserDefinedConversions { ...