Skip to content

Commit

Permalink
Changed noncopyable.h to avoid a name clash with boost 1.56
Browse files Browse the repository at this point in the history
  • Loading branch information
davisking committed Sep 5, 2014
1 parent 1ff7cd1 commit f61432c
Showing 1 changed file with 16 additions and 31 deletions.
47 changes: 16 additions & 31 deletions dlib/noncopyable.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,25 @@
#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;
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&);

};
}

#endif // DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED
Expand Down

0 comments on commit f61432c

Please sign in to comment.