Improve build times by not including functional
This commit is contained in:
parent
1d06516181
commit
0ac55f3699
@ -22,8 +22,7 @@
|
||||
#include "../utility.hpp" //swap
|
||||
|
||||
#include <type_traits> //nothrow_invocable
|
||||
#include <functional> //less, greater
|
||||
#include <utility> //pair
|
||||
#include <utility> //pair, forward
|
||||
#include <iterator> //iterator_traits
|
||||
#include <cstddef> //size_t
|
||||
|
||||
@ -81,10 +80,15 @@ namespace rexy::detail{
|
||||
}
|
||||
return {max_suffix, period};
|
||||
}
|
||||
|
||||
template<class Iter>
|
||||
constexpr std::pair<std::size_t,size_t> critical_factorization(const Iter& nstart, const Iter& nend){
|
||||
auto msuffix = max_suffix(nstart, nend - nstart, std::less{});
|
||||
auto msuffix_rev = max_suffix(nstart, nend - nstart, std::greater{});
|
||||
auto msuffix = max_suffix(nstart, nend - nstart, []<class T, class U>(T&& left, U&& right) constexpr{
|
||||
return std::forward<T>(left) < std::forward<U>(right);
|
||||
});
|
||||
auto msuffix_rev = max_suffix(nstart, nend - nstart, []<class T, class U>(T&& left, U&& right) constexpr{
|
||||
return std::forward<T>(left) > std::forward<U>(right);
|
||||
});
|
||||
if(msuffix.first < msuffix_rev.first){
|
||||
return msuffix_rev;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user