]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/utility.hpp
complie fix
[lyx.git] / boost / boost / utility.hpp
index 82a7d13219fcc8aaba987b203c62b3c5db2b9ec4..a6c9464bff37d19e076c6c01a0e50dffc92446a1 100644 (file)
 
 //  Classes appear in alphabetical order
 
-//  Revision History
-//  26 Jan 00  protected noncopyable destructor added (Miki Jovanovic)
-//  10 Dec 99  next() and prior() templates added (Dave Abrahams)
-//  30 Aug 99  moved cast templates to cast.hpp (Beman Dawes)
-//   3 Aug 99  cast templates added
-//  20 Jul 99  name changed to utility.hpp 
-//   9 Jun 99  protected noncopyable default ctor
-//   2 Jun 99  Initial Version. Class noncopyable only contents (Dave Abrahams)
-
 #ifndef BOOST_UTILITY_HPP
 #define BOOST_UTILITY_HPP
 
-#include <boost/config.hpp>
-#include <cstddef>            // for size_t
-#include <utility>            // for std::pair
+// certain headers are part of the <utility.hpp> interface
+
+#include <boost/checked_delete.hpp>
+#include <boost/utility/base_from_member.hpp>  
+#include <boost/utility/addressof.hpp>
 
 namespace boost
 {
-
 //  next() and prior() template functions  -----------------------------------//
 
     //  Helper functions for classes like bidirectional iterators not supporting
@@ -41,10 +33,10 @@ namespace boost
     //  Contributed by Dave Abrahams
 
     template <class T>
-    T next(T x) { return ++x; }
+    inline T next(T x) { return ++x; }
 
     template <class T>
-    T prior(T x) { return --x; }
+    inline T prior(T x) { return --x; }
 
 
 //  class noncopyable  -------------------------------------------------------//
@@ -64,31 +56,6 @@ namespace boost
         const noncopyable& operator=( const noncopyable& );
     }; // noncopyable
 
-//  class tied  -------------------------------------------------------//
-
-    // A helper for conveniently assigning the two values from a pair
-    // into separate variables. The idea for this comes from Jaakko J\84rvi's
-    // Binder/Lambda Library.
-
-    // Constributed by Jeremy Siek
-
-    template <class A, class B>
-    class tied {
-    public:
-      inline tied(A& a, B& b) : _a(a), _b(b) { }
-      template <class U, class V>
-      inline tied& operator=(const std::pair<U,V>& p) {
-        _a = p.first;
-        _b = p.second;
-        return *this;
-      }
-    protected:
-      A& _a;
-      B& _b;
-    };
-
-    template <class A, class B>
-    inline tied<A,B> tie(A& a, B& b) { return tied<A,B>(a, b); }
 
 } // namespace boost