You can make the copy constructor private and provide no implementation:
private:
SymbolIndexer(const SymbolIndexer&);
Or in C++11, explicitly forbid it:
SymbolIndexer(const SymbolIndexer&) = delete;
More Related Contents:
- Is the copy constructor always called when returning by value in C++ [duplicate]
- What is The Rule of Three?
- What is the copy-and-swap idiom?
- Conditions for automatic generation of default/copy/move ctor and copy/move assignment operator?
- Dynamically allocating an array of objects
- Why should the copy constructor accept its parameter by reference in C++?
- What is a converting constructor in C++ ? What is it for?
- Why copy constructor is not called in this case?
- Why must the copy assignment operator return a reference/const reference?
- std::thread pass by reference calls copy constructor
- Copy constructor and = operator overload in C++: is a common function possible?
- When do we have to use copy constructors?
- Why user-defined move-constructor disables the implicit copy-constructor?
- Copy constructor is not inherited
- Why is this code trying to call the copy constructor?
- C++ template copy constructor on template class
- How do I make this C++ object non-copyable?
- What’s the most reliable way to prohibit a copy constructor in C++?
- Can we return objects having a deleted/private copy/move constructor by value from a function?
- What’s the use of the private copy constructor in c++
- Why is copy constructor called instead of conversion constructor?
- Why C++ copy constructor must use const object?
- Explicit copy constructor
- Calling assignment operator in copy constructor
- Why is the copy constructor called when we pass an object as an argument by value to a method?
- Why am I not provided with a default copy constructor from a volatile?
- Uniform initialization fails to copy when object has no data members
- Why aren’t copy constructors “chained” like default constructors and destructors?
- C++ Copy constructor gets called instead of initializer_list
- C++ copy-construct construct-and-assign question