Quantcast
Channel: C++ Archives - Crascit
Browsing all 10 articles
Browse latest 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

CMake And C++ Consulting Services Now Available

Following the successful launch of my book Professional CMake: A Practical Guide last year and receiving positive feedback from readers, I’m pleased to announce that I’ve formed my own consulting...

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
Browsing all 10 articles
Browse latest View live