digitalmars.D.bugs - [Issue 16464] New: opCast doco is insufficient
- via Digitalmars-d-bugs (22/22) Sep 02 2016 https://issues.dlang.org/show_bug.cgi?id=16464
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 puremagic.com Reporter: turkeyman 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? --
Sep 02 2016