summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-01-24 19:08:48 +0100
committerRoland Reichwein <mail@reichwein.it>2021-01-24 19:08:48 +0100
commitd8bddb9dc248bb3cc04116c97259ea6f5c13e6d0 (patch)
tree77eaa092f39b578a1c29ae9e0b34c64790a2b80b /include
parent5f7ae62649c79683597e33af673ae1dcf5267917 (diff)
Fix empty tests
Diffstat (limited to 'include')
-rw-r--r--include/unicode.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/unicode.h b/include/unicode.h
index 2969aa0..b90ed15 100644
--- a/include/unicode.h
+++ b/include/unicode.h
@@ -43,9 +43,9 @@ namespace {
return value;
}
- std::u8string::iterator iterator;
+ std::u8string::const_iterator iterator;
- std::u8string::iterator end_iterator;
+ std::u8string::const_iterator end_iterator;
value_type value{};
};
@@ -71,6 +71,7 @@ namespace {
reference operator=(const char32_t& value)
{
s.push_back(0); // TODO
+ return *this;
}
std::u16string& s;
@@ -81,14 +82,14 @@ namespace {
return utf16_back_insert_iterator(s);
}
- utf8_iterator utf8_begin(std::u8string& s)
+ utf8_iterator utf8_begin(const std::u8string& s)
{
- return utf8_iterator{s.begin(), s.end()};
+ return utf8_iterator{s.cbegin(), s.cend()};
}
- utf8_iterator utf8_end(std::u8string& s)
+ utf8_iterator utf8_end(const std::u8string& s)
{
- return utf8_iterator{s.end(), s.end()};
+ return utf8_iterator{s.cend(), s.cend()};
}
} // namespace