Category: C++

Article: Templates across API boundaries

I recently wrote an article for about how Loci improves on C++ templates to allow them to be used across API boundaries. The article is a multi-part series: Part 1: Templates across API boundaries: Powerful but problematic Part 2: Templates across API boundaries: Implementing template generators Part 3 (not available yet)

Use Unsigned Fixed Size Types

In the header stdint.h you can find a bunch of fixed size types, signed and unsigned, from 8 bits up to 64 bits. Their names are int8_t, uint8_t, int16_t, uint16_t etc. where the number clearly indicates the number of bits. These types are designed to solve the problem that the normal primitive types (char, short,…