[LLVMdev] Inline hint for methods defined in-class
Chandler Carruth
chandlerc at google.com
Wed Jul 8 22:41:44 PDT 2015
On Wed, Jul 8, 2015 at 2:39 PM Krzysztof Parzyszek <kparzysz at codeaurora.org>
wrote:
> On 6/24/2015 4:52 PM, Robinson, Paul wrote:
> >
> > The patch causes all in-class-defined methods to be treated as if
> > they had the 'inline' keyword attached.
> > Therefore, with the patch, explicitly adding the 'inline' keyword to
> > these methods has no effect; it becomes noise.
>
> It is redundant. Why is this a concern? IIRC, the C++ standard has
> always defined in-class functions as "inline".
> I have always treated in-class functions as inline whenever I wrote
> them. I'm surprised to hear that there are people who are unaware of
> this relationship, as this is a fairly basic feature of C++.
> I think we should treat these functions the way the standard requires it.
>
Note, we already give these functions all of the semantics *required* by
the standard for functionality. The *only* issue here is an optimization
hint.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150709/ae486f7b/attachment.html>
More information about the llvm-dev
mailing list