Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Move Construction
//clang 3.7.0 #include <iostream> class C { public: C& setProperty(int v) { _v = v; return *this; } int v() { return _v; } private: int _v = 0; }; class Base { public: Base(const C& c): _c(c) {} int value() { return _c.v(); } private: C _c; }; class Derived: public Base { public: Derived(const C& c): Base(c) {} }; int main() { Derived d(C().setProperty(12)); std::cout << d.Base::value() << std::endl; }
run
|
edit
|
history
|
help
0
Dash-D compiler flag example
Struct memory ordering
Assignment Operator Example
11/29
Check if a year is leap year or not
Error
applidiumResto_NicolasCarre
specialized template
DESim Example Starter Code
Расстановка восьми ферзей на шахматной доске так, чтобы ни один не угрожал другому - C++