Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
perfect forwardingcall foo(non_const_str) 1. non-const lvalue: void foo( std::string& ) call foo(const_str) 2. const lvalue: void foo( const std::string& ) call foo( std::move(non_const_str) ) 3. rvalue: void foo( const string&& ) call pass_through(non_const_str) void pass_through( T&& ) - forwarding lvalue reference 1. non-const lvalue: void foo( std::string& ) call pass_through(const_str) void pass_through( T&& ) - forwarding lvalue reference 2. const lvalue: void foo( const std::string& ) call pass_through( std::move(non_const_str) ) void pass_through( T&& ) - forwarding rvalue reference 3. rvalue: void foo( const string&& ) |
λ
.NET NoSQL database for rapid development
|