author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Boost noncopyable.hpp header file --------------------------------------// |
williamr@2 | 2 |
|
williamr@2 | 3 |
// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost |
williamr@2 | 4 |
// Software License, Version 1.0. (See accompanying file |
williamr@2 | 5 |
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
williamr@2 | 6 |
|
williamr@2 | 7 |
// See http://www.boost.org/libs/utility for documentation. |
williamr@2 | 8 |
|
williamr@2 | 9 |
#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED |
williamr@2 | 10 |
#define BOOST_NONCOPYABLE_HPP_INCLUDED |
williamr@2 | 11 |
|
williamr@2 | 12 |
namespace boost { |
williamr@2 | 13 |
|
williamr@2 | 14 |
// Private copy constructor and copy assignment ensure classes derived from |
williamr@2 | 15 |
// class noncopyable cannot be copied. |
williamr@2 | 16 |
|
williamr@2 | 17 |
// Contributed by Dave Abrahams |
williamr@2 | 18 |
|
williamr@2 | 19 |
namespace noncopyable_ // protection from unintended ADL |
williamr@2 | 20 |
{ |
williamr@2 | 21 |
class noncopyable |
williamr@2 | 22 |
{ |
williamr@2 | 23 |
protected: |
williamr@2 | 24 |
noncopyable() {} |
williamr@2 | 25 |
~noncopyable() {} |
williamr@2 | 26 |
private: // emphasize the following members are private |
williamr@2 | 27 |
noncopyable( const noncopyable& ); |
williamr@2 | 28 |
const noncopyable& operator=( const noncopyable& ); |
williamr@2 | 29 |
}; |
williamr@2 | 30 |
} |
williamr@2 | 31 |
|
williamr@2 | 32 |
typedef noncopyable_::noncopyable noncopyable; |
williamr@2 | 33 |
|
williamr@2 | 34 |
} // namespace boost |
williamr@2 | 35 |
|
williamr@2 | 36 |
#endif // BOOST_NONCOPYABLE_HPP_INCLUDED |