Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
RVO hota hai bhenchod
#include <vector> #include <numeric> #include <iostream> struct loud { loud() {} //{ std::cout << "loud()\n"; } ~loud() {} //{ std::cout << "~loud()\n"; } loud(loud const&) { std::cout << "fail!\n"; } }; using vec_t = std::vector<loud>; struct Foo { vec_t v; Foo(vec_t _v) : v(std::move(_v)) {} }; Foo getBigFoo() { vec_t v(1); return {std::move(v)}; // Expecting RVO to happen here. } int main() { auto foo = getBigFoo(); }
run
|
edit
|
history
|
help
0
cv4_template
RTTI Test
why fatal error C1083
Hangman
ToString library for C++
visual-wtf
Dynamically sized array at end of struct
const reference life time extension
#21.2
cross-platform sleep function