In the moment a flag is set and internal caches are calculated lazy if they are needed. This makes it impossible to mark parameters for strictly reading functions as const, since that's the moment the caches need to build up.
More ideas to think about
-
StringView and String could use a same StringCommon base to make castinf possible.
-
StringViewcoudl store a pointer to the original String to use the precalculated indexes for enabling fast character lookup, etc.
In the moment a flag is set and internal caches are calculated lazy if they are needed. This makes it impossible to mark parameters for strictly reading functions as const, since that's the moment the caches need to build up.
More ideas to think about
StringViewandStringcould use a sameStringCommonbase to make castinf possible.StringViewcoudl store a pointer to the originalStringto use the precalculated indexes for enabling fast character lookup, etc.