On Tuesday, 13 October 2015 at 22:21:43 UTC, Ali Çehreli wrote:
Reduced with a workaround:
struct UTCOffset
{
import std.conv : to;// Move to module scope to compile
This introduces UTCOffset.to as an alias to std.conv.to.
string toString() const
{
return "hello";
On Tuesday, 13 October 2015 at 21:50:54 UTC, Jonathan M Davis
wrote:
Just glancing at your code, you've marked toString with
@property, which is kind of a weird thing to do, nd if we ever
make @property enforce that it's not called with parens, then
that code won't work. So, you might try movin
On 10/13/2015 02:07 PM, Nordlöw wrote:
I have defined a struct UTCOffset in
https://github.com/nordlow/justd/blob/master/datetime_ex.d
Everything works as desired except for
import std.conv : to;
assert(UTCOffset(+14, 0).to!string == "UTC+14:00");
which fails as
/usr/include/dmd/ph
On Tuesday, October 13, 2015 21:07:07 Nordlöw via Digitalmars-d-learn wrote:
> I have defined a struct UTCOffset in
>
> https://github.com/nordlow/justd/blob/master/datetime_ex.d
>
> Everything works as desired except for
>
> import std.conv : to;
> assert(UTCOffset(+14, 0).to!string == "