m3m0ry / fixedpoint

Decimal fixed point type
Boost Software License 1.0
6 stars 3 forks source link

Fix `@safe` usage of `toString` #9

Closed schveiguy closed 3 years ago

schveiguy commented 3 years ago

Ran into an issue where the delegate version of toString accepts a @system function, which means it is inferred @system.

Switching to a template parameter means not only do we now allow whatever delegate type that can be used for formattedWrite, but also any other type of output range. auto ref allows output ranges such as arrays.

schveiguy commented 3 years ago

Hm... I pushed a test, but it's not showing up here. Not sure why. I'll give it a while, don't pull until the test is there.

m3m0ry commented 3 years ago

Thank you for your effort. I don't have much time right now.

schveiguy commented 3 years ago

No worries. I just fixed this because it came up when upgrading to latest vibe for some reason. Can you tag a new release when you get a moment?

m3m0ry commented 3 years ago

Done