mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2024-11-12 21:09:01 +00:00
fix bind1st, bind2nd
This commit is contained in:
parent
5b21d5c2ea
commit
84e3348402
2 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_FUNCTIONAL_BIND1ST_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/functional/base.hpp>
|
||||
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
||||
|
@ -53,7 +54,7 @@ namespace sprout {
|
|||
: op(x), value(y)
|
||||
{}
|
||||
template<typename U>
|
||||
SPROUT_CONSTEXPR decltype(op(value, std::declval<U const&>()))
|
||||
SPROUT_CONSTEXPR decltype(std::declval<Fn const&>()(std::declval<value_type const&>(), std::declval<U const&>()))
|
||||
operator()(U const& x) const {
|
||||
return op(value, x);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_FUNCTIONAL_BIND2ND_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/functional/base.hpp>
|
||||
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
||||
|
@ -53,7 +54,7 @@ namespace sprout {
|
|||
: op(x), value(y)
|
||||
{}
|
||||
template<typename U>
|
||||
SPROUT_CONSTEXPR decltype(op(std::declval<U const&>(), value))
|
||||
SPROUT_CONSTEXPR decltype(std::declval<Fn const&>()(std::declval<U const&>(), std::declval<value_type const&>()))
|
||||
operator()(U const& x) const {
|
||||
return op(x, value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue