C++ Questions and Answers -- Herb Sutter

This blog post was suggested by Blair Davidson. The video is from summer 2011, shortly before the C++11 standard was ratified:

Herb Sutter: C++ Questions and Answers

Jun 07, 2011

Herb's [previous] appearance on C9 was a relatively short chat with me about C++0x. You wanted more questions asked and some of you thought I was just too soft on Herb. Well, Herb decided that the best way to get the questions you want asked is, well, to have you ask them. Most of the highest user-rated questions were asked and Herb answers with his usual precision. So, without further ado, it's C++ question and answer time with Herb Sutter, powered by you.

Continue reading...

Add a Comment

Comments are closed.

Comments (3)

0 0

seth said on Nov 24, 2012 05:03 PM:

Herb twice mentions the declaration syntax. I wonder what he and others think about the viability of using type aliases from C++11 to address this:

template<typename T> using ptr = T*;
template<typename T> using ref = T&;
template<size_t N, typename T> using array = T[N];
template<typename RetT, typename... Args> using func = T(Args...);
template<typename T> using c const;
template<typename T> using volat = T volatile;

array>, 10> a; // void *a[10](int);

This gives you the left-to-right declaration syntax as a library feature that uses the same template syntax we already use for many standard library types, fixes the "int* a, b;" thing, and can be smoothly mixed with the standard syntax.

Would it be realistic for a large codebase to try to use something like this? For the standard library to include it?


0 0

seth said on Nov 24, 2012 05:08 PM:

Of course the comment system completely screwed up the formatting and ate some parts of the code... See the code on pastebin here: http://pastebin.com/vrG0mgEb
0 0

Arthur said on Nov 27, 2012 10:27 AM:

It looks great to me!