CppCon 2019 Trip Report--Matt Godbolt
The first report is already in!
CppCon 2019 Trip Report
by Matt Godbolt
From the article:
I’m on my way back from the 2019 CppCon conference and my head is buzzing with ideas! What an amazing experience!
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Adrien Hamelin | Sep 23, 2019 11:54 AM | Tags: community
The first report is already in!
CppCon 2019 Trip Report
by Matt Godbolt
From the article:
I’m on my way back from the 2019 CppCon conference and my head is buzzing with ideas! What an amazing experience!
By Vittorio Romeo | Sep 23, 2019 07:01 AM | Tags: None
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?
By Adrien Hamelin | Sep 19, 2019 12:04 PM | Tags: None
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.
By bfilipek | Sep 19, 2019 03:06 AM | Tags: None
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.
By Adrien Hamelin | Sep 18, 2019 12:42 PM | Tags: advanced
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 \ / DAnd not: (What happens without virtual inheritance)
A A | | B C \ / DVirtual 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.
By Adrien Hamelin | Sep 18, 2019 12:38 PM | Tags: community
The first videos are arriving!
Speed Is Found In The Minds of People
by Andrei Alexandrescu
From the video:
In all likelihood, sorting is one of the most researched classes of algorithms. It is a fundamental task in Computer Science, both on its own and as a step in other algorithms. Efficient algorithms for sorting and searching are now taught in core undergraduate classes. Are they at their best, or is there more blood to squeeze from that stone? This talk will explore a few less known – but more allegro! – variants of classic sorting algorithms. And as they say, the road matters more than the destination. Along the way, we'll encounter many wondrous surprises and we'll learn how to cope with the puzzling behavior of modern complex architectures.
By Ansel Sermersheim | Sep 18, 2019 01:11 AM | Tags: None
New video on the CopperSpice YouTube Channel:
Any Optional
by Barbara Geller and Ansel Sermersheim
About the video:
In this video, we discuss the std::any and std::optional classes, what they are, and how you might use them to write type safe code. We also talk about type safety in general, and how it relates to C++.
Please take a look and remember to subscribe!
By bfilipek | Sep 18, 2019 12:42 AM | Tags: None
C++17's new and handy new operator that supports overaligned objects!
New new() - The C++17's Alignment Parameter for Operator new()
by Bartlomiej Filipek
From the article:
The whole deal about the new functionality is that you can forgot about the limitation of over-aligned data. It lets you write regular modern C++ code without worrying about specialized allocators or raw memory handling functions like std::aligned_alloc() or _aligned_malloc().
By Blog Staff | Sep 17, 2019 07:27 PM | Tags: None
Yesterday's CppCon opening keynote is up:
C++20: C++ at 40
by Bjarne Stroustrup
By Blog Staff | Sep 17, 2019 08:45 AM | Tags: None
Just announced at CppCon:
Open Sourcing MSVC's STL
From the announcement:
Today at CppCon 2019, we (the MSVC team) announced that we’re releasing our implementation of the C++ Standard Library (also known as the STL) as open source.
https://github.com/microsoft/STL is our new repository, containing all of our product source code, a new CMake build system, and a README with more information. As it explains, we’re still working on migrating to GitHub. While you can clone and build the code right now, there are several things we need to do (like adding our test suites) before we can begin reviewing pull requests.
Q&A
Q: Why are you doing this?
A: There are several reasons. ...