MCPcopy Create free account
hub / github.com/0voice/cpp_new_features / main

Function main

cpp_11/002_grammar_explicit.cpp:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22void Func(ConvertTo ct) { }
23
24int main()
25{
26 Convertable c;
27 ConvertTo ct(c); // 直接初始化,通过
28// ConvertTo ct2 = c; // 拷贝构造初始化,编译失败
29 ConvertTo ct3 = static_cast<ConvertTo>(c); // 强制转化,通过
30// Func(c); // 拷贝构造初始化,编译失败
31 system("pause");
32}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected