]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/aligned_storage.hpp
Also display the info about BibTeX databases in the TeX info panel.
[lyx.git] / boost / boost / aligned_storage.hpp
index cfaf7877a1551cbf1b804935c123bfc3538bf3ba..ce277ab702ad4db26644b86bebce1b74eab59dec 100644 (file)
@@ -54,6 +54,14 @@ struct aligned_storage_imp
             , type_with_alignment<alignment_>
             >::type align_;
     } data_;
+    void* address() const { return const_cast<aligned_storage_imp*>(this); }
+};
+
+template< std::size_t alignment_ >
+struct aligned_storage_imp<0u,alignment_>
+{
+    /* intentionally empty */
+    void* address() const { return 0; }
 };
 
 }} // namespace detail::aligned_storage
@@ -62,12 +70,15 @@ template <
       std::size_t size_
     , std::size_t alignment_ = std::size_t(-1)
 >
-class aligned_storage
+class aligned_storage : 
+#ifndef __BORLANDC__
+   private 
+#else
+   public
+#endif
+   detail::aligned_storage::aligned_storage_imp<size_, alignment_> 
 {
-private: // representation
-
-   detail::aligned_storage::aligned_storage_imp<size_, alignment_> data_;
-
 public: // constants
 
     typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type;
@@ -118,14 +129,14 @@ public: // accessors
 
     void* address()
     {
-        return this;
+        return static_cast<type*>(this)->address();
     }
 
 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
 
     const void* address() const
     {
-        return this;
+        return static_cast<const type*>(this)->address();
     }
 
 #else // MSVC6