Quick Q: std::bind overload resolution
Quick A: the type of the function must be explicit.
Recently on SO:
std::bind overload resolution
You need a cast to disambiguate the overloaded function:
(int(A::*)(int,int))&A::operator()
June 16-21, Sofia, Bulgaria
By Adrien Hamelin | Jun 18, 2018 12:07 PM | Tags: advanced
Quick A: the type of the function must be explicit.
Recently on SO:
std::bind overload resolution
You need a cast to disambiguate the overloaded function:
(int(A::*)(int,int))&A::operator()
By Adrien Hamelin | Jun 18, 2018 12:06 PM | Tags: intermediate
Quick A: Only your own type can be accessed.
Recently on SO:
Accessing protected members in a derived class
You can only access protected members in instances of your type (or derived from your type).
You cannot access protected members of an instance of a parent or cousin type.In your case, the Derived class can only access the b member of a Derived instance, not of a different Base instance.
Changing the constructor to take a Derived instance will also solve the problem.
By Felix Petriconi | Jun 18, 2018 05:04 AM | Tags: None
The company Ceemple just released their C++ compiler under Open Source license.
Zapcc compiler open source now available
by Ceemple
About the compiler:
Zapcc is a newer C++ compiler that goes for
- Faster Builds: Significant compilation speedups for heavy templated C++ headers such as ScyllaDB, Webkit, LLVM
- Clang/LLVM Based: Zapcc is based on clang and frequently updated from the latest svn
- Full Linux Support: Zapcc currently supports Linux x64, Windows x64 support with mingw-w64 is experimental
- Drop-in Replacement: Zapcc is a drop-in replacement for clang and gcc, and supports all build system
By Ansel Sermersheim | Jun 16, 2018 01:47 PM | Tags: None
New video on the CopperSpice YouTube Channel:
Futures and Promises
by Barbara Geller and Ansel Sermersheim
About the video:
In this video we talk about the concepts of futures, promises, and async. We explore why these concepts are useful, what the applications are, and also discuss some of the shortcomings of the current standard implementation.
Please take a look and remember to subscribe!
By Jon Kalb | Jun 16, 2018 01:45 PM | Tags: None
The next CppCon conference is in Bellevue, Washington September 23-28.
Call for Volunteers and Announcing a Volunteer Grant Program
From the announcement:
We are announcing a program to provide financial support that will make it possible for individuals to volunteer, even if they would have to incur travel and lodging expenses to attend the conference.
By Pawel Kurdybacha | Jun 16, 2018 01:43 PM | Tags: None
Talk from Dublin C++ User Group 11.06.2018.
Variadic templates and fold-expressions
by Denis Sukhonin
About the session:
Abstract: It all started with a single printf causing undefined behavior due to mismatch of the format string and arguments. To solve similar problems in a type-safe manner C++ introduced variadic template parameters and fold-expressions. Denis covers the basics and shows how a type-safe printf function can be implemented.
Slides: https://goo.gl/mmzdrH
By robwirving | Jun 15, 2018 08:17 AM | Tags: None
Episode 154 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason discuss the Rapperswil trip report and other C++ news.
CppCast Episode 154: Rapperswil Trip Report
by Rob Irving and Jason Turner
By Andrey Karpov | Jun 14, 2018 06:01 AM | Tags: tools static code analyzer secdevops pvs-studio devops cwe arm
A new release of the PVS-Studio static code analyzer became available to download. This tool is designed to detect errors and potential vulnerabilities in the source code of programs, written in C, C++, and C#.
PVS-Studio 6.24 released
by Andrey Karpov
From the article:
Support for Texas Instruments Code Composer Studio, ARM compiler was added under Windows\Linux. 8 new diagnostics were introduced to detect errors in C and C++ code. In addition to the development of new diagnostics, we continue improving Data-Flow analysis that enables old diagnostics find more bugs. Thanks to these improvements, the analyzer finds more interesting errors, like the one we described in the article "February 31". Download and try PVS-Studio.
By Meeting C++ | Jun 14, 2018 03:33 AM | Tags: meetingcpp community
Since this year, Meeting C++ offers companies the option to be listed as a C++ employer:
The first 5 companies have joined the employer listing!
by Jens Weller
From the article:
Happy to report that now 5 companies are listed in the employer listing in the Meeting C++ job section!
These are:
KDAB
QuasarDB
think-cell
Tenzir
Rieke Computersysteme
By Adrien Hamelin | Jun 13, 2018 12:56 PM | Tags: performance
Have you registered for CppCon 2018 in September? Early bird registration is open now.
While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:
Going Nowhere Faster
by Chandler Carruth
Summary of the talk:
You care about the performance of your C++ code. You have followed basic patterns to make your C++ code efficient. You profiled your application or server and used the appropriate algorithms to minimize how much work is done and the appropriate data structures to make it fast. You even have reliable benchmarks to cover the most critical and important parts of the system for performance. But you're profiling the benchmark and need to squeeze even more performance out of it... What next?
This talk dives into the performance and optimization concerns of the important, performance critical loops in your program. How do modern CPUs execute these loops, and what influences their performance? What can you do to make them faster? How can you leverage the C++ compiler to do this while keeping the code maintainable and clean? What optimization techniques do modern compilers make available to you? We'll cover all of this and more, with piles of code, examples, and even live demo.
While the talk will focus somewhat on x86 processors and the LLVM compiler, but everything will be broadly applicable and basic mappings for other processors and toolchains will be discussed throughout. However, be prepared for a lot of C++ code and assembly.