// Copyright (C) 2017 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 #include #include namespace Nz { class AbstractHash; class ByteArray; template decltype(auto) Apply(F&& fn, Tuple&& t); template decltype(auto) Apply(O& object, F&& fn, Tuple&& t); template constexpr std::size_t BitCount(); 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 T ReverseBits(T integer); template struct PointedType { using type = void; //< FIXME: I can't make SFINAE work }; template bool Serialize(SerializationContext& context, T&& value); inline bool Serialize(SerializationContext& context, bool value, TypeTag); inline bool Serialize(SerializationContext& context, const std::string& value, TypeTag); template std::enable_if_t::value, bool> Serialize(SerializationContext& context, T value, TypeTag); template bool Unserialize(SerializationContext& context, T* value); inline bool Unserialize(SerializationContext& context, bool* value, TypeTag); inline bool Unserialize(SerializationContext& context, std::string* value, TypeTag); template std::enable_if_t::value, bool> Unserialize(SerializationContext& context, T* value, TypeTag); } #include #endif // NAZARA_ALGORITHM_CORE_HPP