X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Futility.hpp;h=211d89d67ef6495dabc753db1c1fb75f32ad00be;hb=94da7f7c835a9b2b45f9c8c2b1a5dd16683cc25b;hp=fa99b9a14818c2da81ec116992415c36d73bf657;hpb=70479c5282509b94f1c5c71db680b7f2d88db96a;p=lyx.git diff --git a/boost/boost/utility.hpp b/boost/boost/utility.hpp index fa99b9a148..211d89d67e 100644 --- a/boost/boost/utility.hpp +++ b/boost/boost/utility.hpp @@ -1,94 +1,19 @@ -// boost utility.hpp header file -------------------------------------------// +// Boost utility.hpp header file -------------------------------------------// -// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell -// and distribute this software is granted provided this copyright -// notice appears in all copies. This software is provided "as is" without -// express or implied warranty, and with no claim as to its suitability for -// any purpose. +// Copyright 1999-2003 Aleksey Gurtovoy. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) -// See http://www.boost.org for most recent version including documentation. - -// Classes appear in alphabetical order - -// Revision History -// 21 May 01 checked_delete() and checked_array_delete() added (Beman Dawes, -// suggested by Dave Abrahams, generalizing idea from Vladimir Prus) -// 21 May 01 made next() and prior() inline (Beman Dawes) -// 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) +// See for the library's home page. #ifndef BOOST_UTILITY_HPP #define BOOST_UTILITY_HPP -#include // broken compiler workarounds -#include -#include // for size_t -#include // for std::pair - -namespace boost -{ -// checked_delete() and checked_array_delete() -----------------------------// - - // verify that types are complete for increased safety - - template< typename T > - inline void checked_delete(T * x) - { - BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point - // of instantiation - delete x; - } - - template< typename T > - inline void checked_array_delete(T * x) - { - BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point - // of instantiation - delete [] x; - } - -// next() and prior() template functions -----------------------------------// - - // Helper functions for classes like bidirectional iterators not supporting - // operator+ and operator-. - // - // Usage: - // const std::list::iterator p = get_some_iterator(); - // const std::list::iterator prev = boost::prior(p); - - // Contributed by Dave Abrahams - - template - inline T next(T x) { return ++x; } - - template - inline T prior(T x) { return --x; } - - -// class noncopyable -------------------------------------------------------// - - // Private copy constructor and copy assignment ensure classes derived from - // class noncopyable cannot be copied. - - // Contributed by Dave Abrahams - - class noncopyable - { - protected: - noncopyable(){} - ~noncopyable(){} - private: // emphasize the following members are private - noncopyable( const noncopyable& ); - const noncopyable& operator=( const noncopyable& ); - }; // noncopyable - - -} // namespace boost +#include +#include +#include +#include +#include +#include #endif // BOOST_UTILITY_HPP -