約393,000件1ページ目

日本語のみで絞り込む

2023/2/23 -A constructor with a single non-default parameter(until C++11) that is declared without the function specifier explicit is called a converting ...

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 ...

2022/9/14 -Explicit Keyword in C++ is used to mark constructors to not implicitly convert types in C++. It is optional for constructors that take ...

2023/10/24 -In C++, the explicit keyword is used with a constructor to prevent it from performing implicit conversions. A C++ explicit constructor is ...

2023/4/8 -Most C++ constructors should be explicit. All your constructors should be explicit by default. Non- explicit constructors are for special cases.

Part of the overloading rules in C++ allow for types to be freely converted to other types through the use of single-argument constructors.

2016/6/5 -The modern best practice is to make any constructor that will accept a single argument explicit by default. This includes constructors with ...

2022/5/16 -"Explicit" (in the context of the constructors) basically says "you have to have the exact right type to use this function/constructor". In the ...

2021/10/18 -Understanding implicit and explicit constructors will allow you to take in full control of how your code is read and how you use it. This is ...

2015/6/27 -You cannot call constructor with more than 1 argument providing only one. So other constructors cannot be called for implicit conversions and ...