The Rtime and Duration Comparator currently fails to compile if used:
|
struct CompareRtimeDurationLess { |
|
template <typename AudioBlockFormat> |
|
bool operator()(const AudioBlockFormat& lhs, const AudioBlockFormat& rhs) { |
|
if (lhs.template has<Rtime>() && rhs.template has<Rtime>()) { |
|
if (lhs.template get<Rtime>() == rhs.template get<Rtime>()) { |
|
if (lhs.template has<Duration>() && rhs.template has<Duration>()) { |
|
return lhs.template get<Duration>() < rhs.template get<Duration>(); |
|
} |
|
} |
|
|
|
return lhs.template get<Rtime>() < rhs.template get<Rtime>(); |
|
} |
|
|
|
return false; |
|
} |
|
}; |
This tries to compare two
adm::Duration objects and two
adm::Rtime objects. These are both
NamedTypes containing
adm::Time. Neither has an
operator< comparison operation defined, so attempting to use the comparator fails.
I assume the templated call operator isn't instantiated anywhere, which is why the build succeeds.
The Rtime and Duration Comparator currently fails to compile if used:
libadm/include/adm/utilities/comparator.hpp
Lines 63 to 78 in 1f3e87d
This tries to compare two
adm::Durationobjects and twoadm::Rtimeobjects. These are bothNamedTypes containingadm::Time. Neither has anoperator<comparison operation defined, so attempting to use the comparator fails.I assume the templated call operator isn't instantiated anywhere, which is why the build succeeds.