diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 09:39:06 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 09:39:06 -0400 |
commit | b898276a4f480eb5cf3fbc27bea01e2f4a261374 (patch) | |
tree | de74df481d7f6ee7576eb14f15363033f2b1d39c /indra/llrender/llglslshader.h | |
parent | 0c1b3c8a38542b5aab10527cf411b57642b1f70f (diff) |
Work around broken MS `std::basic_ostream`.
MSVC's `std::basic_ostream<CHAR>` template is not implemented in a general way:
it can only be instantiated for certain specific `CHAR` types. Declaring a
`std::basic_ostringstream<llwchar>` fails on MSVC with C2941.
Fortunately both llstring.cpp functions that build a `LLWString` incrementally
have the same characteristics: (a) they each build it one character at a time,
and (b) the length of the result `LLWString` won't exceed the known length of
the input string. So it works to declare a `std::vector<llwchar>`, `reserve()`
the input length and `push_back()` individual characters. Then we can use
`LLWString`'s range constructor to immediately allocate the right size.
Diffstat (limited to 'indra/llrender/llglslshader.h')
0 files changed, 0 insertions, 0 deletions