Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ambiguity does not count as ambiguity
#include <iostream> using namespace std; class Interface { virtual void hej() = 0; }; class Base { public: Base(Interface& i): mI(i) { std::cout << "base constructed\n"; } private: Interface& mI; }; class Derived: public Base, public Interface { public: Derived(): Base(*this) { } virtual void hej() override {} }; int main() { // your code goes here Derived d; return 0; }
run
|
edit
|
history
|
help
0
imdying
Templatized Visitor Pattern Example
postfix eval in c++ - multidigits decimal
ccloader
Template
"Mostly invalid states" and unordered_set
template test
cv5
Test
not a parameter pack