As of C++11, member function push_back is now overloaded with a version that takes a(n) ________. This allows the preceding call to push_back to take the storage allocated for the temporary string and reuse it directly for the new element in the vector. The temporary string will be destroyed when the function returns, so there’s no need for it to keep its content.

Prior to C++11 the following code created a temporary string object and passed it to push_back, which
then copied it into the vector:
vector; myVector;
myVector.push_back("message");
a. const pointer
b. rvalue reference
c. rvalue pointer
d. const reference


b. rvalue reference

Computer Science & Information Technology

You might also like to view...

How has virtualization helped companies?

What will be an ideal response?

Computer Science & Information Technology

Create a class PictureBook that is like the class PhoneBook except that it maps a person’s name to his or her picture.

What will be an ideal response?

Computer Science & Information Technology

Start with a picture of someone you know and make some specific color changes to it:

• Turn the teeth purple. • Turn the eyes red. • Turn the hair orange.

Computer Science & Information Technology

Ethicists who study technology are concerned that autonomous systems may become scapegoats that shield corporations and individuals from taking responsibility for their decisions.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology