// Copyright (C) 2021 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include #include namespace Nz { namespace Detail { template struct Pick { template static auto Get(First&& first, Args&&... args) { if constexpr (std::is_same_v>) return std::forward(first); else { NazaraUnused(first); return Get(std::forward(args)...); } } static auto Get() { return T{}; } }; template template ModuleTuple::ModuleTuple(ModuleConfig&&... configs) : ModuleTuple(std::forward(configs)...), ModuleTuple(std::forward(configs)...) { } template template ModuleTuple::ModuleTuple(ModuleConfig&&... configs) : m(Pick::Get(std::forward(configs)...)) { } template<> struct BuildDepList> { using Result = TypeList<>; }; template struct BuildDepList> { using ModuleDependencies = typename BuildDepList::Result; using ModuleDependenciesIncModule = TypeListAppend; using RestDependencies = typename BuildDepList>::Result; using Result = TypeListConcat; }; } template template Modules::Modules(ModuleConfig&&... configs) : m_modules(std::forward(configs)...) { } } #include