c# IEnumerator in c++
-
explicit - ich fummel hier im Augenblick mit MSVC++ rum, da kann man nicht so wirklich C++11 Sachen machen

Operator++ - war 'ne Kurzschlusshandlung. Habe mich am gebrauch orientiert, und bisher nur
if (++it) ...oder
while (++it) ...verwendet.
Habe den Code erstmal so runtergeschrieben. Ist noch nicht wirklich so strukturiert, wie ich das haben möchte. Und es zweistufig zu machen ist wohl 'ne gute Idee.
-
camper schrieb:
Kapitel 4 Absatz 3 Satz 2 f.
Ich war zuerst völlig verwirrt, aber dann habe ich selbst nachgeschlagen:
§6.4 schrieb:
The value of a condition that is an expression is the value of the expression, contextually converted to bool for statements other than switch
Und dann... §4/3:
Certain language constructs require that an expression be converted to a Boolean value. An expression e appearing in such a context is said to be contextually converted to bool and is well-formed if and only if the declaration bool t(e); is well-formed, for some invented temporary variable t (8.5).
Hätte ich auch selbst nachschlagen können :p
-
upps, habe statt auf edit einfach auf zitieren geklickt. hier gibt's nix zu sehen, habe nur auf seite 2 einen hinweis bzgl scary iterators hinzugefügt.