MCPcopy Create free account
hub / github.com/changkun/modern-cpp-tutorial / main

Function main

code/2/2.8.cpp:33–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33int main() {
34
35 if (Left::left_value1 == Right::right_value2) {
36 std::cout << "Left::value1 == Right::value2" << std::endl;
37 }
38
39 // 引发编译错误
40 // if(new_enum::value1 == 1) {
41 // std::cout << "true!" << std::endl;
42 // }
43 if (new_enum::value3 == new_enum::value4) {
44 std::cout << "new_enum::value3 == new_enum::value4" << std::endl;
45 }
46
47 std::cout << new_enum::value3 << std::endl;
48
49
50 return 0;
51}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected