Going Native Sessions Online

Thanks to everyone who came to Redmond and/or watched online to participate in Going Native 2012, last week’s global C++-fest. It was a lot of fun, and generated a lot of useful and important talks that we hope will help continue disseminate understanding of C++11 throughout the global C++ community.

All the videos are now available online for on-demand viewing. Here’s a handy list of talks for your convenience. Please enjoy – and share!

 

Day 1

Bjarne Stroustrup: C++11 Style [Keynote]

Hans Boehm: Threads and Shared Variables in C++11

Stephan T. Lavavej: STL11 – Magic && Secrets

Andrei Alexandrescu: Variadic Templates are Funadic

Panel: The Importance of Being Native (Bjarne, Andrei, Herb, Hans)

Day 2

Herb Sutter: C++11, VC++11 and Beyond [Keynote]

Chandler Carruth: Clang – Defending C++ from Murphy’s Million Monkeys

Andrei Alexandrescu: Static If I Had a Hammer

Bjarne Stroustrup and Andrew Sutton: A Concept Design for C++

Panel: Ask Us Anything! (all speakers)

15 thoughts on “Going Native Sessions Online

  1. The survey is great, and it’s wonderful to hear about more out-of-band compiler releases. Hopefully that will get us varadic templates and uniform initialization faster. Oh, and implicit move constructors.

    However, what’s interesting is that the survey only covers the *new* parts of C++11 that remain unimplemented. What about the parts of C++11 that were unimplemented in C++03? You know: two-phase lookup, which VC *still* doesn’t do. Shouldn’t that be on the survey too?

  2. Herb

    In your keynote talk, when you called for more high level C++ standard libraries, you mentioned “sensor fusion” as an area of interest. What did you mean by this?

    I ask because I work at a company (www.numerica.us) that does “information data science”, including a lot of sensor data fusion; most of our products are networked target tracking systems — that is, systems that network multiple sensors (radars, etc) and fuse the data into a single tracking picture. This is what “sensor fusion” means to me, and I’d think it would be of even less interest than a high-performance linear algebra library (which we base our software on, and which you go on to mention would too specific to be of interest).

    If you really mean “sensor fusion” in the sense of the kind of things we do, then I’m interested to know why you think it would be of general interest and so forth.

    Thanks, and thanks again for making these talks available.

    — Dave Steffen, Ph.D. Software Engineer, Numerica Corporation

  3. Great to hear about the automagical move constructors! Any idea when the beta will be out?

    I have a slightly related suggestion: minimize initialization using constructors with a special type. How about:

    struct no_init {} g_no_init;

    struct Dummy
    {
    Dummy(int a_=0) : a(a_) {}
    Dummy(const no_init &) {} // Without a v-table, this shouldn’t need to touch any part of the created object?

    int a;
    };

    void foo()
    {
    std::vector data;

    data.resize(10000, g_no_init); // the idea is to call the do-nothing constructor for all objects
    // …. assign data using threads
    }

    A first version might only need to allow std::vector::resize to accept a template parameter? My current solution is to create a Dummy2 class with the same content, but with a default constructor that does nothing.

  4. I was referring to the fact that on Windows, if I compile something with gcc/clang I can’t use it with MSVC and viceversa. I can’t even use something compiled with Visual C++ 2005 with Visual C++ 2010. On *nix like systems, both clang and GCC conform to the Itanium C++ ABI, so mixing libraries is ok.

  5. Creating a standard ABI across platforms is not only impossible, but also useless. No one expects a library compiled for Linux to be usable in Windows.
    Creating one across compilers would be really nice. Hey, they even tried on Linux. It mostly works, as long as you use the same standard library in all components.
    On Windows, it’s a different story. Something about a compiler that insists on breaking the standard library ABI with every release, without some versioning mechanism that allows you to safely link libraries using different versions.

  6. In my opinion one of the biggest problems with C++ is the lack of a standard ABI. I mean, I’ve heard many saying that C++ is a “library language”, yet I can’t use a binary compiled with compiler X if my project is using compiler Y. Ridiculous, to say the least. I know that creating a standard ABI across so may platforms is not something trivial, yet I feel this is something that must be done.

  7. @Sebastian: Right, we were listing mainly missing features, and that’ll be a change to an already-implemented feature (move operations and rvalue references). We’ve had those since VC++ 2010 starting with their initial pre-standard form, and then in VC++11 (going into beta this month) we’ve updated them again based on further changes in the committee — one of the risks you take when implementing in advance of the final standard is that the committee may change things on you. The committee then changed the specification again right before the standard shipped (what Stephan calls “move semantics v3” I think), and we haven’t yet tracked that last change, but we plan to do that soon; completing catchup to the final move spec will likely be one of the early things to address in our new faster release cadence after VC++11 ships.

    As for compiler portability in general, even if you’re on the very latest major compilers it will probably be at least another year or so that you’ll need to write #ifdef or similar blocks for things one implementation has that another doesn’t, because right now each of the major C++ compilers has C++11 features the others don’t. The good news is that all the implementers are working hard on conformance, so this will improve.

  8. Thanks for the excellent videos.

    Also thanks for the conformance survey. However, it didn’t cover something that I consider of absolutely critical importance: automatic generation of move constructors.
    This isn’t just a feature that would be nice to have. This is a problem that is actively encouraging people to write non-conforming code!
    Consider:

    struct IWantToMoveAndCopyThis {
    std::string s1, s2, s3;
    };

    In C++98, the above gets an implicit copy constructor, so I can copy it. But it’s inefficient for function returns, because the three strings are copied.
    In C++11, it gets an implicit move constructor as well, enabling efficient move. Awesome!
    In VC++10 (and 11, from what I hear), it doesn’t get an implicit move constructor. So to make it both copyable and movable, I add an explicit one:

    IWantToMoveAndCopyThis(IWantToMoveAndCopyThis&& o)
    : s1(move(o.s1)), s2(move(o.s2)), s3(move(o.s3))
    {}

    And an assignment too:

    IWantToMoveAndCopyThis& operator =(IWantToMoveAndCopyThis&& o)
    {
    s1 = move(o.s1);
    s2 = move(o.s2);
    s3 = move(o.s3);
    return *this;
    }

    Now aside from this being verbose, annoying, and error-prone, it’s also highly problematic for standards-conforming compilers: a user-defined move constructor suppresses generation of the copy constructor and copy assignment operator! So to be compatible with both, say, recent GCC and MSVC (or for that matter, current MSVC and future, conforming versions of MSVC), I have to explicitly define those too, or else put the user-defined move functions under an #ifdef.

    Please, Herb, use whatever influence you have to make sure generated move functions go into the compiler as soon as possible! The way things are, you are creating a compatibility nightmare for yourself!

  9. This was very interesting and stimulating indeed !

    It really looked like a JEDI masters council, with the padawans in the room and online :o)
    With Bjarne as Yoda, of course !

    Thank you !

Comments are closed.