background preloader


Facebook Twitter

Posts from

Easy C++ benchmarking - Nick Bruun. For a long time, hardware was the biggest restriction we faced when trying to squeeze performance out of our software, especially when writing I/O bound software such as server applications.

Easy C++ benchmarking - Nick Bruun

If we go back ten years, such applications would by far spend most of its time waiting for sockets or disks to become ready for work, especially when bound by 10 Mbit/s uplinks and 5,400 RPM disks. The result? We could be lazy. There was so little to be gained from optimizing the rest of the application code, unless it was really compute intensive, that it really wasn't worth it.

Times have changed though. A first world problem I've spent a lot of the last half year working on/off on a piece of software, where this is definitely true. Performance of what is essentially just an HTTP server is relatively easy to test as a whole. After a few hours of working like this, I finally decided to draw some inspiration from the testing guys.

A solution -- or close enough Give it a go. Cplusplus_Today. Catch 1.0 - level of indirection - level of indirection. Since Catch first went public, two and a half years ago, at time of this writing, I've made a point of describing it as a "developer preview".

Catch 1.0 - level of indirection - level of indirection

Think of it as you might a Google beta and you won't go far wrong. I did this because I knew that there was a lot that needed doing - and in particular that some of the public interfaces would be subject to change. While I have tried to mitigate exposure to this as much as possible (as we'll see) I had wanted to reach a point that I could say things have stabilised and I'm happy to call it a true 1.0 release.

That time has come. As of today the version of Catch available on the Master branch on GitHub is 1.0 and I would encourage you to update to it if you're already using an older version. What's new? Output One of the biggest changes is in the console reporter's output. ClassTests.cpp:28: FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" But there's a lot more to the new look. Naming and tags This was not what I signed up for! Ten C++11 Features Every C++ Developer Should Use. This article discusses a series of features new to C++11 that all developers should learn and use.

Ten C++11 Features Every C++ Developer Should Use

There are lots of new additions to the language and the standard library, and this article barely scratches the surface. C++11 FAQ. Morgan Stanley | Columbia University | Texas A&M University home | C++ | FAQ | technical FAQ | C++11 FAQ | publications | TC++PL | Tour++ | Programming | D&E | bio | interviews | applications | glossary | compilers Modified September 5, 2014 This document is written by and maintained by Bjarne Stroustrup.

C++11 FAQ

Constructive comments, corrections, references, and suggestions are of course most welcome. Currently, I'm working to improve completeness and clean up the references. Translations:


Effective GoF Patterns with C++11 and Boost. Cppcheck. Cppcheck is a static analyzer for C and C++ code.


It is open-source, free, cross-platform and easy-to-use. The project's website: Cppcheck is an open-source, free tool distributed under the GNU General Public License. Daniel Marjamäki is the project's manager (his profile on StackOverflow). The project's source code can be downloaded from the github website. Cppcheck's capabilities At the moment of writing this article, the most recent version of Cppcheck is 1.60.1 which supports the following languages: C89, C99, C11, C++03, C++11; and provides the following plugins to integrate into various development environments: Open Multi-Methods for C++11, Part 1. Introduction This article is the first in a series about open multi-methods for C++11.

Open Multi-Methods for C++11, Part 1

In this installment, I will explain what they are, how they fit in the object-oriented paradigm, and make controversial statements. Subsequent articles will present a new library that implements open multi-methods, using the facilities provided by C++11 (in particular, variadic templates). The library's salient features are: fast, constant time dispatch using compact tables; arbitrary number of virtual and non virtual arguments; access to the next most specific specialization; and support for shared libraries and dynamic loading.

The series will conclude with an in-depth presentation of the internals of the library. If you are impatient, you can grab the code from GitHub and read the documentation. Polymorphism and Poly-polymorphism Object-oriented programming (OOP) rests on three pillars: encapsulation, inheritance and polymorphism. C++ Concurrency in Action. C++ Concurrency in Action is a reference and guide to the new C++ 11 Standard for experienced C++ programmers as well as those who have never written multithreaded code.

C++ Concurrency in Action

This book will show you how to write robust multithreaded applications in C++ while avoiding many common pitfalls. About the Technology Multiple processors with multiple cores are the norm these days. The C++11 version of the C++ language offers beefed-up support for multithreaded applications, and requires that you master the principles, techniques, and new language features of concurrency to stay ahead of the curve.

About the Book. C++ Reading List. C++11 multithreading tutorial – part 2. C++11 multithreading tutorial - part 2 Posted on February 27, 2012 by Sol The code for this tutorial is on GitHub: In my last tutorial about using threads in C++11 we’ve seen that the new C++11 threads syntax is remarkably clean compared with the POSIX pthreads syntax.

C++11 multithreading tutorial – part 2

Using a few simple concepts we were able to build a fairly complex image processing example avoiding the subject of thread synchronization. In the second part of this introduction to multithreading programming in C++11 we are going to see how we can synchronize a group of threads running in parallel. C++11 / C++0x Documentation « Punch Card. You want to improve your “old” C++ code base by allowing new features or bug fixes to be enhanced with C++11?

C++11 / C++0x Documentation « Punch Card

The questions you will face on the way are manifold. First, what exactly allows me C++11 to do? Where is some documentation? What is the purpose of those features. C++11 FAQ. C++ Concurrency in Action. Just Software Solutions - Custom Software Development and Website Development in West Cornwall, UK. My book, C++ Concurrency in Action contains a detailed description of the C++11 threading facilities, and techniques for designing concurrent code.

Just Software Solutions - Custom Software Development and Website Development in West Cornwall, UK

The just::thread implementation of the new C++0x thread library is available for Microsoft Visual Studio 2005, Microsoft Visual Studio 2008, Microsoft Visual Studio 2010, g++ 4.5.2 and g++ 4.6.1 on Windows, g++ 4.3, 4.4, 4.5 and 4.6 on Linux, and g++ 4.3, 4.4 and 4.5 on MacOSX. Order your copy today. C++ Concurrency in Action and Just::Thread Discounts My book C++ Concurrency in Action was finally published on 29th February 2012, after 4 years of work.

It's hard to believe that I can actually hold a copy in my hand; it's just been files on my computer for so long. My book is a tutorial and reference to the thread library from the new C++11 standard. If you haven't already got a copy, you can order one direct from Manning, or from, or C++/C++0x/C++11 reference - Cppreference.

BLOG: Thinking Asynchronously

Concurrency Tutorial - Part Four.