mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_ADT_OWNING_PTR_H
|
||||
#define LLVM_ADT_OWNING_PTR_H
|
||||
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -25,8 +26,8 @@ namespace llvm {
|
||||
/// pointee object can be taken away from OwningPtr by using the take method.
|
||||
template<class T>
|
||||
class OwningPtr {
|
||||
OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT
|
||||
OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT
|
||||
OwningPtr(OwningPtr const &) LLVM_DELETED_FUNCTION;
|
||||
OwningPtr &operator=(OwningPtr const &) LLVM_DELETED_FUNCTION;
|
||||
T *Ptr;
|
||||
public:
|
||||
explicit OwningPtr(T *P = 0) : Ptr(P) {}
|
||||
@@ -79,8 +80,8 @@ inline void swap(OwningPtr<T> &a, OwningPtr<T> &b) {
|
||||
/// functionality as OwningPtr, except that it works for array types.
|
||||
template<class T>
|
||||
class OwningArrayPtr {
|
||||
OwningArrayPtr(OwningArrayPtr const &); // DO NOT IMPLEMENT
|
||||
OwningArrayPtr &operator=(OwningArrayPtr const &); // DO NOT IMPLEMENT
|
||||
OwningArrayPtr(OwningArrayPtr const &) LLVM_DELETED_FUNCTION;
|
||||
OwningArrayPtr &operator=(OwningArrayPtr const &) LLVM_DELETED_FUNCTION;
|
||||
T *Ptr;
|
||||
public:
|
||||
explicit OwningArrayPtr(T *P = 0) : Ptr(P) {}
|
||||
|
Reference in New Issue
Block a user