C plus plus

“modern CMake” – Slides

I’ve held a Presentation about “modern CMake” at the C++ Meetup in Wiesbaden a week ago and wanted to share the slides with the Internet. I try to highlight the parts of a CMake project which I consider as modern (I guess there is room for interpretation here) I give a small introduction to CMake…

cmakepp: Dynamic Calls, Return Values and Exceptions

This post discusses the reasoning, implementation and usage of return values and exceptions in CMake using cmakepp. If you want to use cmakepp (it is very simple to include and under the MIT license and is a single cmake file to be included) go to cmakepp‘s GitHub page: https://github.com/toeb/cmakepp and read how to get it…

Heterogeneous Package Search and Retrieval in CMake

Finding and Retrieving third party sources, tools and binaries is currently a hot subject for C++. There are quite a few solutions (biicode, cpm, hunter, …) Also there is github, bitbucket, source balls etc. Further there are many package managers for many different platforms which also can contain packages (apt-get, chocolatey, nuget, npm, pip, ….).…

CTest Integration for VisualStudio

Motivation I have long searched for an extension in VisualStudio which allows you to control kitware’s CTests via the Test Explorer. Since no such thing existed I have developed a workable proof of concept myself :D. This software is currently not in its finished state, It still needs polishing because it can be slow and…

Renameable Namespaces using the Preprocessor

Motivation If you are starting to work on a library and do not know exactly how your namespaces are going end up these macro helper are for you. I have written helpers that simplify using namespaces and lets you build up your namespaces with preprocessor defines. This allows you to quickly rename your namespaces which…

An Alternative typedef Syntax using the C++ Preprocessor

Disclaimer: This post will be more interesting to you if you work with the preprocessor. Here you can find a preprocessor only solution for changing the typedef syntax from typedef int number_type; to int typedef_as number_type; – an alternative typedef Syntax. If your wondering where this might be useful let me tell you why I…

An Implementation of the Dynamic Object in C++

You can find my implementation at https://github.com/toeb/cppdynamic it is licensed under the MIT license. I’d be happy for feedback and or optimizations 🙂 Dynamic object are useful, especially in rapid prototyping, non-performance critical situations, and situations in which data/functions -bags are needed (non schema specific data). Also when serializing and deserializing dynamic objects can be…

Useful extensions for CMake

When using cmake for more than just simple projects it is lacking in various aspects. Some list and string functions are missing. Interaction with command line applications and the file system are harder than they need to be. Especially however using structured data (maps and objects) and more complex funtional programming is not easy at…

dynamically calling “any” thing in C++

Extending upon boost’s any class which stores a type and a void ptr to any type of value, I created a callable version were you can assign any function, lambda, memberfunction etc. to the any and call it dynamically. This is a basic and important step for runtime reflection which I’m currently working on. Tell…

is_callable type trait

I’ve developed a type_trait for checking if a type is callable, ie has defined a single operator(). Also on ideone Tell me if you like it or if you know of a better version 😀 /// function traits for member functions // gives you the class_type, return_type and arguments tuple for any member function (const…