$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r51155 - sandbox/synchro/boost/synchro/detail
From: vicente.botet_at_[hidden]
Date: 2009-02-09 17:30:51
Author: viboes
Date: 2009-02-09 17:30:50 EST (Mon, 09 Feb 2009)
New Revision: 51155
URL: http://svn.boost.org/trac/boost/changeset/51155
Log:
Boost.Synchro V0.0.0
Added:
   sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp   (contents, props changed)
   sandbox/synchro/boost/synchro/detail/deleted_functions.hpp   (contents, props changed)
   sandbox/synchro/boost/synchro/detail/non_alias.hpp   (contents, props changed)
   sandbox/synchro/boost/synchro/detail/non_heap_allocated.hpp   (contents, props changed)
Added: sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/synchro/boost/synchro/detail/defaulted_functions.hpp	2009-02-09 17:30:50 EST (Mon, 09 Feb 2009)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008.
+// Distributed under the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BOOST_DEFAULTED_FUNCTIONS__HPP
+#define __BOOST_DEFAULTED_FUNCTIONS__HPP
+
+#include <memory>
+#include <boost/config.hpp>
+
+#if defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
+
+    #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T)        \
+      T()=default;                                      \
+
+    #define BOOST_COPY_ASSIGNEMENT_DELETE(T)            \
+      T& operator=(const T& rhs)=default;               \
+
+#else // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
+
+    #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T)        \
+      inline T(){};                                     \
+
+    #define BOOST_COPY_ASSIGNEMENT_DELETE(T)            \
+      inline T& operator=(const T& rhs) {               \
+        T tmp(rhs);                                     \
+        swap(tmp);\
+        return this;\
+      }
+
+#endif // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
\ No newline at end of file
Added: sandbox/synchro/boost/synchro/detail/deleted_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/synchro/boost/synchro/detail/deleted_functions.hpp	2009-02-09 17:30:50 EST (Mon, 09 Feb 2009)
@@ -0,0 +1,152 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008.
+// Distributed under the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BOOST_DELETED_FUNCTIONS__HPP
+#define __BOOST_DELETED_FUNCTIONS__HPP
+
+#include <memory>
+#include <boost/config.hpp>
+
+#if defined(BOOST_HAS_DELETED_FUNCTIONS)
+
+#define BOOST_DESTRUCTOR_DELETE(T)                  \
+  ~T()=delete;
+
+#define BOOST_DEFAULT_CONSTRUCTOR_DELETE(T)         \
+  T()=delete;
+
+#define BOOST_COPY_CONSTRUCTOR_DELETE(T)            \
+  T(const T&)=delete;
+
+#define BOOST_COPY_ASSIGNEMENT_DELETE(T)            \
+  const T& operator=(const T&)=delete;
+
+#define BOOST_SEQUENCE_DELETE(T)                    \
+  T operator,(T)=delete;
+
+#define BOOST_ADRESS_OF_DELETE(T)                   \
+  const T* operator&() const =delete;
+
+#define BOOST_NON_CONST_ADRESS_OF_DELETE(T)         \
+  T* operator&()=delete;
+
+#define BOOST_INDIRECTION_DELETE(T)                 \
+  const T& operator*() const =delete;
+
+#define BOOST_NON_CONST_INDIRECTION_DELETE(T)       \
+  T& operator*()=delete;
+
+#define BOOST_MEMBER_ACCESS_DELETE(T)               \
+  const T* operator->() const =delete;
+
+#define BOOST_NON_CONST_MEMBER_ACCESS_DELETE(T)     \
+  T* operator->()=delete;
+
+#define BOOST_NEW_DELETE(T)                         \
+  void* operator new(unsigned)=delete;
+
+#define BOOST_NEW_ARRAY_DELETE(T)                   \
+  void* operator new[](unsigned)=delete;
+
+#define BOOST_NEW_PLACEMENT_DELETE(T)               \
+  void operator delete(void*, unsigned)=delete;
+
+#define BOOST_NEW_ARRAY_PLACEMENT_DELETE(T)         \
+  void operator delete[](void*, unsigned)=delete;
+
+#else // !defined(BOOST_HAS_DELETED_FUNCTIONS)
+
+#define BOOST_DESTRUCTOR_DELETE(T)                  \
+private:                                            \
+  ~T();                                             \
+public:
+
+#define BOOST_DEFAULT_CONSTRUCTOR_DELETE(T)         \
+private:                                            \
+  T();                                              \
+public:
+
+#define BOOST_COPY_CONSTRUCTOR_DELETE(T)            \
+private:                                            \
+  T(const T&);                                      \
+public:
+
+#define BOOST_COPY_ASSIGNEMENT_DELETE(T)            \
+private:                                            \
+  const T& operator=(const T&);                     \
+public:
+
+#define BOOST_SEQUENCE_DELETE(T)                    \
+private:                                            \
+  T operator,(T);                                   \
+public:
+
+#define BOOST_ADRESS_OF_DELETE(T)                   \
+private:                                            \
+  const T* operator&() const;                       \
+public:
+
+#define BOOST_NON_CONST_ADRESS_OF_DELETE(T)         \
+private:                                            \
+  T* operator&();                                   \
+public:
+
+#define BOOST_INDIRECTION_DELETE(T)                 \
+private:                                            \
+  const T& operator*() const;                       \
+public:
+
+#define BOOST_NON_CONST_INDIRECTION_DELETE(T)       \
+private:                                            \
+  T& operator*();                                   \
+public:
+
+#define BOOST_MEMBER_ACCESS_DELETE(T)               \
+private:                                            \
+  const T* operator->() const;                      \
+public:
+
+#define BOOST_NON_CONST_MEMBER_ACCESS_DELETE(T)     \
+private:                                            \
+  T* operator->();                                  \
+public:
+
+#define BOOST_NEW_DELETE(T)                         \
+private:                                            \
+  void* operator new(unsigned);                     \
+public:
+
+#define BOOST_NEW_ARRAY_DELETE(T)                   \
+private:                                            \
+  void* operator new[](unsigned);                   \
+public:
+
+#define BOOST_NEW_PLACEMENT_DELETE(T)               \
+private:                                            \
+  void operator delete(void*, unsigned);            \
+public:
+
+#define BOOST_NEW_ARRAY_PLACEMENT_DELETE(T)         \
+private:                                            \
+  void operator delete[](void*, unsigned);          \
+public:
+
+#endif
+
+#define BOOST_HEAP_ALLOCATEION_DELETE(T)            \
+    BOOST_NEW_DELETE(T)                             \
+    BOOST_NEW_ARRAY_DELETE(T)                       \
+    BOOST_NEW_PLACEMENT_DELETE(T)                   \
+    BOOST_NEW_ARRAY_PLACEMENT_DELETE(T)
+
+#endif // !defined(BOOST_HAS_DELETED_FUNCTIONS)
+
+
Added: sandbox/synchro/boost/synchro/detail/non_alias.hpp
==============================================================================
--- (empty file)
+++ sandbox/synchro/boost/synchro/detail/non_alias.hpp	2009-02-09 17:30:50 EST (Mon, 09 Feb 2009)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BOOST_SYNCHRO_DETAIL_NON_ALIAS__HPP
+#define __BOOST_SYNCHRO_DETAIL_NON_ALIAS__HPP
+/**
+* avoids aliasing by using a technique:
+* disable address taking.
+*/
+#define BOOST_SYNCHRO_NON_ALIAS(T)   \
+    T* operator&();     \
+
+
+#endif
Added: sandbox/synchro/boost/synchro/detail/non_heap_allocated.hpp
==============================================================================
--- (empty file)
+++ sandbox/synchro/boost/synchro/detail/non_heap_allocated.hpp	2009-02-09 17:30:50 EST (Mon, 09 Feb 2009)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BOOST_SYNCHRO_DETAIL_NON_HEAP_ALLOCATED__HPP
+#define __BOOST_SYNCHRO_DETAIL_NON_HEAP_ALLOCATED__HPP
+/**
+* avoids allocation on the heap by using a technique:
+* disable operator new and operator delete.
+*/
+#include <memory>
+#define BOOST_SYNCHRO_NON_HEAP_ALLOCATED(T)         \
+private:                                    \
+  void* operator new(unsigned);             \
+  void* operator new[](unsigned);           \
+  void operator delete(void*, unsigned);    \
+  void operator delete[](void*, unsigned);  \
+
+#endif