Meeting C++ 2015 - keynote speakers interview
In the last break of this years Meeting C++ conference I did a short interview with my keynote speakers:
Meeting C++ 2015: keynote speakers interview
by Jens Weller
Embedded Video:
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Meeting C++ | Dec 8, 2015 05:29 AM | Tags: interview intermediate c++14 c++11 basics advanced
In the last break of this years Meeting C++ conference I did a short interview with my keynote speakers:
Meeting C++ 2015: keynote speakers interview
by Jens Weller
Embedded Video:
By Marco Arena | Dec 8, 2015 03:03 AM | Tags: intermediate boost
The basics of using Boost.Python:
First steps with Boost.Python
by Stefano Saraulli
From the article:
The Python interpreter can load modules written in C, compiled as dynamic libraries. Boost.Python helps, a lot, to prepare them. It joins the power of Boost and C++ with the ease of use of Python...
By Mantosh Kumar | Dec 7, 2015 06:33 PM | Tags: intermediate
How to write/use C++ static analyzer using Clang.
C++ Static Analysis using Clang
by Ehsan Akhgari
From the article:
Large code bases typically develop rules around how various code constructs should be used. These rules help eliminate bugs resulting from common mistakes. C++ gives programmers a good amount of power over enforcing such rules using the facilities that the language provides. As a simple example, if you have a class that should not be inherited from, you can mark the class as final.Typically one finds themselves in a situation where the language doesn’t provide an easy way to enforcey something. In that case, the solution is typically enforcing the rules through documentation, code review, etc. Besides the obvious downside of people making mistakes when checking for these rules, detecting violations of the some rules may be completely impractical.
By Adrien Hamelin | Dec 7, 2015 01:36 AM | Tags: c++14 c++11
	
You can now easily verify if Clang can compile your code on Windows:
Clang with Microsoft CodeGen in VS 2015 Update 1
by Dave Bartolomeo and the Clang/C2 feature crew
From the article:
One of the challenges with developing and maintaining cross-platform C++ code is dealing with different C++ compilers for different platforms. You write some code that builds fine with the Visual C++ compiler for your Windows-targeting build, but then your Android-targeting build breaks because Clang is stricter about standards conformance and your code was accidentally depending on Visual C++ being more permissive. Or, you write new code that builds successfully with Clang for iOS, only to find out that you used a relatively new C++ language feature that Visual C++ does not yet support, and now you have to either re-implement the code without using that language feature, or maintain a separate implementation that works with Visual C++ for your Windows build.
To make it easier to develop cross-platform code that works well for both Windows and other platforms, we’ve released an additional compiler toolset for Visual Studio called Clang with Microsoft CodeGen. This compiler uses the open-source Clang parser for C and C++, along with the code generator and optimizer from the Visual C++ compiler. This lets you compile your cross-platform code for Windows using the same Clang parser that you use for other targets, while still taking advantage of the advanced optimizations from the Visual C++ optimizer when you build for Windows. Because the new toolset uses the same Clang parser used for non-Windows targets, you won't need to have annoying #ifdefs throughout the code just to account for differences between the compilers. Also, your code can take advantage of language features that are not currently available in the Visual C++ compiler, including C99 complex types and C++14 extended constexpr support. And because the Clang-based compiler generates the same debug information format as the Visual C++ compiler, you'll still be able to debug your code with the same great Visual Studio debugger experience.
By Adrien Hamelin | Dec 7, 2015 01:31 AM | Tags: intermediate experimental
	
Coding well in C++ is becoming easier:
C++ Core Guidelines Checkers available for VS 2015 Update 1
by Andrew Pardoe and Neil MacIntosh
From the article:
Back in September at CppCon 2015 Neil announced that we would be shipping new code analysis tools for C++ that would enforce some of the rules in the C++ Core Guidelines. (A video of the talk is available here: https://www.youtube.com/watch?v=rKlHvAw1z50 and slides are available on the ISOCpp GitHub repo.)
By Adrien Hamelin | Dec 7, 2015 01:28 AM | Tags: intermediate c++11
Quick A: Use regex_token_iterator
Recently on SO:
C++ regex: Conditional replace
Use regex_token_iterator
#include <regex> #include <string> #include <sstream> #include <set> #include <map> std::string replacer(std::string text) { std::string output_text; std::set<std::string> keywords = { "foo", "bar" }; std::map<std::string, int> ids = {}; int counter = 0; auto callback = [&](std::string const& m){ std::istringstream iss(m); std::string n; if (iss >> n) { if (keywords.find(m) != keywords.end()) { output_text += m + " "; } else { if (ids.find(m) != ids.end()) { output_text += "ID" + std::to_string(ids[m]) + " "; } else { // not found ids[m] = counter; output_text += "ID" + std::to_string(counter++) + " "; } } } else { output_text += m; } }; std::regex re("\\b\\w*\\b"); std::sregex_token_iterator begin(text.begin(), text.end(), re, { -1, 0 }), end; std::for_each(begin, end, callback); return output_text; }
By robwirving | Dec 4, 2015 11:25 AM | Tags: None
Episode 36 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Robert O'Callahan from Mozilla to discuss the rr project.
CppCast Episode 36: rr with Robert O'Callahan
by Rob Irving and Jason Turner
About the interviewee:
Robert O'Callahan has a PhD in computer science at Carnegie Mellon and did academic research for a while at IBM Research, working on dynamic program analysis tools. At the same time he was contributing to Mozilla as a volunteer, until he switched gears to work full-time with Mozilla; Robert has been working on what became Firefox for over 15 years, mostly on layout and rendering in the browser engine and on related Web standards like CSS and DOM APIs. Lately he's been devoting about half of his time to rr.
By Adrien Hamelin | Dec 4, 2015 01:34 AM | Tags: experimental community
Here are the last news in the C++ standard world:
GoingNative 44: ISOC++ @Kona Debriefing
by Gabriel Ha
About the video:
Get another inside scoop on the up and coming in C++ as we debrief STL and Gaby on their most recent Standards meeting in sunny Kona, Hawaii!
By Adrien Hamelin | Dec 4, 2015 01:30 AM | Tags: experimental advanced
The basics of creating and using a module:
Getting Started with Modules in C++
by Kenny Kerr
From the article:
Visual Studio 2015 Update 1 shipped with experimental support for a module system for C++. You can learn about it from this talk given by Gabriel Dos Reis at CppCon. Creating and consuming modules is very simple, but getting started with the compiler is not that obvious. At least it wasn’t very obvious to me, so here’s a quick introduction to get you started.
By Adrien Hamelin | Dec 4, 2015 01:27 AM | Tags: experimental advanced
Modules in Visual:
C++ Modules in VS 2015 Update 1
by Gabriel Dos Reis and Andrew Pardoe
From the article:
The VC++ team is excited to preview a new feature in VS 2015 Update 1: The first experimental implementation of A Module System for C++, proposed for C++17. That proposal was approved by the C++ standards Evolution Working Group for a C++17 Technical Specification at the Fall 2015 meeting in Kona, Hawai’i. The draft wording for the Technical Specification is under review by the C++ Standards Core Working Group.