MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Derived

Class Derived

tests/unit_test/sk_unique_ptr_test.cpp:207–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 virtual auto GetValue() -> int { return 0; }
206 };
207 struct Derived : Base {
208 int val;
209 explicit Derived(int v) : val(v) {}
210 auto GetValue() -> int override { return val; }
211 };
212
213 kstd::unique_ptr<Base> p(new Derived(42));
214 EXPECT_EQ(p->GetValue(), 42);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected