D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18665 - Deprecate Undocumented Operator Overloads
Summary: Deprecate Undocumented Operator Overloads
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2018-03-26 16:58 UTC by Seb
Modified: 2020-03-21 08:51 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2018-03-26 16:58:05 UTC
Looks like DMD supports explicitly overloading ~ with opCom:

https://github.com/dlang/dmd/blob/25bc0213a7455b8ccbb9a4cc869c86ecc24c6777/src/dmd/expression.d#L5756

- It's only used on std.bitmanip
- It's not mentioned in the spec
- It doesn't appear on Google

This should be deprecated in favor of opUnary
Comment 1 Jack Stouffer 2018-03-26 17:07:08 UTC
The following should also be deprecated:

opPos
opNeg
opAdd
opAdd_r
opSub
opSub_r
opMul
opMul_r
opDiv
opDiv_r
opMod
opMod_r
opAnd
opAnd_r
opOr
opOr_r
opXor
opXor_r
opShl
opShl_r
opShr
opShr_r
opUShr
opUShr_r
opCat
opCat_r
Comment 2 Dlang Bot 2019-07-05 04:13:30 UTC
@JinShil updated dlang/dmd pull request #10130 "Fix Issue 18665 - Deprecate Undocumented Operator Overloads" fixing this issue:

- Fix Issue 18665 - Deprecate Undocumented Operator Overloads

https://github.com/dlang/dmd/pull/10130
Comment 3 Dlang Bot 2019-07-08 03:13:21 UTC
dlang/dmd pull request #10130 "Fix Issue 18665 - Deprecate Undocumented Operator Overloads" was merged into master:

- fcbbfe3f544e56e1ac7f04bf6e44c4c7eb2712e3 by JinShil:
  Fix Issue 18665 - Deprecate Undocumented Operator Overloads

https://github.com/dlang/dmd/pull/10130
Comment 4 Dlang Bot 2020-01-15 08:54:27 UTC
dlang/dmd pull request #10716 "Revert "Fix Issue 18665 - Deprecate Undocumented Operator Overloads"" was merged into master:

- 750ed116aa51cd78f0380097ed7f26be502320d7 by Walter Bright:
  Revert "Fix Issue 18665 - Deprecate Undocumented Operator Overloads"

https://github.com/dlang/dmd/pull/10716
Comment 5 Dlang Bot 2020-01-15 14:38:15 UTC
dlang/dmd pull request #10725 "Give D2-style operator overload priority over D1-style, reinstate the latter's deprecation" was merged into master:

- 6a4a2d5ffd7577beb7ae997064652e670bff6856 by Mathias LANG:
  Revert "Revert "Fix Issue 18665 - Deprecate Undocumented Operator Overloads""

https://github.com/dlang/dmd/pull/10725
Comment 6 Mathias LANG 2020-03-21 08:51:45 UTC
The revert has been reverted.