[Issue 18209] std.uni.byGrapheme is not usable in CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 9 14:00:02 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18209

--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
(In reply to Jack Stouffer from comment #1)
> Pretty sure there's a way to change a struct's layout if it's being used in
> compile time. All that needs to be done is just bring the fields out of the
> union when used in CTFE.

Apparently this isn't possible.

There are two ways of fixing this

1. remove the small string optimization from Grapheme
2. have byGrapheme return a specialized type of Grapheme that doesn't have SSO

--


More information about the Digitalmars-d-bugs mailing list