C++11 Tutorial: Explaining the Ever-Elusive Lvalues and Rvalues

Every C++ programmer is familiar with the terms lvalue and rvalue. It’s no surprise, since the C++ standard uses them “all over”, as do many textbooks. But what do they mean? Are they still relevant now that C++11 has five value categories? It's about time to clear up the … [Read more...]

A Glimpse into C++14: Combine Flexibility and Performance with Dynamic Arrays and Runtime-Sized Arrays

C99 introduced the notion of variable length arrays: stack allocated built-in arrays whose size is determined at runtime. C++ lacks a similar feature, to the discontent of many a programmer. However, two recent proposals for adding dynamic arrays and runtime-sized arrays to … [Read more...]

Use C++11 Inheritance Control Keywords to Prevent Inconsistencies in Class Hierarchies

For more than 30 years, C++ got along without inheritance control keywords. It wasn’t easy, to say the least. Disabling further derivation of a class was possible but tricky. To prevent users from overriding a virtual function in a derived class you had to lean over … [Read more...]

Closer to Perfection: Get to Know C++11 Scoped and Based Enum Types

C++ enum types pack a set of related constants in an intuitive and efficient user-defined type. Can you ask for more? With two new C++11 enhancements, namely scoped enums and based enums, the answer is “yes.” Find out all about the recent facelift that C++11 enums underwent … [Read more...]

Using constexpr to Improve Security, Performance and Encapsulation in C++

constexpr is a new C++11 keyword that rids you of the need to create macros and hardcoded literals. It also guarantees, under certain conditions, that objects undergo static initialization. Danny Kalev shows how to embed constexpr in C++ applications to define constant … [Read more...]

Software Scramble: The Debate is On

I'm as happy as anyone that the presidential debates are finally over with, but, to be completely honest, I think I may be having withdrawals. Don't get me wrong, I have no interest in being one of the participants in a debate, but I do have a craving be the one to ask … [Read more...]

C++11 Tutorial: Lambda Expressions — The Nuts and Bolts of Functional Programming

One highlight of C++11 is lambda expressions: function-like blocks of executable statements that you can insert where normally a function call would appear. Lambdas are more compact, efficient, and secure than function objects. Danny Kalev shows you how to read lambda … [Read more...]

Unprepared Geeks – “Lipstick on a Pig”

Unprepared Geeks is SmartBear’s biweekly video-podcast about all things tech and quality. Tag along as the people behind soapUI and loadUI get together and discuss recent events, gadgets, and hot topics.     Today Henrik Johansson, Erik Yverling, Niclas … [Read more...]

C++11 Tutorial: Let Your Compiler Detect the Types of Your Objects Automatically

Imagine that your compiler could guess the type of the variables you declare as if by magic. In C++11, it’s possible — well, almost. The new auto and decltype facilities detect the type of an object automatically, thereby paving the way for cleaner and more intuitive … [Read more...]

C++11 Tutorial: New Constructor Features that Make Object Initialization Faster and Smoother

Constructors in C++11 still do what they’ve always done: initialize an object. However, two new features, namely delegating constructors and class member initializers, make constructors simpler, easier to maintain, and generally more efficient. Learn how to combine these new … [Read more...]