From 71a71a06580bf9cee2f57b6dacf443b8f63fed09 Mon Sep 17 00:00:00 2001 From: Faumaray Date: Mon, 20 Oct 2025 01:18:41 +0300 Subject: [PATCH] enforce ctx in constructor Signed-off-by: Faumaray --- include/Mod/Mod.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/Mod/Mod.hpp b/include/Mod/Mod.hpp index 5d4f892..3108d7b 100644 --- a/include/Mod/Mod.hpp +++ b/include/Mod/Mod.hpp @@ -16,9 +16,10 @@ namespace vl::mod { // --- Contract concepts (NV2 + C2 + lifecycle) --- // Must have T(const Context&) + template concept HasCtorWithContext = - requires(const Context& ctx) { { T{ctx} }; }; + std::constructible_from; // Must provide compile-time identity (SV1) template