aboutsummaryrefslogtreecommitdiff
path: root/common/inverse
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-12-09 10:36:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-12-09 10:36:15 +0200
commit68ca8ec3227d447c6898b7c75d8ea0fb82a4af36 (patch)
tree93d2afa8e23238a87b0b2eb2f702e1910a11fb6b /common/inverse
parent0b4c59824e3b2b0411dd33835c67f6cd36d60a91 (diff)
Add lazy pointer support
Built-in support is provided for raw, auto, and tr1 shared/weak pointers. New test: common/lazy-ptr.
Diffstat (limited to 'common/inverse')
-rw-r--r--common/inverse/tr1-memory.hxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/common/inverse/tr1-memory.hxx b/common/inverse/tr1-memory.hxx
index 76ac932..44d369a 100644
--- a/common/inverse/tr1-memory.hxx
+++ b/common/inverse/tr1-memory.hxx
@@ -1,15 +1,16 @@
// file : common/inverse/tr1-memory.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
-// license : GNU GPL v2; see accompanying LICENSE file
+// copyright : not copyrighted - public domain
#ifndef TR1_MEMORY_HXX
#define TR1_MEMORY_HXX
-// Try to include TR1 <memory> 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.
+//@@ tmp
+#define HAVE_TR1_MEMORY
+
+//
+// Try to include TR1 <memory> in a compiler-specific manner. Fall-back
+// on the Boost TR1 implementation if the compiler does not support TR1.
//
#include <cstddef> // __GLIBCXX__, _HAS_TR1
@@ -18,27 +19,23 @@
//
#if defined (__GNUC__) && __GNUC__ >= 4 && defined (__GLIBCXX__)
# include <tr1/memory>
-# define HAVE_TR1_MEMORY 1
//
// IBM XL C++.
//
#elif defined (__xlC__) && __xlC__ >= 0x0900
# define __IBMCPP_TR1__
# include <memory>
-# 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 <memory>
-# define HAVE_TR1_MEMORY 1
//
// Boost fall-back.
//
-#elif defined (HAVE_BOOST_TR1)
+#else
# include <boost/tr1/memory.hpp>
-# define HAVE_TR1_MEMORY 1
#endif
#endif // TR1_MEMORY_HXX