noncopyable.hpp
Go to the documentation of this file.
00001 //
00002 // noncopyable.hpp
00003 // ~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_DETAIL_NONCOPYABLE_HPP
00012 #define ASIO_DETAIL_NONCOPYABLE_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/config.hpp>
00022 #include <boost/noncopyable.hpp>
00023 #include <boost/detail/workaround.hpp>
00024 #include "asio/detail/pop_options.hpp"
00025 
00026 namespace asio {
00027 namespace detail {
00028 
00029 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
00030 // Redefine the noncopyable class for Borland C++ since that compiler does not
00031 // apply the empty base optimisation unless the base class contains a dummy
00032 // char data member.
00033 class noncopyable
00034 {
00035 protected:
00036   noncopyable() {}
00037   ~noncopyable() {}
00038 private:
00039   noncopyable(const noncopyable&);
00040   const noncopyable& operator=(const noncopyable&);
00041   char dummy_;
00042 };
00043 #else
00044 using boost::noncopyable;
00045 #endif
00046 
00047 } // namespace detail
00048 
00049 using asio::detail::noncopyable;
00050 
00051 } // namespace asio
00052 
00053 #include "asio/detail/pop_options.hpp"
00054 
00055 #endif // ASIO_DETAIL_NONCOPYABLE_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39