Small improvements for StringRef

* `operator[]` is constexpr
* `operator<<` and `operator+=` are hidden friends
This commit is contained in:
Martin Hořeňovský
2020-05-10 07:22:11 +02:00
parent 094d840efe
commit 895d0a0696
8 changed files with 20 additions and 12 deletions

View File

@@ -2510,6 +2510,8 @@ ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref[1] == 'b''
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.size() == 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.data() == abc'
@@ -3816,5 +3818,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
ok {test-number} -
# xmlentitycheck
ok {test-number} -
1..1904
1..1905