I understand that std::string str(std::istreambuf_iterator<char>(t),std::istreambuf_iterator<char>())
is a declaration of plain function, why the output of the code snippet blow
is
1
1
other than an address of a plain function, say
0x4591
0x4591
Here is the aforementioned code snippet:
#include <string>
#include <fstream>
#include <streambuf>
#include <iostream>
std::string str(std::istreambuf_iterator<char>(t),
std::istreambuf_iterator<char>()){
return {};
};
int main()
{
std::cout << str << std::endl;
std::cout << &str << std::endl;
}