Quantcast
Channel: C++ Archives - Crascit
Browsing latest articles
Browse All 11 View Live

Image may be NSFW.
Clik here to view.

Enabling C++11 And Later In CMake

Updated June 2020 With the constant evolution of C++, build systems have had to deal with the complication of selecting the relevant compiler and linker flags. If your project targets multiple...

View Article


Let your compiler do your housekeeping

A common sequence of steps we mortal software developers frequently find ourselves implementing goes something like this: Perform some sort of setup or acquire some sort of resource. Carry out some...

View Article


OnLeavingScope: The sequel

In a previous article, the OnLeavingScope class was presented as a technique for robustly and concisely handling scenarios involving multi-step setup, run and cleanup stages. It focused on ease of...

View Article

Move constructors can copy and std::move doesn’t move anything

I recently came across an interesting use of std::move which looked something like the following: void MyObject::processItems() {   std::vector<int> items(std::move(m_items)); for (auto item :...

View Article

Member Function Overloading: Choices You Didn’t Know You Had

Let’s explore your understanding of member function overloading. For a given class, how many different non-template overloads can you define for a given function where the function takes no arguments?...

View Article


Image may be NSFW.
Clik here to view.

Using ccache with CMake

Updated 1st February 2017 Working with very large C/C++ code bases will sometimes test your patience. Build times in particular can be a sore point, especially if the development team do not have a...

View Article

Avoiding Copies And Moves With auto

When C++11 introduced auto, it opened up a whole range of useful techniques and improved the life of C++ developers in a variety of ways. There’s no shortage of simple examples and tutorials teaching...

View Article

Image may be NSFW.
Clik here to view.

CppCon 2019: Deep CMake For Library Authors

This talk presents a road map for C++ library authors grappling with cross-platform aspects of library development and deployment. It highlights key CMake features that every cross-platform library...

View Article


Image may be NSFW.
Clik here to view.

C++20 Modules, CMake, And Shared Libraries

CMake 3.28 was the first version to officially support C++20 modules. Tutorials and examples understandably tend to focus on the fairly simple scenario of building a basic executable, perhaps also...

View Article


Practical uses for variadic templates

You might not have even heard of parameter packs or variadic templates before, but if you’ve worked with C++ templates for a while, chances are at some point you’ve wanted the functionality they...

View Article
Browsing latest articles
Browse All 11 View Live


Latest Images