Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
rvalue lifetime
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86 #include <iostream> using namespace std; class A{ public: int get() { return 1; } }; A&& getA() { return A(); } int main() { A&& a = getA(); cout << a.get() <<endl; }
run
|
edit
|
history
|
help
0
operator new / delete
zero size std::array parameter
C++ standard violation: [templates][explicit instantiation][access checking]
Structured Member Value Access Using Structure Member Pointer and Variadic Templates
Fibonacci stairs
post_decrement_example
Cannot allocate an array of constant size 0
boost::asyc fail with error C2280: attempting to reference a deleted function
VC++ windows exception
VC++ latest rejects istream to nullptr comparison