1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add numeric algorithm reduce, exclusive_scan, inclusize_scan

This commit is contained in:
bolero-MURAKAMI 2017-10-10 02:13:04 +09:00
parent 715cb40734
commit 2052058357
34 changed files with 1195 additions and 18 deletions

View file

@ -155,14 +155,18 @@ namespace testspr {
SPROUT_NON_CONSTEXPR comparable_function(function_type const& f)
: func_(f)
{}
SPROUT_NON_CONSTEXPR bool operator()(trace_stack const& t) {
SPROUT_NON_CONSTEXPR bool operator()(trace_stack const& t) const {
return func_(t);
}
SPROUT_NON_CONSTEXPR bool operator==(function_type const& rhs) {
return func_.target_type() == rhs.target_type();
SPROUT_NON_CONSTEXPR bool operator==(function_type const& rhs) const {
return func_ == nullptr ? rhs == nullptr
: rhs == nullptr ? false
: func_.target_type() == rhs.target_type()
&& func_.target<bool (testspr::trace_stack const&)>() == rhs.target<bool (testspr::trace_stack const&)>()
;
}
SPROUT_NON_CONSTEXPR bool operator!=(function_type const& rhs) {
return func_.target_type() != rhs.target_type();
SPROUT_NON_CONSTEXPR bool operator!=(function_type const& rhs) const {
return !(*this == rhs);
}
};
private: