mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-22 00:02:40 +00:00
Fix SharedString::end() throwing an exception when MSVC iterator debugging is enabled (#4017)
Don't dereference end() of a string_view. Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
This commit is contained in:
parent
6195fc8567
commit
42d575262e
4 changed files with 14 additions and 1 deletions
|
@ -39,6 +39,12 @@ SCENARIO("SharedString API")
|
|||
REQUIRE(str == "Hello 🦊!");
|
||||
REQUIRE(std::string_view(str.data()) == "Hello 🦊!");
|
||||
}
|
||||
|
||||
SECTION("begin/end")
|
||||
{
|
||||
str = "Hello";
|
||||
REQUIRE(str.begin() + std::string_view(str).size() == str.end());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Basic SharedVector API", "[vector]")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue