[llvm-bugs] [Bug 27221] member function of template instantiated even though only declaration is needed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 5 11:10:11 PDT 2016


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
You've misunderstood how copy elision works. The program is analysed according
to the normal language rules (including template instantiation etc), except
that the implementation is permitted to choose to not perform a copy *if it
feels like it*. The definition is still required, because the implementation
could choose to invoke it. (And note that an implementation is not even
required to make the same choice each time it takes the same path through the
same code.)

-- 
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/20160405/3913e5bc/attachment.html>


More information about the llvm-bugs mailing list