Skip to content

Tag Archives: C++17

Logovod – macro-free allocation-free user-configurable logger front-end for C++

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

setof – an iterable set of strongly typed enumerations

This post suggests an implementation of template class setof which facilitates features of a bit set and a forward-iterable container.

C++ switch with textual cases

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.

any_of<c1, …, c2>(v)

This simple C++17 template implements constexpr any_of for matching a value against a list of constants.

cojson tutorial for C++17

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 !