CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2008
    Posts
    21

    VS2010 and C++0x

    Hello

    My name is Damien Watkins and I am a Program Manager* (PM) on the Visual C++ team – specifically I am fortunate enough to work in the Language and Libraries areas. Joining me on this slow chat will be many members of the VC++ team, however in particular I would like to introduce Jonathan Caves and Stephan T. Lavavej, the reasons why will become clear as we progress. As many of you are aware, we are currently in the Visual Studio 2010 (VS2010) Product Cycle and at the PDC in LA (http://www.microsoftpdc.com/) we released a VS2010 Community Technology Preview (CTP - http://blogs.msdn.com/vcblog/archive...-released.aspx). With this slow chat I would like to cover the C++0x work we have completed so far for VS 2010 (although questions on other topics are most welcome too.) So what is C++0x?

    C++0x (http://www.open-std.org/jtc1/sc22/wg...2008/n2798.pdf) is the next version of the C++ Standard, this contains both language and library enhancements over the current standard. Currently C++0x is at a “Committee Draft” stage (you can think of this as being similar to Beta 1 in MS speak) and is now in a public review period [as an aside, if you wish to provide feedback on the C++0x draft please contact your national representative]. In this initial posting I will not be covering in detail any of the C++0x Libraries enhancements, commonly known as Technical Report 1 (TR1). We have already released our implementation of TR1 and you can download this as part of the Service Pack 1 for Visual Studio 2008 (http://msdn.microsoft.com/en-us/vstu.../cc533447.aspx). If you want to know about all the goodies contained in our implementation of TR1 then you can read these posts by Stephan on the VC Blog: (this is where Stephan enters the story, STL is our STL expert – with initials like that what else would he be?):

    • Q&A on our TR1 implementation (http://blogs.msdn.com/vcblog/archive...mentation.aspx)
    • TR1 Slide Decks (http://blogs.msdn.com/vcblog/archive...ide-decks.aspx)

    Stephan also did a Channel 9 Video on TR1 too (http://channel9.msdn.com/shows/Going...-Report-1-TR1/).

    Now here is where Jonathan enters the picture, apart from being one of our developers, he is also the VC++ representative on the C++0x committee. I know many of you will also know that until recently Herb Sutter was the committee’s convener (and as such was not a VC++ representative per se - he did not represent the VC++ team but worked for the C++ community in general) and Herb is an architect on the VC++ team.

    Now during the VS2010 planning stage, C++0x was still in a state of flux and this presented an issue to us. Of course we wanted to be highly conformant to the new standard and many of the new C++0x features looked like very valuable additions for our customers. However, without the standard being finalized, potentially until after we ship, and with finite time and resources on our team, we need to target a coherent subset of C++0x features that were relatively stable for inclusion in VS2010 (seems Standards Work seems to take even longer then Product work, believe it or not). So where did we end up – let us look at some of the features that are already available in the aforementioned CTP:

    • auto, or rather the repurposing of this existing keyword to provide a form of type inference
    • lambdas (personally my favorite C++0x feature)
    • rvalue references
    • static_assert

    Now for a very simple introduction I will put a trivial example of the usage of each of these below (all borrowed from STL’s VC Blog post). However if you want detailed descriptions of their semantics and/or their workings in VS2010 then you should read the excellent posts that Stephan did on the VC Blog - Part 1 (http://blogs.msdn.com/vcblog/archive...10-part-1.aspx) and there will be an upcoming Part 2):

    auto
    Code:
        for (auto i = m.begin(); i != m.end(); ++i) 
            { cout << i->second << " are " << i->first << endl;    }
    Lambda
    Code:
        transform(v.begin(), v.end(), front_inserter(d), [](int n) { return n * n * n; });
    rvalue references
    Code:
        void meow(const X&) { cout << "meow(const X&): Copying." << endl;}
        void meow(X&&) { cout << "meow(X&&): Moving." << endl;}
    static_assert
    Code:
        template <int N> struct Kitten { 
         static_assert(N < 2, "Kitten<N> requires N < 2.");};
    Combinations

    And you can also generate some interesting synergy when using them in combination too:
    Code:
        auto notpred = [&](const T& t) { return !pred(t); };
    Again, please see Stephan’s posts if you want more details or complete examples. I also wanted to mention that Kate Gregory (one of our MVPs and great friend of the VC++ Team) did a TechEd Developer Europe talk (http://www.microsoft.com/emea/teched...lt.aspx?vid=63 - you may have to scroll backwards to find it in the list of videos) on some of our C++0x features too.

    Since C++0x was still baking when we did VS2010 planning this meant that a few very important but very large or incomplete features will probably not make it into VS2010. Personally my deepest regret is that Variadic Templates will not make VS2010. From the community we also often hear that Concepts is another widely anticipated feature, but this too will miss the cut for VS2010.

    Now I should mention at C++0x work is not the only work we are doing for VS2010. If you are interested in our:

    • Design Time Experience (for which we often use the term “10 is the new 6”), then you can watch Boris’ PDC talk (http://channel9.msdn.com/pdc2008/TL13/)
    • Project and Build System, you can read Marian’s VC Blog (http://blogs.msdn.com/vcblog/archive...msbuild-n.aspx)
    • MFC, then you can watch my PDC talk (http://channel9.msdn.com/pdc2008/pc26/)

    Now VS2010 is not finished yet, so more is still coming, so I hope you will look out for any CTPs/Betas that we release before VS2010 ships and give us feedback as soon as you can. One of the best places for this, apart from this week’s slow chat of course, is the VC Blog (http://blogs.msdn.com/vcblog/). Many of us read this as often as we can and even if we cannot reply to everyone we use this feedback whenever we can to inform our planning process.

    Thanks for reading this post and please let us know what you think; we look forward to reading your comments
    Damien
    --
    * During a review of this post I was asked to add an explanation of what a PM does. As you may know, in the VC++ model, features are normally implemented by a Feature Crew; these consist of some number of developers, testers and PMs. Now it is kind of obvious what developers and testers would do, you can think of PMs as doing many of the other things; customer liaison, specifications, scheduling, cross group collaboration and presentations. Now circumstances can see variation of just exactly who does what but this is enough of ballpark description to give you the correct idea.
    Last edited by Brad Jones; December 4th, 2008 at 11:20 PM. Reason: Added Code tags

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: VS2010 and C++0x

    Damien,

    Thank to you and the other members for taking the time here [I met a number of you at the Summit in April].

    I am VERY excited about VS-2010 and C++ 10.0, and have been working with the CTP for some time now.

    The single biggest thing I would like to see is a "single page" that provides a matrix between:

    • Cx0x Standard [using the Nov 08 Draft]
    • VS-2008 SP1/TR1
    • VS-2010 CTP
    • VS-2010 Planned Release
    • C++ Roadmap / Timetable


    This type of centralized comparision would make my life much easier when dealing with people who are currently planning their own C++ roadmap for the next 12-24 months.

    The more detail, the better. Especially if there are known limitations in current implementations (e.g. Items that may be addressed via HotFix or Service Pack).

    If the chart also contained links to other resource that detailed the specific topic, then it would be "totally awesome".
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: VS2010 and C++0x

    CORRECTION: The post in question was regarding varidac MACROS ...Apologies for any confustion.


    A specific case in point for the value of such a chart is varidac templates.

    Here, you have indicated that it did NOT make the cut. Yet as far back as June 2007, it was indicated (by Jonathan Caves himself ) that it had allread been addressed.

    We all know that "things change", and that it is impossible to retract or even synchronize all information on the web, so having a central "authority" point is critical!.
    Last edited by TheCPUWizard; December 8th, 2008 at 02:44 PM.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  4. #4
    Join Date
    Dec 2008
    Posts
    21

    Re: VS2010 and C++0x

    Hello

    So we do not have such a roadmap per se, but I can give you some information (although most/all of this is already public):

    • VS-2008 SP1/TR1 – so VS2008 SP1 is available and therefore “complete” – see this post for info on TR1 in SP1 http://blogs.msdn.com/vcblog/archive...n-vc9-sp1.aspx

    • VS-2010 CTP – so the CTP is available and therefore “complete” (as a CTP) – in it are the features listed in the posting above (auto, lambdas, rvalue-references, static_assert) and the “Transporting Exceptions” feature from C++0x. Now is the best time to give us feedback on this C++0x work as well as anything else in the CTP! (Or anything missing from the CTP that you would like to see – but we make no promises.)

    • C++0x Standard [using the Nov 08 Draft] – not sure which, if any, of the C++0x features will make VS2010.

    • VS-2010 Planned Release – I have no information on this.

    • C++ Roadmap / Timetable – so the C++ roadmap is that C++0x is in the “Committee Draft” stage and I do not know how long it will take before it is complete (and if there will be any changes.) And the implied roadmap for VC here is that some C++0x work will be in VS2010 but most will come after that - and we have no timetable for that yet.

    Hope that helps.

    Thanks
    Damien

  5. #5
    Join Date
    Dec 2008
    Posts
    21

    Re: VS2010 and C++0x

    Hello

    So I looked over that post (http://blogs.msdn.com/vcblog/archive...-standard.aspx) and could not see anywhere Jonathan said that Variadic Templates will be in VS2010. Where he did say “This was the biggest feature that was added this time around” he was referring to the C++0x Standard not our compiler I beleive - or did I miss something else?

    My comment in this original post is correct as it stands today: “Personally my deepest regret is that Variadic Templates will not make VS2010”.

    Thanks
    Damien

  6. #6
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: VS2010 and C++0x

    Quote Originally Posted by Damien Watkins View Post
    Hello

    So I looked over that post (http://blogs.msdn.com/vcblog/archive...-standard.aspx) and could not see anywhere Jonathan said that Variadic Templates will be in VS2010. Where he did say “This was the biggest feature that was added this time around” he was referring to the C++0x Standard not our compiler I beleive - or did I miss something else?

    My comment in this original post is correct as it stands today: “Personally my deepest regret is that Variadic Templates will not make VS2010”.

    Thanks
    Damien
    My apologies, the Jonathan post was actually in reference to varidac MACROS which have been inplace since VS-2005.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  7. #7
    Join Date
    Dec 2008
    Posts
    21

    Re: VS2010 and C++0x

    Hello

    No need to apologize, I just wanted to make sure we had not promise something we were not going to deliver. Thanks for the feedback and questions.

    Thanks
    Damien

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured