MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / main

Function main

tests/StructuredBindingsHandler5Test.cpp:61–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61int main()
62{
63 Point p = Point{1, 2};
64 auto& [x, y] = p;
65
66 printf("x:%lf y:%lf\n", p.GetX(), p.GetY());
67 ++x;
68 ++y;
69 printf("x:%lf y:%lf\n", x, y);
70 printf("x:%lf y:%lf\n", p.GetX(), p.GetY());
71
72 constexpr Point p2 = Point{3, 4};
73 auto& [x2, y2] = p2;
74
75 // error: decomposition declaration cannot be declared 'constexpr'
76 // constexpr auto [x3, y3] = p2;
77}

Callers

nothing calls this directly

Calls 2

GetXMethod · 0.45
GetYMethod · 0.45

Tested by

no test coverage detected