]> git.lyx.org Git - lyx.git/blob - boost/boost/utility.hpp
complie fix
[lyx.git] / boost / boost / utility.hpp
1 //  boost utility.hpp header file  -------------------------------------------//
2
3 //  (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
4 //  and distribute this software is granted provided this copyright
5 //  notice appears in all copies. This software is provided "as is" without
6 //  express or implied warranty, and with no claim as to its suitability for
7 //  any purpose.
8
9 //  See http://www.boost.org for most recent version including documentation.
10
11 //  Classes appear in alphabetical order
12
13 #ifndef BOOST_UTILITY_HPP
14 #define BOOST_UTILITY_HPP
15
16 // certain headers are part of the <utility.hpp> interface
17
18 #include <boost/checked_delete.hpp>
19 #include <boost/utility/base_from_member.hpp>  
20 #include <boost/utility/addressof.hpp>
21
22 namespace boost
23 {
24 //  next() and prior() template functions  -----------------------------------//
25
26     //  Helper functions for classes like bidirectional iterators not supporting
27     //  operator+ and operator-.
28     //
29     //  Usage:
30     //    const std::list<T>::iterator p = get_some_iterator();
31     //    const std::list<T>::iterator prev = boost::prior(p);
32
33     //  Contributed by Dave Abrahams
34
35     template <class T>
36     inline T next(T x) { return ++x; }
37
38     template <class T>
39     inline T prior(T x) { return --x; }
40
41
42 //  class noncopyable  -------------------------------------------------------//
43
44     //  Private copy constructor and copy assignment ensure classes derived from
45     //  class noncopyable cannot be copied.
46
47     //  Contributed by Dave Abrahams
48
49     class noncopyable
50     {
51     protected:
52         noncopyable(){}
53         ~noncopyable(){}
54     private:  // emphasize the following members are private
55         noncopyable( const noncopyable& );
56         const noncopyable& operator=( const noncopyable& );
57     }; // noncopyable
58
59
60 } // namespace boost
61
62 #endif  // BOOST_UTILITY_HPP
63