v0.4.1
Vigil v0.4.1
This release fixes a critical assertion formatting bug for C++17 builds, corrects expression stringification in VERIFY, and introduces a unified warning control system alongside cleaner CMake integration.
Key Highlights:
- C++17 Stability: Fixes a compilation issue with
fmt::formatcaused by empty variadic macro expansions. - Portable Warning API: Introduces internal macros to handle compiler diagnostic pragmas across MSVC, Clang, and GCC without cluttering headers with raw
#pragmadirectives. - Build System Improvements: Adopts CMake 3.24+ native
COMPILE_WARNING_AS_ERRORproperties and removes unnecessary DLL symbol exports on header-only/RAII types.
🐛 Bug Fixes
- Resolve C++17 variadic pack and VERIFY stringify issues in Assert.h (
d5e24dc)- In C++17,
VIGIL_ASSERTexpanded into ill-formedfmt::format()calls when passed an empty__VA_ARGS__pack in certainfmtversions. VIGIL_VERIFYchained throughVIGIL_ASSERT, causingVIGIL_STRINGIFYto output double-parenthesized expressions like(expr)instead ofexpr.- Added
VIGIL_INTERNAL_ASSERT_IMPL_NO_MSGfor C++17 no-message paths to invoke assertion failure reporting directly. - C++20 behavior remains unaffected as
__VA_OPT__handles empty packs cleanly.
- In C++17,
- Improve early return logging in DemoEarlyReturn function (
352200e)
🚜 Refactor
- Remove VIGIL_API export macro from ScopedLogger (
d9a3d13)- Prevents MSVC C4251 warnings caused by exporting STL members across DLL boundaries.
ScopedLoggeris fully inline/RAII and does not require DLL export annotations.
- Prevents MSVC C4251 warnings caused by exporting STL members across DLL boundaries.
- Add portable warning control macros in
compiler_attributes.h(4adb8db)- Replaces raw
#pragmablocks with a unified suppression API (VIGIL_PRAGMA_PUSH_WARNING,VIGIL_DISABLE_WARNING_*, etc.), migratinglog_level.has the first consumer.
- Replaces raw
- Remove compiler-specific diagnostic pragmas from logger_impl.h (
f4c9614)
🛠️ Build System
- Fix warning policy propagation and adopt native warning-as-error (
6242fd9)- Replaces hardcoded compiler flags (
/WX,-Werror) with CMake 3.24+COMPILE_WARNING_AS_ERRORproperties. - Enables
-Wdocumentationdiagnostics for Clang toolchains.
- Replaces hardcoded compiler flags (
Full Changelog: v0.4.0...v0.4.1