Saturday, January 31, 2026
Abstract The new edition of the C++ standard [1], expected to be released in 2026, will add reflection to C++. This will allow developers to write code that will examine the properties of classes, types, functions, and other elements and make changes to them. At the time of writing, reflection is not supported by the […]
Вступ Нова редакція стандарту C++ [1], випуск якої очікується у нинішньому, 2026 році, додасть в C++ рефлексію (reflection). Це дозволить розробникам писати код, який досліджуватиме властивості класів, типів, функцій, та інших елементів і робити у них зміни. На момент написання статті, рефлексія хоча і не підтримується основними гілками компіляторів, проте доступна у відгалуженнях як clang […]
Introduction Off-target testing - building and running tests "on a development host or build server rather than on the target hardware" . [3] stubmmio is a C++ library for off-target embedded unit tests by stubbing MCU’s MMIO regions on a Linux machine. Memory-mapped I/O (MMIO) is a method of performing I/O through registers, mapped to […]
1. Features logovod features Three styles of use — with functions, ostream left shifts, format string Automatic space insertion of functional style Automatic printing of standard containers, tuples, variants, optional Compile or run-time priority levels Compile or run-time sinks Constrained message length Support for wide-char streams Priority levels according to RFC-5424 section-6.2.1
Sunday, December 17, 2023
C++ allows declaring functions as constexpr. Such functions could be evaluated at compile time and used, for example in if constexpr(...). However, a non-constexpr function in this context is not allowed. So, if we want to write a template, accepting a function and using it in either if constexpr(...) or old plain if(...) we need […]
Thursday, January 2, 2020
This post suggests an implementation of template class setof which facilitates features of a bit set and a forward-iterable container.
C++ does not allow using string literals as case values in a switch statement. In modern C++ this restriction can be worked around with constexpr hash values.
This simple C++17 template implements constexpr any_of for matching a value against a list of constants.
COJSON library is also available as Arduino Studio .ZIP library: cojson.zip.
Also filed in cojson
|
Tagged Arduino, ARM, ATmega, avr, C++, Cortex-M0, Cortex-M4, embedded, embedded systems, json, JSON for embedded systems, json parser, json serializer, low end MCU, MCU
|
C++17 has simplified use of template parameters. Instructions, given in this tutorial, describes how to define JSON model with cojson::autos templates. Note: GCC 7 or higher is required to compile cojson_autos.hpp !