約8,090件1ページ目

日本語のみで絞り込む

条件を指定して検索しています。すべての条件を解除する

  • 最終更新日:6か月以内
  • 2024/4/6 -2-4) Definition of a default constructor inside of class definition. 3) The default constructor is explicitly-defaulted. 4) The default constructor is deleted.

    2024/4/23 -A C++ explicit constructor is marked to not implicitly convert types. It is important because implicit conversions frequently produce unexpected consequences.

    2024/6/15 -In C++, an explicit constructor is a special type of constructor that prevents implicit conversions from occurring during object initialization.

    2024/3/7 -Constructor in C++ is a special method that is invoked automatically at the time of object creation. It is used to initialize the data members of new ...

    2024/6/6 -A constructor cannot have an explicit object parameter. (since C++23) ... C++ standards. DR, Applied to, Behavior as published, Correct behavior. CWG 194, C ...

    Copy constructors-Direct-initialization-Std::initializer_list

    2024/3/23 -1 Answer 1 ... From the design perspective for my use case, templatizing the class doesn't make sense. I've edited my question to also include another non- ...

    2024/2/24 -It just happens because of the need for an obj object. If the constructor that takes int argument had been explicit this implicit conversion would not compile:

    2024/4/18 -Generally it's done while implementing Singleton Design pattern. In case of Inheritance, you can call Base class's constructor explicitly from Derived class's ...

    2024/6/8 -For the std::array , the default constructor is implicitly defined by the compiler other than the library provider. Therefore, there is no user-provided, ...

    2024/4/15 -The objective of the virtual constructor is to decouple object creation from its type. How can we create the required type of an object at runtime? For example, ...