I suggest you ...

Support C++11 range-based for-loop

Range-based for-loop http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html

I have created as a separate idea to determine the priority of this feature from the rest of C++11 features

53 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Arkadiy ShapkinArkadiy Shapkin shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    6 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • ChrisGChrisG commented  ·   ·  Flag as inappropriate

        I tried it an confirmed this is already implemented, should the title be edited to account for this?
        int const testArray[] = {1, 2, 3, 4};
        for (auto value : testArray)
        {

        }

      • Simon DanSimon Dan commented  ·   ·  Flag as inappropriate

        It has been implimented into the BETA vc11.
        although the intellisence can't recognized still(it's not a big deal).

      • RPotterRPotter commented  ·   ·  Flag as inappropriate

        According to Herb at Going Native, range-for will be in VC11

      • Anna MetcalfeAnna Metcalfe commented  ·   ·  Flag as inappropriate

        @xTed Yes, but that's not standard C++.

        That said, the fact that support for a non-standard version of the same thing is there should in theory mean that it would be easy enough for them to also implement the standard version in VC11.

        The question is, will they?

      • xTed ZaleZxTed ZaleZ commented  ·   ·  Flag as inappropriate

        VS10 in native code supports syntax from managed:
        for each( auto x in container )

        It works at least for arrays and std::containers.

      Feedback and Knowledge Base