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.
Also filed in
|
Tagged C++17
|
This simple C++17 template implements constexpr any_of for matching a value against a list of constants.
Also filed in
|
Tagged C++17
|
Overview USB++ (usbplusplus) is a C++14 template library that gives the user a simple and error-prone way for defining USB descriptors, suitable for embedded projects.
Introduction Preprocessor macros are widely used in C++ for configuring reusable modules, targeting different platforms or working around compiler’s differences. Such approach is inherited from C and used even in modern pure C++ libraries, such as boost. The aim of this work is to research on suitability of C++ templates and language features for establishing […]
USBUART is a cross-platform libusb-based library for reading/wring data via USB-UART adapters with Android support. It implements a relay from endpoints of a USB-UART converter to a pair of I/O resources, either appointed by given file descriptors, or created inside the library with pipe(2). User application may then use standard I/O operations for reading and […]
Introduction cojson is a C++ pull-type JSON parser/serializer for constrained platforms, such as bare metal applications on low-end MCUs. It does not use memory allocation and has almost no external dependencies. It is not intrusive – it neither forces nor implies any particular design of the application. Instead it adapts to fit any existing application […]
Also filed in cojson, Projects
|
Tagged Arduino, ARM, ATmega, avr, C++, cojson, constrained, Cortex-M0, Cortex-M4, embedded, embedded systems, json, JSON for embedded systems, json parser, json serializer, low end MCU, MCU, parser, PSoC, PSoC4, PSoC5, serializer, Teensy
|
Monday, November 10, 2014
C99 facilitates support designated initializers: I found this handy feature very useful, since it does not require remembering order of the struct fields and simplifies refactoring and/or evolving of the existing code. C++0X and C++1X does not allow this (please follow this link for more details) This page has inspired me on a practical solution […]