C++ and Beyond 2012: Alexandrescu, Meyers, and Sutter - Ask Us Anything

Play C++ and Beyond 2012: Alexandrescu, Meyers, and Sutter - Ask Us Anything
Sign in to queue


Here is the Ask Us Anything panel from C++ and Beyond 2012.

Andrei Alexandrescu, Scott Meyers and Herb Sutter take questions from attendees. As expected, great questions and answers!

Tune in!

Table of contents (click the time codes ([xx:xx]) to hear the answers...):

Message passing primitives in future versions of the standard... [00:00]
Standardized unit testing framework... [02:55]
std::async... [04:30]
Standard modules proposal... [08:14]
Keyword additions and the standard library... [09:35]
Problems (and solutions) with exceptions... [12:50]
Future of concepts... [22:34]
std::thread and thread interruption... [23:03]
When to use the auto keyword (and when not to...)... [25:03]
More on auto (benefits of reduncancy, type conversion issues with bool to int?)... [29:31]
const and multithreaded programming, in C++11 const means thread safe, too... [35:00]
Yet more on auto (impact on rampant use and code readability/comprehension)... [42:42]
Compiler type deduction information (compiler switch that prints out auto deduced type information)... [50:18]
Printing out code for review that replaces auto with the actual type... [53:30]
auto and dynamic memory allocation... [54:59]
Useful, broadly-used concurrency libraries... [57:00]



Download this episode

The Discussion

  • User profile image

    Excellent Q&A! Thanks Charles/Channel 9 and C++ gurus.


  • User profile image

    Good to see these gentlemen back with another excellent session. Thank you Charles for bring us this!

    That said, based on the content of this session, next year I suggest that there are two conferences: 'C++ & Beyond 2013' and 'Auto & Beyond 2013'... Amazed at just how much time 'auto' was given Wink

  • User profile image
    Christian Semmler

    Agree with dot_tom. Thanks for sharing!

  • User profile image

    Much more to come! Big thanks to the three amigos for letting us air this great content on C9!


  • User profile image

    I didn't know there was so much to say about auto...

    I guess it's up to tooling to show you what the type actually is.

  • User profile image

    Thanks for this.  Will there be more C++ and Beyond 2012 posted?  Thanks.

  • User profile image

    @AceHack: Indeed. Slowly but surely. Stay tuned!


  • User profile image

    , Charles wrote

    @AceHack: Indeed. Slowly but surely. Stay tuned!


    Great !


  • User profile image

    Early in the video, Herb Sutter mentions some email address that seems to be '...@cpp.org'. Was that it? Is it correct? The cpp.org site seems not to be related to C++ at all.

  • User profile image

    @haiva01: This panel happened at the end of the event - it was the last session. Therefore, there will be talk of things discussed earlier in the event.

    Have patience, for answers are in the wing.


    PS: Andrei, is there a comma after therefore when it starts a sentence? Smiley

  • User profile image

    That would be std-discussion@isocpp.org




    So I guess this is the secret 'special announcement' of Herb Sutter ??? Scared

  • User profile image
    Dileep Balakrishnan

    The video files seem to be corrupted. High Quality WMV size is shown as 3.5GB but download terminates at around 103 MB. Similarly, High Quality MP4 is advertised as 696MB but terminates at 103MB on download. Can you please fix these ?

    Thanks in advance
    Dileep Balakrishnan

  • User profile image

    This is really fantastic!

    Where do we get to see the concepts getting implemented strictly using C++11 language and library features? We will prefer a simple library to start using it right away.

    We were referring to the famous paper "A Concept Design for the STL" by Dr. Bjarne Stroustrup et al., which inspired us to dive into Origin C++ Libraries, which is an implementation using C++11. We ended up collating the ideas with our experiments to put these into work in our book : "Foundation of Algorithms in C++11, Volume 1 : Using And Extending C++11, Boost And Beyond". But to go further, we need a complete set-up for C++11 concepts and Origin libraries are still very incomplete and experimental in nature.Can someone point to a library, which is put to practice? Any pointer will be very helpful.

    To be clear, we do not mean "C++ Concepts & Axioms" which (as originally proposed) cannot be fully implemented as a library feature.

    For example, the paper "A Concept Design of STL" proposes the following interface for the STL Algorithm "std::copy_backward":

    template<BidirectionalIterator I, BidirectionalIterator Out>
    requires IndirectlyCopyable<I, Out> Out copy_backward(I first, I last, Out result);

    which cannot be implemented using just library features.

    So we reduced it to look like the following :

    template<typename I, typename I>
    requires<IndirectlyCopyable<I, Out>() && Bidirectional_Iterator<I>()>
    Out copy_backward(I first, I last, Out result);

    This we were able to get it easily using sfinae feature : enable_if. But we are looking for something like this in a form of a full blown C++11 library.

    Using template alias and sfinae, simulation of requires may look like :

    #include <type_traits>
    template <bool Condition, typename T = void>
    using requires = typename std::enable_if<Condition, T>::type;

    And the Conditions being passed to requires can be simulated using the language feature "constexpr" like:

    template <typename I, typename Out>
    constexpr bool IndirectlyCopyable() { ...}

    template <typename I>
    constexpr bool Bidirectional_Iterator() { ...}

    So, all we are looking for a C++11 library, which fully implement C++11 Algorithms using Concepts as part of algorithm's interface as in :

    template<typename I, typename I>
    requires<IndirectlyCopyable<I, Out>() && Bidirectional_Iterator<I>()>
    Out copy_backward(I first, I last, Out result);


    template<typename I, typename I>
    auto copy_backward(I first, I last, Out result)
    -> requires<IndirectlyCopyable<I, Out>() && Bidirectional_Iterator<I>(), Out>;

    or something similar. Origin C++ library has similar components in place, but it is still a work in progress. Boost.Contract(Contract++) takes a different approach to simulate the above.

    Does any one know of any such library in use?

    Thanks a lot in advance.


  • User profile image
    Srikanth Kanchari

    Thanks for the post. Will be waiting for some more..

    Srikanth Kanchari

Add Your 2 Cents