Without using decltype

closed account (EwCjE3v7)
How would you write the following without using decltype?

 
  multiset<Sales_data, decltype(compareIsbn*> bookstore(compareIsbn


CompareIsbn
1
2
3
4
  bool campareIsbn(const Sales_ &lhs, const Sales_data &rhs)
{
	return lhs.isbn() < rhs.isbnt();
}

1
2
using cmp_fn_type = bool( const Sales_data&, const Sales_data& ) ;
std::multiset< Sales_data, cmp_fn_type* > bookstore(compareIsbn) ;


or just
std::multiset< Sales_data, bool(*)( const Sales_data&, const Sales_data& ) > bookstore(compareIsbn) ;
Last edited on
closed account (EwCjE3v7)
Thanks JLBorges
Topic archived. No new replies allowed.