[Issue 16464] New: opCast doco is insufficient
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Sep 2 04:11:41 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16464
Issue ID: 16464
Summary: opCast doco is insufficient
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
opCast doco is not very helpful:
http://dlang.org/spec/operatoroverloading.html#cast
This says something about 'bool', but nothing about any other type.
When is the cast operator invoked? What circumstances will it be used?
Is opCast only explicit, or will it be used for implicit casts?
What happens if the src has an opCast, and the target type has a constructor
that receives the src type? In that situation, when will the opCast be used,
and when will the constructor be used?
--
More information about the Digitalmars-d-bugs
mailing list