// Copyright (C) 2015 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_ALGORITHM_CORE_HPP #define NAZARA_ALGORITHM_CORE_HPP #include #include #include #include #include #include namespace Nz { class AbstractHash; class ByteArray; template auto Apply(F&& fn, Tuple&& t); template auto Apply(O& object, F&& fn, Tuple&& t); template ByteArray ComputeHash(HashType hash, const T& v); template ByteArray ComputeHash(AbstractHash* hash, const T& v); template constexpr std::size_t CountOf(T(&name)[N]) noexcept; template std::size_t CountOf(const T& c); template void HashCombine(std::size_t& seed, const T& v); template struct PointedType { using type = void; //< FIXME: I can't make SFINAE work }; template struct TypeTag {}; inline bool Serialize(SerializationContext& context, bool value); template std::enable_if_t::value, bool> Serialize(SerializationContext& context, T value); inline bool Unserialize(SerializationContext& context, bool* value); template std::enable_if_t::value, bool> Unserialize(SerializationContext& context, T* value); } #include #endif // NAZARA_ALGORITHM_CORE_HPP