basics

HTTP and HTTPS in Qt

How to handle HTTP and HTTPs requests in Qt

HTTP and HTTPs in Qt

by Jens Weller

From the article:

Last week I started to work on an old project again: My own feed reader. I found the code 2 weeks a go on an old USB Stick, and decided to refactor it into a useful state. This involved dealing with HTTP via QNetworkAccessManager.

A Clang edition of the C++11/14 Rocks book is now available

Korban's C++11/14 feature overview book now has a Clang edition, in addition to VS2013 and GCC:

Clang Edition of the C++11/14 Rocks Book

by Alex Korban

From the announcement:

Do you use Clang to compile C++? Would you like to know all about the C++11 and C++14 language features it supports?

You can read about them in the new edition of my C++11/14 Rocks book tailored to Clang.

...

For those who have the GCC edition of the book: you’ll already be familiar with all the C++11 content as GCC also has full C++11 support. However, the Clang edition has full C++14 coverage instead of an overview.

Non-Static Data Member Initializers -- 741MHz

In case you missed it:

Non-Static Data Member Initializers

by 741MHz

From the article:

...  This problem is addressed in C++11 by allowing non-static data members to be initialized along with a declaration. For example, the following syntax is allowed:

struct foo {
    double x = 1.23;
    int y = 1;
    int z = 2;
};

This also works well with multiple constructors. The class described above could now be simplified and made easier to maintain further down the road: ...

 

Inheriting Constructors in C++11 -- 741MHz

Following up on Monday's linked article:

Inheriting Constructors in C++11

by 741MHz

From the article:

Delegating Constructors [... are] extremely useful in boosting efficiency, [but] it does not solve the problem when programmer wants to create a derived class that has exactly the same set of constructor as its base class or classes. In which case programmers are forced to tediously duplicate constructors of the base class...

C++11 solves this problem by introducing constructor inheritance. In a derived class, programmers can write a single using T::T; statement that makes a derived class automatically inherit constructors of a base class. For example: ...

Delegating Constructors in C++11 -- 741MHz

In case you missed it on 741MHz:

Delegating Constructors in C++11

by 741MHz

From the article:

C++ has caught up with other popular object-oriented languages such as Scala, Java, C# and others when it comes to constructor delegation, a feature that is now supported as per 2011 core language specification of ISO C++. This solves a common problem with repetitive coding, which is tedious and fragile, that C++ programmers had to do in order to provide multiple class constructors.

...

C++11 allows that a constructor of a class type “A” may have an initializer list that invokes another constructor of the same type. Therefore, programmers can get rid of undesirable common initialization function and duplicate all at once by writing the code like this: ...

Making the Most of C++11/14 -- Sasha Goldshtein

New on Lanyrd:

Making the Most of C++11/14 (slides)

by Sasha Goldshtein

The C++11 standard is already behind us, and C++14 is just around the corner. With a huge variety of language features such as lambdas, rvalue references, auto and decltype, and variadic templates, it's easy to get lost in C++. In fact, it often seems like a completely new and foreign language. In this workshop we will look at the most important language features that improve system performance and developer productivity, with a glimpse towards what C++14 will bring. We will make the most of Visual C++ 2013 and see how to convert and refactor code to use modern C++ idioms.

C++11 Final Override -- 741MHz

A good article posted last year and making the rounds again this week:

C++11 Final Override

by 741MHz

From the article:

C++11 introduces two important keywords in relation to polymorphism and inheritance — the override and final. Using those keywords should become a habit of any C++ developer. It is worth using every time except when writing a base class. This will make the code clear, maintainable, and potentially save hours that would have been otherwise wasted chasing an error in debugger.

Why C++ Sails When the Vasa Sank -- Scott Meyers

Now available online, a nice talk by Scott Meyers about why modern C++ is alive and continues to enjoy life and growth:

 

Why C++ Sails When the Vasa Sank

by Scott Meyers

The Vasa was a 17th-century Swedish warship which suffered such feature creep during construction that it sank shortly after leaving the harbour on its maiden voyage. In the early 1990s, the C++ standardisation committee adopted the Vasa as a cautionary tale, discouraging prospective language extensions with "Remember the Vasa!" Yet C++ continued to grow, and by the time C++ was standardised, its complexity made the Vasa look like a rowboat.

The Vasa sank, however, while C++ cruised, and it looks likely to continue doing so even as the latest revised standards (C++11 and C++14) add dozens of new features, each with its own idiosyncrasies. Clearly, C++ has gotten some important things right. In this talk, Scott Meyers considers the lessons to be learned from the ongoing success of a complex programming language that's over 30 years old, yet very much alive and kicking.