![](/img/trans.png)
[英]How to re-enable a disabled network connection in Windows XP using C++?
[英]C++ re-enable the default c'tor?
如果我自己寫了一個,我如何重新啟用默認的 c'tor?
我知道寫一個 c'tor 會禁用默認的
您可以將其作為default
實現(或根據需要使用自定義實現):
struct C
{
explicit C(int) {} // Disable default constructor
C() = default; // re-enable it :)
};
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.