Files
NazaraEngine/SDK/include/NDK/System.inl
Lynix 2ab0defa48 (NDK) Fixed copy/move constructor/operator
Former-commit-id: e51e7cab650aa7c17141f7401fbcbdf3159aec2b
2015-04-12 21:03:19 +02:00

34 lines
866 B
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <Ndk/Algorithm.hpp>
#include <type_traits>
namespace Ndk
{
template<typename SystemType>
System<SystemType>::System() :
BaseSystem(GetSystemIndex<SystemType>())
{
}
template<typename SystemType>
System<SystemType>::~System() = default;
template<typename SystemType>
BaseSystem* System<SystemType>::Clone() const
{
///FIXME: Pas encore supporté par GCC (4.9.2)
//static_assert(std::is_trivially_copy_constructible<SystemType>::value, "SystemType should be copy-constructible");
return new SystemType(static_cast<const SystemType&>(*this));
}
template<typename SystemType>
SystemIndex System<SystemType>::RegisterSystem()
{
return GetNextIndex();
}
}