[Patch] Implementation of n3793 <experimental/optional>

Luc Danton lucdanton@free.fr
Sat Nov 2 22:19:00 GMT 2013


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?



More information about the Libstdc++ mailing list