summaryrefslogtreecommitdiff
path: root/sal/osl/unx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-19 11:41:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-20 15:30:50 +0200
commit21584b304b21bfe6b99b6f29018c6b754ea28fc0 (patch)
tree34dad49f040259e005422902b10cf1d8d9b81096 /sal/osl/unx
parent0ae159cc40b837a6a47acaf9240dc350fe68d49d (diff)
make OUString(OUStringLiteral) constructor constexpr
with the intent that we can declare static const OUStringLiteral FOO = "bar"; static const struct { OUString s; } xxx = { FOO }; and have the xxx laid out at compile time. Kudos to mikekaganski for coming up with the idea of using the rtl_uString struct inside OUStringLiteral. We are using a union to defeat the array bounds checking that the compiler does when it evaluates constexpr values, so this might be brittle. Change-Id: I9a6247a17afab2eb28df139d532a8d864c49cd62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl/unx')
0 files changed, 0 insertions, 0 deletions