Skip to content

compilation error when copy constructor for llvm::ilist is called #28462

Open
@llvmbot

Description

@llvmbot
Bugzilla Link28088
Version3.7
OSLinux
ReporterLLVM Bugzilla Contributor

Extended Description

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<classInIt> voidinsert(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close