[llvm-dev] StringSet copy constructor

Russell Wallace via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 31 08:22:17 PDT 2015

I'm trying to make a string set that has a flag to become the universal
set, and figured StringSet might be a good starting point

struct Selection : StringSet<> {
  bool all;

  Selection(const Selection &selection)
      : StringSet<>(selection), all(selection.all) {}

  Selection(bool all) : all(all) {}

  size_t count(const string &s) const {
    if (all)
      return true;
    return StringSet<>::count(s);

But I get an error when trying to compile

error C2280: 'llvm::StringSet<llvm::MallocAllocator>::StringSet(const
llvm::StringSet<llvm::MallocAllocator> &)': attempting to reference a
deleted function
\llvm\include\llvm/ADT/StringSet.h(31): note: compiler has generated
'llvm::StringSet<llvm::MallocAllocator>::StringSet' here

The indicated line is on my constructor declaration - is this not the right
way to copy a StringSet?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150831/9e28d39f/attachment.html>

More information about the llvm-dev mailing list