[llvm-bugs] [Bug 28088] New: compilation error when copy constructor for llvm::ilist is called

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 11 13:19:43 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28088

            Bug ID: 28088
           Summary: compilation error when copy constructor for
                    llvm::ilist is called
           Product: new-bugs
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: other.nikita at mail.ru
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

It is not possible to copy object of type llvm::ilist although copy constructor
is available. When I try to use it a compilation error occures.

There are some problem in the `iplist::insert()` method which is invoked by the
 copy constructor:

    ilist(const ilist &right) {
      insert(this->begin(), right.begin(), right.end());
    }

    template<class InIt> void insert(iterator where, InIt first, InIt last) {
      for (; first != last; ++first) insert(where, *first);
    }

This template `insert()` method try to invoke the following method
    iterator iplist::insert(iterator where, NodeTy *New)

But type of the second argument is not a pointer it is a reference (`*first`)
to `NodeTy`.

So, there is no matching function for call.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160611/960f6554/attachment.html>


More information about the llvm-bugs mailing list