|
xtd
0.2.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#if !defined(__XTD_CORE_INTERNAL__)
8#error "Do not include this file: Internal use only"
17template<
class type_t,
class bool_t>
18struct __polymorphic_lesser__ {};
21struct __polymorphic_lesser__<type_t, std::true_type> {
22 bool operator()(
const type_t& lhs,
const type_t& rhs)
const {
23 if (
dynamic_cast<const xtd::icomparable<type_t>*
>(&lhs))
return dynamic_cast<const xtd::icomparable<type_t>&
>(lhs).compare_to(rhs) < 0;
24 return std::less<type_t> {}(lhs, rhs);
29struct __polymorphic_lesser__<type_t, std::false_type> {
30 bool operator()(
const type_t& lhs,
const type_t& rhs)
const {
return std::less<type_t> {}(lhs, rhs);}
Contains xtd::icomparable interface.