✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Assuming all necessary standard library headers are included, use the following code fragment:
template <typename T1, typename T2>
void function(T1, T2) { }
// in function main ...
std::string str {};
int x{};
double y{};
function(str, "");
function(3.5, x);
function(nullptr, &x);
function(y, 7);
function(&x, &x);
to select the functions that are instantiated.