Commit 41fca74c authored by Robert Menzel's avatar Robert Menzel

better maintainable compiler detection, icpc and VS2008 detection added

parent 50edd1df
......@@ -39,32 +39,64 @@
*
*/
#if (__cplusplus >= 201103L)
// C++11:
#if ((__cplusplus >= 201103L) || (__STDC_VERSION__ >= 201112L) || defined(__GXX_EXPERIMENTAL_CXX0X__))
// last C++11 draft or final C++11 standart or C++11 via -std=c++0x on gcc:
# include <memory>
namespace ptr = std;
# define ACGL_UNIQUE_POINTER_SUPPORTED 1
#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
// C++11 via -std=c++0x on gcc:
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && ((__GNUC_VERSION__ >= 40400) || defined (__clang__)))
// gcc 4.4 or newer without -std=c++0x or clang++
# include <tr1/memory>
namespace ptr = std::tr1;
# define ACGL_UNIQUE_POINTER_SUPPORTED 0
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && (_MSC_VER >= 1600))
// VStudio 2010 supports some C++11 features
# include <memory>
namespace ptr = std;
# define ACGL_UNIQUE_POINTER_SUPPORTED 1
#else
// C++98 and TR1:
# if (_MSC_VER >= 1600)
// VStudio 2010 supports some C++11 features
# include <memory>
namespace ptr = std;
# define ACGL_UNIQUE_POINTER_SUPPORTED 1
# else
// hope for TR1 equivalents
# include <tr1/memory>
namespace ptr = std::tr1;
# define ACGL_UNIQUE_POINTER_SUPPORTED 0
# endif
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && (_MSC_VER >= 1500))
// VStudio 2008 supports some C++11 features
# include <memory>
namespace ptr = std::tr1;
# define ACGL_UNIQUE_POINTER_SUPPORTED 0
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && defined(__INTEL_COMPILER))
// intel icpc
# include <memory>
namespace ptr = std;
# define ACGL_UNIQUE_POINTER_SUPPORTED 0
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined CORRECT_PTR_INCLUDES_FOUND)
// guessing is needed
# warning "can't detect C++ version or shared pointer variant supported by this compiler -> guessing"
// hope for TR1 equivalents
# include <tr1/memory>
namespace ptr = std::tr1;
# define ACGL_UNIQUE_POINTER_SUPPORTED 0
#endif
#include <ACGL/Base/CompileTimeSettings.hh>
#include <ACGL/Base/Macros.hh>
#include <ACGL/Types.hh>
#include <ACGL/Utils/Log.hh>
......
......@@ -6,6 +6,11 @@
#ifndef ACGL_BASE_MACROS_HH
#define ACGL_BASE_MACROS_HH
#ifndef ACGL_ACGL_HH
# error "Don't include Macros.hh directly, include ACGL.hh"
// some defines below will be set by ACGL.hh!
#endif
//Macro to make a class not copyable
#define ACGL_NOT_COPYABLE(Class) \
private:\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment