Closed salix5 closed 3 months ago
https://en.cppreference.com/w/cpp/container/set
template< class Key, class Compare = std::less<Key>, class Allocator = std::allocator<Key> > class set;
https://en.cppreference.com/w/cpp/utility/functional/less
constexpr bool operator()( const T& lhs, const T& rhs ) const;
The signature of card_sort should be:
card_sort
bool operator()(card* const& c1, card* const& c2) const;
It is put in a new file sort.h, which contains the declaration of incomplete type card.
sort.h
card
@mercury233 @purerosefallen
https://en.cppreference.com/w/cpp/container/set
https://en.cppreference.com/w/cpp/utility/functional/less
Problem
The signature of
card_sort
should be:Solution
It is put in a new file
sort.h
, which contains the declaration of incomplete typecard
.@mercury233 @purerosefallen