This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Implementation of n3793 <experimental/optional>


On 2013-11-02 19:02, Paolo Carlini wrote:

Can you expand? I think it's just as much inline as the other overload
-- does it need to be different?
The other overload is constexpr thus it's implicitly inline. The fall back is very simple too and I think it should be declared inline, unless you analyzed the assembly and believe it normally boils down to more than, say, 5 instructions.

Paolo


I see. It didn't occur to me to declare it inline, as I only ever use the keyword to satisfy
ODR requirements. E.g. the non-member swap isn't declared inline either.

For future reference, is there a rule of thumb in use?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]