Skip to content

Commit

Permalink
Merge pull request #1467 from schveiguy/patch-4
Browse files Browse the repository at this point in the history
Fix issue 16464. Define more clearly opCast usage
  • Loading branch information
AndrejMitrovic committed Sep 6, 2016
2 parents 9e638f1 + 9fdba00 commit 5af0f72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/operatoroverloading.dd
Expand Up @@ -202,6 +202,8 @@ $(H3 Overloading Slice Unary Operators)

$(H2 $(LEGACY_LNAME2 Cast, cast, Cast Operator Overloading))

$(P To define how one type can be cast to another, define the
`opCast` template method, which is used as follows:)
$(TABLE2 Cast Operators,
$(THEAD $(I op), $(I rewrite))
$(TROW
Expand All @@ -210,6 +212,9 @@ $(H2 $(LEGACY_LNAME2 Cast, cast, Cast Operator Overloading))
)
)

$(P Note that `opCast` is only ever used with an explicit `cast`
expression, except in the case of boolean operations (see next
section))

$(H3 Boolean Operations)

Expand Down

0 comments on commit 5af0f72

Please sign in to comment.