From ebb443f0f2d0cbcb7cc2bc0b48aeef9ee314f7bb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 17 Nov 2010 18:05:06 +0200 Subject: Add support for unidirectional object relationships New test: common/relationship. --- common/relationship/tr1-memory.hxx | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 common/relationship/tr1-memory.hxx (limited to 'common/relationship/tr1-memory.hxx') diff --git a/common/relationship/tr1-memory.hxx b/common/relationship/tr1-memory.hxx new file mode 100644 index 0000000..27e9da8 --- /dev/null +++ b/common/relationship/tr1-memory.hxx @@ -0,0 +1,44 @@ +// file : common/relationship/tr1-memory.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TR1_MEMORY_HXX +#define TR1_MEMORY_HXX + +// Try to include TR1 in a compiler-specific manner. Define +// HAVE_TR1_MEMORY if successfull. If the compiler does not provide +// native TR1 support, fall-back on the Boost TR1 implementation if +// HAVE_BOOST_TR1 is defined. +// + +#include // __GLIBCXX__, _HAS_TR1 + +// GNU C++ or Intel C++ using libstd++. +// +#if defined (__GNUC__) && __GNUC__ >= 4 && defined (__GLIBCXX__) +# include +# define HAVE_TR1_MEMORY 1 +// +// IBM XL C++. +// +#elif defined (__xlC__) && __xlC__ >= 0x0900 +# define __IBMCPP_TR1__ +# include +# define HAVE_TR1_MEMORY 1 +// +// VC++ or Intel C++ using VC++ standard library. +// +#elif defined (_MSC_VER) && \ + (_MSC_VER == 1500 && defined (_HAS_TR1) || _MSC_VER > 1500) +# include +# define HAVE_TR1_MEMORY 1 +// +// Boost fall-back. +// +#elif defined (HAVE_BOOST_TR1) +# include +# define HAVE_TR1_MEMORY 1 +#endif + +#endif // TR1_MEMORY_HXX -- cgit v1.1