add a noncopyable base class for decompositions

This commit is contained in:
Gael Guennebaud
2012-06-04 13:21:15 +02:00
parent 1b20e16546
commit a2ae063491
5 changed files with 19 additions and 4 deletions

View File

@@ -103,6 +103,21 @@ template<bool Condition, typename T> struct enable_if;
template<typename T> struct enable_if<true,T>
{ typedef T type; };
/** \internal
* A base class do disable default copy ctor and copy assignement operator.
*/
class noncopyable
{
noncopyable(const noncopyable&);
const noncopyable& operator=(const noncopyable&);
protected:
noncopyable() {}
~noncopyable() {}
};
/** \internal
* Convenient struct to get the result type of a unary or binary functor.
*