basics

Don’t Try Too Hard! – Exception Handling -- Arne Mertz

Arne Mertz describes in his recent article insights about exception handling.

Don’t Try Too Hard! – Exception Handling

by Arne Mertz

From the article:

Among C++ developers there often appears to be a misconception about what it means to deal with code that can throw exceptions. The misconception is that the possibility of exceptions means one has to try and catch often and almost everywhere. I will try to explain why I think that is wrong and where I think try/catch is appropriate and where not.

C++11 library components to make a programming scientist happy

A new video from Meeting C++ 2014:

C++11 library components to make a programming scientist happy

by Peter Gottschling

From the talk description:

This talk presents a survey over components of the C++11
standard library which facilitate the life of a programming scientist.
It will provide a gentle introduction to the random number generator
and evolve this to a complete application: the stochastic simulation
of share price development.

Operator Overloading -- Arne Mertz

Arne Mertz describes in a series of articles the principles of operator overloading.

Operator Overloading

Operator Overloading: Common Practice

by Arne Mertz

From the articles:

Operators can be used to make user defined classes act like known types, e.g. like numbers, pointers and iterators. That way they facilitate the usage of those classes. They can also be used to make your objects do whatever you want them to do, for example build structures that save the operations for later evaluation. The latter is especially useful for building embedded DSLs and gives enough subject matter for a whole series of blog posts. [The first] post will cover the former use of operator overloading, i.e. writing operators that behave like “normal” operators.

... In [the second] post I will go into the details and write a bit about each operator and how a straight forward implementation might look if the operator is meant to work similar to built in operators.

 

C++ in 2015

My yearly overview on the things that might come:

C++ in 2015

by Jens Weller

From the article:

The year is still young, so lets have an outlook about what is going to happen in C++ Land in 2015...

C++ User Group Meetings in January

A new year, and many more user groups? In January there are already 18 planned meetings:

C++ User Group Meetings in January 2015

by Jens Weller

The Meeting List:

7.1 C++ UG Saint Louis - Deep Dive - Part 1
7.1 C++ UG Santa Barbara - Boost Units
8.1 C++ UG NRW/Aachen - Open Source mit Schwerpunkt C++
8.1 C++ UG Dresden - OpenFoam
14.1 C++ UG Utah - Group Exercism.io in C++
14.1 C++ UG San Francisco/ Bay area - Presentation and Q&A
15.1 C++ UG Madrid - De 0 a 100 (Taller)
15.1 C++ UG Hamburg - Mandelbrot mit MPI
19.1 C++ UG Denver - Denver Tech Center C++ Developers
19.1 C++ UG Austin - North Austin Monthly C/C++ Pub Social
19.1 C++ UG Juce - JUCE C++ Meetup San Francisco
20.1 C++ UG Chicago - CUDA
20.1 C++ UG Juce - JUCE C++ Meetup Los Angeles
21.1 C++ UG Bristol - Save the date
21.1 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
22.1 C++ UG Rhein-Neckar - Summary of Meeting C++ Conference and Coding Dojo
22.1 C++ UG Munich - Expression Templates Revisited
28.1 C++ UG San Francisco/ Bay area - Workshop and Discussion Group

 

Let's play a game: Spot the bug in popular open-source projects -- Andrey Karpov

[We don't often link to quiz-like sites, particularly product-specific ones, but in this case we felt that this could be of broad interest to some of our readers. -- Ed.]

 

The authors of the PVS-Studio analyzer invite you to test your attentiveness:

Let's play a game -- spot the bug in popular open-source projects

by Andrey Karpov

From the article:

Code analyzers never get tired and can find errors a human's eye cannot easily notice. We have picked a few code fragments with errors revealed by PVS-Studio, all the fragments taken from well-known open-source projects.

We invite you to take part in a competition against code analyzers to test your agility by trying to find the errors by yourself. You will be offered 15 randomly selected tasks. Every correct answer earns you one score if you give it within 60 seconds. The code fragments are short and 60 seconds is a fair limit.

Let's examine a couple of examples with errors for you to understand how to give the answer...

Note: This test does not currently support mobile devices. We are working on new version of tests with better mobile devices support, new problems to solve etc. However, it is not implemented yet. We offer you to subscribe on twitter to read about our new and interesting news and to read about new things in a C++ world.

The Evolving Search for Effective C++ --Scott Meyers

Scott Meyers' keynote at the Meeting C++ 2014 conference. A short description can be found on 

the presenters blog.

The Evolving Search for Effective C++

by Scott Meyers

Description from the blog:

The video of my keynote address at Meeting C++ 2014 on December 5 has just been posted to the Meeting C++ Channel at YouTube. I was given a long time slot (two hours), so I addressed two rather different topics, both based on my work of the past quarter century identifying and promulgating guidelines for effective C++ programming...

Using assertions -- Andrzej Krzemieński

Today on Andrzej's blog:

Using assertions

by Andrzej Krzemieński

From the article:

This post is a response to my recent encounters with fellow programmers who appear to me to be missing the point of assertions and fail to appreciate their usefulness. The first post I have ever written here was on assertions, I still find it good, so there is no need to repeat it; here I will only describe how I observe people treat assertions and why I believe it is wrong.

I am reviewing the following code...

Android NDK Revision 10d available

For all the people that develop for Android, a new version( revision 10d) of the Android Native Development Kit has been released.

Android NDK Revision 10d available

From the release log:

  • Made GCC 4.8 the default for all 32-bit ABIs. Deprecated GCC 4.6, and will remove it next release. To restore previous behavior, either add NDK_TOOLCHAIN_VERSION=4.6 to ndk-build, or add --toolchain=arm-linux-androideabi-4.6 when executing make-standalone-toolchain.sh on the command line. GCC 4.9 remains the default for 64-bit ABIs.
  • Stopped all x86[_64] toolchains from adding -mstackrealign by default. The NDK toolchain assumes a 16-byte stack alignment. The tools and options used by default enforce this rule. A user writing assembly code must make sure to preserve stack alignment, and ensure that other compilers also comply with this rule. (GCC bug 38496)
  • Added Address Sanitizer functionality to Clang 3.5 support to the ARM and x86 ABIs. For more information on this change, see the Address Sanitizer project.
  • Introduced the requirement, starting from API level 21, to use -fPIE -pie when building. In API levels 16 and higher, ndk-build uses PIE when building. This change has a number of implications, which are discussed in Developer Preview Issue 888. These implications do not apply to shared libraries.

And much more ...