mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
bug fix
This commit is contained in:
parent
73ead93fe5
commit
69910ca06c
6 changed files with 21 additions and 9 deletions
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
: old_(old_value)
|
||||
, new_(new_value)
|
||||
{}
|
||||
T const& operator()(T const& value) const {
|
||||
SPROUT_CONSTEXPR T const& operator()(T const& value) const {
|
||||
return (value == old_) ? new_ : value;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -30,8 +30,8 @@ namespace sprout {
|
|||
: pred_(pred)
|
||||
, new_(new_value)
|
||||
{}
|
||||
T const& operator()(T const& value) const {
|
||||
return pred(value) ? new_ : value;
|
||||
SPROUT_CONSTEXPR T const& operator()(T const& value) const {
|
||||
return pred_(value) ? new_ : value;
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue