www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16464] New: opCast doco is insufficient


          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:

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