Explicitly delete copy c-tor + copy operator to for Visual Studio.

VS requires to have copy operations disabled on classes which hold vectors of unique pointers (clang is a bit more relaxed about this).
This commit is contained in:
Mike Lischke 2016-06-13 17:38:57 +02:00
parent 7488621983
commit 7ac5252fe9
3 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,9 @@ namespace antlr4 {
class ANTLR4CPP_PUBLIC BufferedTokenStream : public TokenStream {
public:
BufferedTokenStream(TokenSource *tokenSource);
BufferedTokenStream(const BufferedTokenStream& other) = delete;
BufferedTokenStream& operator = (const BufferedTokenStream& other) = delete;
virtual TokenSource* getTokenSource() const override;
virtual size_t index() override;

View File

@ -76,6 +76,9 @@ namespace antlr4 {
/// <seealso cref="TokenSource"/>. </param>
/// <exception cref="NullPointerException"> if {@code tokens} is {@code null} </exception>
ListTokenSource(std::vector<std::unique_ptr<Token>> tokens);
ListTokenSource(const ListTokenSource& other) = delete;
ListTokenSource& operator = (const ListTokenSource& other) = delete;
/// <summary>
/// Constructs a new <seealso cref="ListTokenSource"/> instance from the specified

View File

@ -39,8 +39,11 @@ namespace antlr4 {
public:
UnbufferedTokenStream(TokenSource *tokenSource);
UnbufferedTokenStream(TokenSource *tokenSource, int bufferSize);
UnbufferedTokenStream(const UnbufferedTokenStream& other) = delete;
virtual ~UnbufferedTokenStream();
UnbufferedTokenStream& operator = (const UnbufferedTokenStream& other) = delete;
virtual Token* get(size_t i) const override;
virtual Token* LT(ssize_t i) override;
virtual ssize_t LA(ssize_t i) override;