Bug 5699 – opBinary used to implement "in" in TotalContainer

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-03-04T10:37:00Z
Last change time
2014-02-16T12:34:13Z
Keywords
pull
Assigned to
nobody
Creator
magnus

Comments

Comment #0 by magnus — 2011-03-04T10:37:53Z
The TotalContainer example class uses opBinary to implement the "in" operator, while it should use opBinaryRight.
Comment #1 by issues.dlang — 2011-03-04T11:23:15Z
Please be more specific. Where is this example?
Comment #2 by schveiguy — 2011-03-04T11:33:53Z
I think it was on the example container for std.container that now is simply a table. I think this bug is obsolete. See http://www.digitalmars.com/d/2.0/phobos/std_container.html There is no longer a TotalContainer object.
Comment #3 by magnus — 2011-03-04T11:58:09Z
I was referring to the TotalContainer class in std.container; you'll find it in the repo, here: https://github.com/D-Programming-Language/phobos/blob/master/std/container.d The bug is still there. The docs say, "The following documentation and type $(D TotalContainer) are intended for developers only," which might explain why it's not in the public docs -- it's a no-op dummy container, after all (an example to use as a starting-point). Still, if it is to serve as an example for developers, it should be correct.
Comment #4 by schveiguy — 2011-03-04T12:07:18Z
Oh, my mistake! The original docs did show the container in the documentation, which is why I thought it was removed. The exact location is here: https://github.com/D-Programming-Language/phobos/blob/31d47df17fc77a5a16e4e51267eaa6952ba01213/std/container.d#L480
Comment #5 by github-bugzilla — 2014-02-16T12:33:46Z