#pragma once #include "lego1_export.h" #include #include #include #include namespace Extensions { constexpr const char* availableExtensions[] = {"extensions:texture loader", "extensions:si loader"}; LEGO1_EXPORT void Enable(const char* p_key, std::map p_options); template struct Extension { template static auto Call(Function&& function, Args&&... args) -> std::optional> { #ifdef EXTENSIONS if (T::enabled) { return std::invoke(std::forward(function), std::forward(args)...); } #endif return std::nullopt; } }; }; // namespace Extensions