C++ Russia 2019 Piter

C++ Russia 2019 Piter will be held in Saint-Petersburg, October 31 – November 1, 2019.

C++ Russia 2019

From the article:

Two days, three tracks and dozens of in-depth technical talks about C++: concurrency, performance, architecture, environment — all you need to make your code perfect.


Keynote by Sean Parent, Eric Niebler and Ivan Čukić.


Also at the conference: Marshall Clow, Björn Fahller, Maxim Khizhinsky, Hana Dusíková, Rainer Grimm and many others.


C++ Russia is not only the talks but also networking with hundreds of colleagues from Russia and Europe. Due to dedicated discussion zones, all the speakers have after their talks, all the questions will be answered.

And in the evening you can participate in BoF-sessions where the most uncommon ideas are born.
Fourteen talks will be entirely in English.

CppCon 2019: De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable--Herb Sutter

What do you think about it?

De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable

by Herb Sutter

From the video:

A fundamental reason why C++ is successful and loved is its adherence to Stroustrup’s zero-overhead principle: You don’t pay for what you don’t use, and if you do use a feature you can’t reasonably code it better by hand. In the C++ language itself, there are only two features that violate the zero-overhead principle, exception handling and RTTI – and, unsurprisingly, these are also the only two C++ language features that every C++ compiler has switches to turn off and that are regularly discouraged or even banned. This matters because not using these features is the largest current cause of fragmentation of the C++ community into incompatible dialects, and the cause of recurring problems including type confusion security vulnerabilities arising from “didn’t down-cast using dynamic_cast because that would be too slow.” This talk is about ongoing long-term efforts to try to unify the community in this area, not by replacing exceptions and RTTI, but by doubling down: fully embracing exceptions and RTTI, and improving them so they can be zero-overhead too.

CppCon 2019: Better Code: Relationships--Sean Parent

More are coming!

Better Code: Relationships

by Sean Parent

From the video:

Computer scientists are bad at relationships. Nearly every program crash is rooted in a mismanaged relationship, yet we spend most of our time discussing types and functions and not the relationships connecting them together. This talk looks at common ways data and code are connected in an application, how those relationships are typically represented, and the problems caused by the use, and misuse of these paradigms. Then we'll look at ways to model these relationships in C++ and use them to build correct applications.

fixing c++ with epochs -- Vittorio Romeo

This article covers a possible mechanism that would allow the C++ committee to make breaking changes to the language syntax while still fully preserving backwards compatibility. This would allow dangerous or obsolete constructs to be removed from C++, increasing safety and approachability of the language.

fixing c++ with epochs

by Vittorio Romeo

From the article:

Imagine that you have been designing a programming language for over 30 years and that it gradually became widely used across the globe. Some of the decisions you made at the beginning were excellent and contributed to the success of your project. Some others, however, were not the best: over the years you and your users realized that the world would have been a better place if those choices you made eons ago were slightly different. [...]

What if I told you that I could fix all of your problems? Even better, what if I told you that backward-compatibility will never be broken and that migration to newer versions of your language could be automated?

CppCon 2019: Applied WebAssembly: Compiling and Running C++ in Your Web Browser--Ben Smith

The first videos are becoming available.

Applied WebAssembly: Compiling and Running C++ in Your Web Browser

by Ben Smith

From the video:

WebAssembly is a new technology in all modern browsers designed to let you run high-performance code. Maybe you've heard of WebAssembly before, read an article or two, or even tried to use it with your software project. Since WebAssembly is a low-level language, it's easy to get bogged down in the technical details, and leave without knowing whether WebAssembly will be useful for you. In this talk, I'll take a top-down approach, showing a real problem and how WebAssembly can help.

From August to December this year, I'll be teaching C++ to students at Morehouse College. Having a tool like Compiler Explorer is invaluable as a teaching aid, since it allows the students to immediately see C++ compilation results, on any device that has a web browser. But Compiler Explorer and tools like it require a server to do compilation, so they're hard to use offline. With WebAssembly, we can run the compiler client-side, in the browser, no server required.

First, I'll show how I ported the clang compiler and linker to WebAssembly. Since Clang 8 supports WebAssembly as a compilation target, we can even run the resulting executable sandboxed in the browser. Next, we'll dive into how Clang compiles C++ constructs into WebAssembly. Finally, we'll look at some of the new WebAssembly features in development.

C++17 In Detail - Available in Print!

Another book available in Print that describes C++17 features!

See the article that shows more about this release:

C++17 In Detail - Print Version!

by Bartlomiej Filipek

About the book:

C++17 is a major update to the language and brings many exciting additions and improvements that will change your pre for the better. This book shows you all of the significant changes in the new Standard.

I spent hundreds of hours investigating how the new features work to ensure this book is helpful and practical. It will not only save you time but will guide you through lots of nuances of the language and the Standard Library.

If you have experience with C++11/14 and you want to advance to the latest C++ Standard, then pick up the book and start reading.

 

Quick Q: How does virtual inheritance solve the “diamond” (multiple inheritance) ambiguity?

Quick A: by making sure only one instance of each parent class is created.

Recently on SO:

How does virtual inheritance solve the “diamond” (multiple inheritance) ambiguity?

You want: (Achievable with virtual inheritance)

  A 
/ \ 
B   C 
\ / 
  D

And not: (What happens without virtual inheritance)

A   A 
|   |
B   C 
\ / 
  D

Virtual inheritance means that there will be only 1 instance of the base A class not 2.

Your type D would have 2 vtable pointers (you can see them in the first diagram), one for B and one for C who virtually inherit A. D's object size is increased because it stores 2 pointers now; however there is only one A now.

So B::A and C::A are the same and so there can be no ambiguous calls from D. If you don't use virtual inheritance you have the second diagram above. And any call to a member of A then becomes ambiguous and you need to specify which path you want to take.