mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
cee8f9ae67
from "llvm/Support/..." that are not llvm dependant. Move files and fix #includes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
//===-- NonCopyable.h - Disable copy ctor and op= in subclasses --*- C++ -*--=//
|
|
//
|
|
// This file defines the NonCopyable and NonCopyableV classes. These mixin
|
|
// classes may be used to mark a class not being copyable. You should derive
|
|
// from NonCopyable if you don't want to have a virtual dtor, or NonCopyableV
|
|
// if you do want polymorphic behavior in your class.
|
|
//
|
|
// No library is required when using these functinons.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_SUPPORT_NONCOPYABLE_H
|
|
#define LLVM_SUPPORT_NONCOPYABLE_H
|
|
|
|
class NonCopyable {
|
|
// Disable the copy constructor and the assignment operator
|
|
// by making them both private:
|
|
//
|
|
NonCopyable(const NonCopyable &); // DO NOT IMPLEMENT
|
|
NonCopyable &operator=(const NonCopyable &); // DO NOT IMPLEMENT
|
|
protected:
|
|
inline NonCopyable() {}
|
|
inline ~NonCopyable() {}
|
|
};
|
|
|
|
class NonCopyableV {
|
|
// Disable the copy constructor and the assignment operator
|
|
// by making them both private:
|
|
//
|
|
NonCopyableV(const NonCopyableV &); // DO NOT IMPLEMENT
|
|
NonCopyableV &operator=(const NonCopyableV &); // DO NOT IMPLEMENT
|
|
protected:
|
|
inline NonCopyableV() {}
|
|
virtual ~NonCopyableV() {}
|
|
};
|
|
|
|
#endif
|