Re: [cxx-abi-dev] Key functions and templates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cxx-abi-dev] Key functions and templates
- To: Lawrence Crowl <crowl@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] Key functions and templates
- From: Zbigniew Sarbinowski <zibi@xxxxxxxxxx>
- Date: Mon, 22 Feb 2010 23:58:01 -0500
Lawrence Crowl <crowl@xxxxxxxxxx> wrote on 02/22/2010 06:45:25 PM:
> One could argue that it is not "always declared inline" because
> there is not inline declaration in t2.cpp. That interpretation is
> consistent with the standard, so I wouldn't want to rule it out.
Yeap, you're right but other interpretation could argue that since
this function is considered inline but not used in t1.cpp why would
we want to generate its body in this CU?
Your argument also shows that this is invalid since no inline function
used in t2.cpp should be defined either within the same CU or elsewhere as
no
inline function. This comes down to inconsistency of marking this function
as inline.
If this function is inline in t1.cpp but not used nothing is stopping to
not generate
this function since we know that if it's used elsewhere (like in t2.cpp) it
should also be
defined there.