Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix const issue with erase and erase_if in string #961

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/fast_io_dsal/impl/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ class
};

template <::std::integral chtype, typename allocator1, typename U>
inline constexpr void erase(::fast_io::containers::basic_string<chtype, allocator1> const &c, U const &value)
inline constexpr void erase(::fast_io::containers::basic_string<chtype, allocator1> &c, U const &value)
{
auto it = ::std::remove(c.begin(), c.end(), value);
auto r = c.end() - it;
Expand All @@ -1477,7 +1477,7 @@ inline constexpr void erase(::fast_io::containers::basic_string<chtype, allocato
}

template <::std::integral chtype, typename allocator1, typename Pred>
inline constexpr void erase_if(::fast_io::containers::basic_string<chtype, allocator1> const &c, Pred pred)
inline constexpr void erase_if(::fast_io::containers::basic_string<chtype, allocator1> &c, Pred pred)
{
auto it = ::std::remove_if(c.begin(), c.end(), pred);
auto r = c.end() - it;
Expand Down