c++11 - New Features in C++ - what does this code means -


this question has answer here:

i going thru self learning of std::make_unique functionality found below declaration @ cppreference.com

template< class t, class... args > unique_ptr<t> make_unique( args&&... args ); 

i not able understand signature of method / function above.

there many "new" features used in declaration:

basically code means "declare template functions arbitrary number of parameters of type , return unique_ptr specialised given type t". in addition rvalue reference (&&) tells parameters moved instead of copied.

in short: make_unique<type>(v) same unique_ptr<type>(new type(v)).


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -