enforce ctx in constructor

Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2025-10-20 01:18:41 +03:00
1 parent 0b5400e6f3
commit 71a71a0658
1 file changed
+2 -1
+2 -1
View File
@@ -16,9 +16,10 @@ namespace vl::mod {
// --- Contract concepts (NV2 + C2 + lifecycle) ---
// Must have T(const Context&)
template<class T>
concept HasCtorWithContext =
requires(const Context& ctx) { { T{ctx} }; };
std::constructible_from<T, const Context&>;
// Must provide compile-time identity (SV1)
template<class T>