Modern C++ Techniques in UVW: Templates and Scoped Enums
UVW, a modern C++ wrapper around libuv, leverages several advanced language features to provide type safety, performance, and expressive APIs. Two such features—templates and scoped enumerations (enum class)—play critical roles in its design.
Templates for Type-Safe Resource Management
Consider how UVW creates handles:
auto tcp = loop.resource& ...
Posted on Thu, 11 Jun 2026 16:41:16 +0000 by arn_php
Inside UVW’s Event Emitter: Design Decisions and C++11 Tricks
The header uvw/emitter.hpp is the beating heart of the UVW library: every resource inherits from the Emitter template to gain an event-driven interface. This article walks through the interesting language features and design choices that make the class tick.
Type-safe event IDs without an enum
Lines 161–185 contain a small but powerful metap ...
Posted on Wed, 13 May 2026 05:15:32 +0000 by BinaryBird