1 // boost utility.hpp header file -------------------------------------------//
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
9 // See http://www.boost.org for most recent version including documentation.
11 // Classes appear in alphabetical order
13 #ifndef BOOST_UTILITY_HPP
14 #define BOOST_UTILITY_HPP
16 // certain headers are part of the <utility.hpp> interface
18 #include <boost/checked_delete.hpp>
19 #include <boost/utility/base_from_member.hpp>
20 #include <boost/utility/addressof.hpp>
24 // next() and prior() template functions -----------------------------------//
26 // Helper functions for classes like bidirectional iterators not supporting
27 // operator+ and operator-.
30 // const std::list<T>::iterator p = get_some_iterator();
31 // const std::list<T>::iterator prev = boost::prior(p);
33 // Contributed by Dave Abrahams
36 inline T next(T x) { return ++x; }
39 inline T prior(T x) { return --x; }
42 // class noncopyable -------------------------------------------------------//
44 // Private copy constructor and copy assignment ensure classes derived from
45 // class noncopyable cannot be copied.
47 // Contributed by Dave Abrahams
54 private: // emphasize the following members are private
55 noncopyable( const noncopyable& );
56 const noncopyable& operator=( const noncopyable& );
62 #endif // BOOST_UTILITY_HPP