Hi all, I'm receiving this error during compilation with g++ on my Ubuntu box:
test_utils.cc:13:15: error: no matching function for call to ‘midurad::pair_list<int>::append(midurad::pair<int> (&)())’
utils.hh:91:8: note: candidate is: void midurad::pair_list<T>::append(midurad::pair<T>&) [with T = int]
I'm quite new to C++ so this might be something very trivial I have missed. What does (&)() stand for on the first line in the above error message? The offending portion of the test_utils.cc is as follows:
1 2 3
pair_list<int> pl;
pair<int> p = pair(2, 3);
pl.append(p);
Thank you Disch, that worked perfectly for me as well. I thought the C++ compiler would infer the template parameter from the type declaration, but I guess this is not the case, I will have to read about this more. Thanks again!