C++ Samples -- Joseph Mansfield
A repository of modern C++ code samples curated by the community.
C++ Samples
by Joseph Mansfield
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Jordi Mon Companys | Apr 7, 2015 06:00 AM | Tags: community
A repository of modern C++ code samples curated by the community.
C++ Samples
by Joseph Mansfield
By Adrien Hamelin | Apr 6, 2015 06:07 AM | Tags: c++11 boost
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Rebuilding Boost Date-Time for C++11
by Jeff Garland
Summary of the talk:
Boost date_time is a widely used C++ library originally released in 2001 -- including being the basis for elements of the chrono library in c++11. While the library interface has stayed stable for more than a decade, the world around it has changed with the standard library and language changing. It is time for the library tobe rewritten to account for c++11.
The lecture describes in detail the design decisions and changes to the library for C++11. More generally it describes elements of design for a small valuetype library. Many of these considerations involve new features of C++11 and how they should be used. This includes noexcept, move construction/assignment (R-values), constexpr, enum classes, and user defined literals.
By robwirving | Apr 3, 2015 11:16 AM | Tags: None
Episode 6 of CppCast, the only podcast by C++ developers for C++ developers. In this episode Paul Fultz II joins Rob Irving to talk about his upcoming C++Now talk which will focus on the two C++ libraries hes created Fit and Tick.
CppCast Episode 6: Fit and Tick with Paul Fultz II
by Rob Irving
About the interviewee:
Paul Fultz II has developed in C++ professionally and personally in a variety of fields including DSP, web development, and desktop applications. He has developed in other languages as well such as Java, C#, Python, and Javascript but focuses most of his attention on C++ which combines correctness, expressiveness, and performance together.
By Adrien Hamelin | Apr 3, 2015 08:00 AM | Tags: efficiency c++11
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Adventures In Updating A Legacy Codebase
by Billy Baker
Summary of the talk:
Still maintaining a legacy application? Do you have strdup()'s crying to be replaced with std::string? Do pre-standard headers such as iostream.h litter your code? Do boost libraries no longer compile with your favorite C++98 compiler? From GUIs to kernel drivers, this talk will look at some of the adventures taken while updating a codebase with more than 20 years of history to C++11.
By Adrien Hamelin | Apr 1, 2015 08:35 AM | Tags: c++11 basics
C++ allows to do this:
include <vector> using vector = std::vector;
By Clarence C. Cucumber | Apr 1, 2015 08:10 AM | Tags: None
For immediate release
Cupertino, April 1, 2015
To unite their growing communities and better meet the challenges from newer languages, such as Java and MatLab, the C languages have reached a formal agreement to merge.
Initially, the C and C++ ISO standards committees (WG11 and WG16) decided to unite as of Spring 2015 aiming for a joint C/C++ standard in 2016.
In a surprise move, the Objective-C leadership decided to join the new consortium. From their press release: “We are pleased to support this long-overdue initiative. Besides, with Apple putting their development money into Swift, we have lost our only support. We were just deciding to go independent and multi-platform when we heard rumors of the C/C++ merger and saw an obvious opportunity.”
A few hours later, feeling the pressure from JavaScript and C++, the C# designers declared their intent to join the C language melting pot: “With the performance and portability of C++ combined with the development environment of C#, the combined new language will be universal and unbeatable. We were going open source and cross-platform anyway. Most importantly, the opportunity to merge the efforts of the two Great Danes of programming language design is too good to miss.”
The remaining two members of WG4 (COBOL) decided that this offered a golden opportunity to renew COBOL: “By joining this new language, we can increase our appeal to the advertising-friendly demographic of programmers under the age of 70, and enlarge the COBOL presence in the mainframe market and beyond. We will be pleased to contribute from our vast intellectual property store of uppercase names to this exciting new effort.”
Several other languages, including Snobol, JavaScript, and Rust, inquired about membership but did not at this time meet the requirement of having a capital C in their names.
Academics and educators met the announcement with ecstatic outbursts, including: “We can spend years teaching all this!” (Chancellor, University of Tejas at Aston Martin) and “This opens a multitude of amazing new opportunities for academic dialects, research papers and industrial funding” (Dean, College of Computing, Del Monte University) and "Good luck with that!" (Registrar, Appl University).
The new consortium's first important language design task, already in progress, is to decide the name of the new language. "It is clear that the name must start with C, but beyond that there still isn’t agreement," said one person familiar with the matter but who was not authorized to speak publicly about the negotiations. "'C15' is considered too boring and might be confused with C. 'Objective-C#++' and 'C++++++' are too hard to pronounce, though everyone seemed to like 'C+++++' because it was considerably terser than both of those but unfortunately that one is syntactically malformed. The obvious 'Clang' is already taken by a related effort, and given their recent blitzkrieg-style expansion across this and nearby solar systems, we figured they didn't need more encouragement on their way to Local Cluster domination. 'C united' and 'Cucumber' are the current front runners, with votes split along party lines." The final decision on the name will be taken by vote at the first joint meeting in May 2015 in Chicago.
So far, no technical details about the merged language are available. Bjarne Stroustrup and Dennis Ritchie declined to comment, but were seen shaking their heads and muttering, “they’re nuts!”
Media contact: Clarence C. Cucumber ([email protected]), Convener pro tem, C/C++/ObjectiveC/C#/COBOL joint development committee (soon to become ISO WG41)
By Adrien Hamelin | Apr 1, 2015 08:00 AM | Tags: performance experimental efficiency
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Viewing The World Through Array-Shaped Glasses
by Łukasz Mendakiewicz
Summary of the talk:
It's agreed among experts that the most performant data structure in C++ is an array. Or a vector. Or a dynarray. Indeed, until recently there was no standardized approach in C++ to view these types in an uniform manner. It was even murkier when the data had logically more than one dimension. This talk is an introduction to the new features proposed for C++17 in N3851 [TBD: update after Rapperswil] bringing all contiguous data into harmony and lifting it to higher dimensions: index, bounds, array_view and more. Attendees will also learn how indexable algorithms differ from the traditional elemental ones, and what does it mean for parallelism.
By Blog Staff | Apr 1, 2015 03:40 AM | Tags: None
Demonstrating the power of C++11 user-defined literals:
Multi-Dimensional Analog Literals
by Eelis
From the article:
Note: The following is all standard-conforming C++, this is not a hypothetical language extension...
By Adrien Hamelin | Mar 31, 2015 02:47 PM | Tags: c++14 advanced
A link to make type-safe unions:
Eggs.Variant - Part II (the constexpr experience)
by K-ballo
From the article:
Ruminations on the development of Eggs.Variant, a C++11/14 generic, type-safe, discriminated union. Part I explored a straightforward implementation based on untyped raw storage appropriate to hold any of the variant members. It was noted, however, that such an implementation would never be constexpr-aware. It's time to throw it away and start from scratch in order to properly support constexpr...
By Adrien Hamelin | Mar 31, 2015 02:41 PM | Tags: boost basics
Here is an interesting bug:
Bug of the week
by Andrzej Krzemieński
From the article:
Today we are going to see a case study illustrating a bug. Not a very spectacular one: a typical bug one would encounter in everyday work. We will start with the symptoms, identify the root cause, and suggest measures to prevent similar things from happening in the future...