diff --git a/include/Mod/Mod.hpp b/include/Mod/Mod.hpp index da432dd..f922e22 100644 --- a/include/Mod/Mod.hpp +++ b/include/Mod/Mod.hpp @@ -5,19 +5,9 @@ #include #include #include - -namespace vl::mod { - -#if defined(__ELF__) - #define VL_MOD_SECTION __attribute__((section("vlmods"), used)) -#else - #define VL_MOD_SECTION __attribute__((used)) -#endif - -// ---- Contract Concepts ---- template concept HasCtorWithContext = - requires(const Context& ctx) { + requires(const vl::mod::Context& ctx) { { T(ctx) }; }; @@ -38,7 +28,16 @@ concept HasLifecycle = requires(T obj) { { obj.onStart() } -> std::same_as; { obj.onStop() } -> std::same_as; - }; + };namespace vl::mod { + +#if defined(__ELF__) + #define VL_MOD_SECTION __attribute__((section("vlmods"), used)) +#else + #define VL_MOD_SECTION __attribute__((used)) +#endif + +// ---- Contract Concepts ---- + template < class T