mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +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
|
#define SPROUT_FUNCTIONAL_BIND1ST_HPP
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
#include <sprout/config.hpp>
|
#include <sprout/config.hpp>
|
||||||
#include <sprout/functional/base.hpp>
|
#include <sprout/functional/base.hpp>
|
||||||
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
||||||
|
@ -53,7 +54,7 @@ namespace sprout {
|
||||||
: op(x), value(y)
|
: op(x), value(y)
|
||||||
{}
|
{}
|
||||||
template<typename U>
|
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 {
|
operator()(U const& x) const {
|
||||||
return op(value, x);
|
return op(value, x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define SPROUT_FUNCTIONAL_BIND2ND_HPP
|
#define SPROUT_FUNCTIONAL_BIND2ND_HPP
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
#include <sprout/config.hpp>
|
#include <sprout/config.hpp>
|
||||||
#include <sprout/functional/base.hpp>
|
#include <sprout/functional/base.hpp>
|
||||||
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
#include <sprout/functional/type_traits/is_strict_function.hpp>
|
||||||
|
@ -53,7 +54,7 @@ namespace sprout {
|
||||||
: op(x), value(y)
|
: op(x), value(y)
|
||||||
{}
|
{}
|
||||||
template<typename U>
|
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 {
|
operator()(U const& x) const {
|
||||||
return op(x, value);
|
return op(x, value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue