Fix compilation under VS2015

Former-commit-id: fb7b3f377e34ea0c44a7fc65efbdb059581d772b
This commit is contained in:
Lynix 2015-06-13 17:14:19 +02:00
parent 1a92fe331c
commit 504eb96b93
3 changed files with 20 additions and 12 deletions

View File

@ -101,7 +101,7 @@ template<typename... Args>
class NzSignal<Args...>::ConnectionGuard class NzSignal<Args...>::ConnectionGuard
{ {
using BaseClass = NzSignal<Args...>; using BaseClass = NzSignal<Args...>;
using Connection = BaseClass::Connection; using Connection = typename BaseClass::Connection;
public: public:
ConnectionGuard() = default; ConnectionGuard() = default;

View File

@ -25,28 +25,21 @@
#ifndef NAZARA_PREREQUESITES_HPP #ifndef NAZARA_PREREQUESITES_HPP
#define NAZARA_PREREQUESITES_HPP #define NAZARA_PREREQUESITES_HPP
#if !defined(__cplusplus) || __cplusplus < 201103L
#error Nazara requires a C++11 compliant compiler
#endif
// Version du moteur
#define NAZARA_VERSION_MAJOR 0
#define NAZARA_VERSION_MINOR 1
#include <Nazara/Core/Config.hpp>
// Identification du compilateur // Identification du compilateur
///TODO: Rajouter des tests d'identification de compilateurs ///TODO: Rajouter des tests d'identification de compilateurs
#if defined(__BORLANDC__) #if defined(__BORLANDC__)
#define NAZARA_COMPILER_BORDLAND #define NAZARA_COMPILER_BORDLAND
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
#define NAZARA_DEPRECATED(txt) #define NAZARA_DEPRECATED(txt)
#define NAZARA_FUNCTION __FUNC__ #define NAZARA_FUNCTION __FUNC__
#elif defined(__clang__) #elif defined(__clang__)
#define NAZARA_COMPILER_CLANG #define NAZARA_COMPILER_CLANG
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt))) #define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
#define NAZARA_FUNCTION __PRETTY_FUNCTION__ #define NAZARA_FUNCTION __PRETTY_FUNCTION__
#elif defined(__GNUC__) || defined(__MINGW32__) #elif defined(__GNUC__) || defined(__MINGW32__)
#define NAZARA_COMPILER_GCC #define NAZARA_COMPILER_GCC
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt))) #define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
#define NAZARA_FUNCTION __PRETTY_FUNCTION__ #define NAZARA_FUNCTION __PRETTY_FUNCTION__
@ -58,21 +51,35 @@
#endif #endif
#elif defined(__INTEL_COMPILER) || defined(__ICL) #elif defined(__INTEL_COMPILER) || defined(__ICL)
#define NAZARA_COMPILER_INTEL #define NAZARA_COMPILER_INTEL
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
#define NAZARA_DEPRECATED(txt) #define NAZARA_DEPRECATED(txt)
#define NAZARA_FUNCTION __FUNCTION__ #define NAZARA_FUNCTION __FUNCTION__
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#define NAZARA_COMPILER_MSVC #define NAZARA_COMPILER_MSVC
#define NAZARA_COMPILER_SUPPORTS_CPP11 (_MSC_VER >= 1900)
#define NAZARA_DEPRECATED(txt) __declspec(deprecated(txt)) #define NAZARA_DEPRECATED(txt) __declspec(deprecated(txt))
#define NAZARA_FUNCTION __FUNCSIG__ #define NAZARA_FUNCTION __FUNCSIG__
#pragma warning(disable: 4251)
#else #else
#define NAZARA_COMPILER_UNKNOWN #define NAZARA_COMPILER_UNKNOWN
#define NAZARA_DEPRECATED(txt) #define NAZARA_DEPRECATED(txt)
#define NAZARA_FUNCTION __func__ // __func__ est standard depuis le C++11 #define NAZARA_FUNCTION __func__ // __func__ est standard depuis le C++11
/// Cette ligne n'est là que pour prévenir, n'hésitez pas à la commenter si elle vous empêche de compiler /// Cette ligne n'est là que pour prévenir, n'hésitez pas à la commenter si elle vous empêche de compiler
#error This compiler is not fully supported #pragma message This compiler is not fully supported
#endif #endif
#if !NAZARA_COMPILER_SUPPORTS_CPP11
#error Nazara requires a C++11 compliant compiler
#endif
// Version du moteur
#define NAZARA_VERSION_MAJOR 0
#define NAZARA_VERSION_MINOR 1
#include <Nazara/Core/Config.hpp>
// Identification de la plateforme // Identification de la plateforme
#if defined(_WIN32) #if defined(_WIN32)
#define NAZARA_PLATFORM_WINDOWS #define NAZARA_PLATFORM_WINDOWS

View File

@ -11,6 +11,7 @@
#include <Nazara/Core/Unicode.hpp> #include <Nazara/Core/Unicode.hpp>
#include <Nazara/Math/Algorithm.hpp> #include <Nazara/Math/Algorithm.hpp>
#include <algorithm> #include <algorithm>
#include <cctype>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include <limits> #include <limits>