File: noncopyable.h

package info (click to toggle)
mldemos 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,224 kB
  • ctags: 46,525
  • sloc: cpp: 306,887; ansic: 167,718; ml: 126; sh: 109; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//  (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//  Contributed by Dave Abrahams
//  See http://www.boost.org/libs/utility for documentation.

#ifndef DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED
#define DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED

#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED
#define BOOST_NONCOPYABLE_HPP_INCLUDED

namespace boost 
{

    namespace noncopyable_  // protection from unintended ADL
    {
        class noncopyable
        {
            /*!
                This class makes it easier to declare a class as non-copyable. 
                If you want to make an object that can't be copied just inherit
                from this object.
            !*/

        protected:
            noncopyable() {}
            ~noncopyable() {}
        private:  // emphasize the following members are private
            noncopyable( const noncopyable& );
            const noncopyable& operator=( const noncopyable& );
        };
    }

    typedef noncopyable_::noncopyable noncopyable;

} // namespace boost

#endif // BOOST_NONCOPYABLE_HPP_INCLUDED

namespace dlib
{
    using boost::noncopyable;
}

#endif  // DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED