Roland Kaminski
Roland Kaminski
I just saw that this has already been reported in #2511.
Just a simple workaround that could easily be extended to other platforms: ```c++ inline std::size_t catch_strnlen(const char *str, std::size_t n) { #ifdef __CYGWIN__ if (str == nullptr || n ==...
So then this can be written portably in C++11 using ```c++ inline std::size_t catch_strnlen(const char *str, std::size_t n) { auto ret = std::memchr(str, '\0', n); if (ret != nullptr) {...
> you sure it's not hidden behind _GNU_SOURCE? It is part of the strings library: .
> I wonder though if there isn't a problem in the code where the last bucket is never cleared. You are right. I'll provide a fix.
> It seems also that no backward shift is done on erasure. Maybe I should have spend some more time looking at the erase function. Just skimmed and though the...
The problem should be fixed. I also made sure that the values in the container are passed by const reference to the predicate.
It's been a while. Is there anything else that should be done?
As long as the value_type is noexcept movable, the function should be nothrow. Otherwise, I don't think that any reasonable guarantees can be given. (Maybe that deleting at the end...
> I have to think a bit about it as it may be quite complicate to achieve the strong exception guarantee. If you really want to have the strong exception...