this code, which is directly copypaste from the book itself, is appended to Blob.h., producing the above error.
template <class> struct std::hash;
class Sales_data {
friend struct std::hash<Sales_data>;
// other members
};
// specialization
namespace std{
template <>
struct hash<Sales_data> {
typedef size_t result_type;
typedef Sales_data argument_type;
size_t operator()(const Sales_data& s) const;
};
size_t hash<Sales_data>::operator()(const Sales_data& s) const
{
return hash<string>()(s.bookNo) ^
hash<unsigned>()(s.units_sold) ^
hash<double>()(s.revenue);
}
}