My issue is best demonstrated by the following code:
#include
#include
class Bar
{
public: template
I think it is related to "C++ most vexing parse" that you will find in Meyer's Effective STL book.
Bar bar(std::istream_iterator< char >(file), std::istream_iterator < char >());
Is being considered as a **function declaration.**
due to which in foo(bar);
you are sending a function pointer instead :)
Doing like below will have no error:
Bar bar = Bar(//your arguments here);
foo(bar);