STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
noncopyable.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/noncopyable.h
3  *
4  * Inspired by boost::noncopyable.
5  *
6  * Part of the STXXL. See http://stxxl.sourceforge.net
7  *
8  * Copyright (C) 2007 Andreas Beckmann <[email protected]>
9  *
10  * Distributed under the Boost Software License, Version 1.0.
11  * (See accompanying file LICENSE_1_0.txt or copy at
12  * http://www.boost.org/LICENSE_1_0.txt)
13  **************************************************************************/
14 
15 #ifndef STXXL_NONCOPYABLE_HEADER
16 #define STXXL_NONCOPYABLE_HEADER
17 
18 #include <stxxl/bits/config.h>
19 #include <stxxl/bits/namespace.h>
20 
21 #if STXXL_BOOST_CONFIG
22  #include <boost/noncopyable.hpp>
23 #endif
24 
26 
27 #if STXXL_BOOST_CONFIG
28 
29 typedef boost::noncopyable noncopyable;
30 
31 #else
32 
34 {
35 protected:
37 
38 private:
39  // copying and assignment is not allowed
40  noncopyable(const noncopyable&);
41  const noncopyable& operator = (const noncopyable&);
42 };
43 
44 #endif
45 
47 
48 #endif // !STXXL_NONCOPYABLE_HEADER
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
#define STXXL_END_NAMESPACE
Definition: namespace.h:17