3 ms·
The "only C++" way would be std::enable_if, but it's a lot less ergonomic for a debug library (and harder to read) than a simple preprocessor macro. There's a r
by AlotOfReading 3y ago
The "only C++" way would be std::enable_if, but it's a lot less ergonomic for a debug library (and harder to read) than a simple preprocessor macro. There's a reason logging libraries use the preprocessor macro approach here. If you really want to avoid any manual preprocessor magic, maybe consider Boost PP?