Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2022-09-23 07:18:24


On 9/23/22 00:31, Peter Dimov via Boost wrote:
> Frank Mori Hess wrote:
>> On Thu, Sep 22, 2022 at 8:57 AM Peter Dimov <pdimov_at_[hidden]> wrote:
>>>
>>> That's complete nonsense. First, Microsoft invented __forceinline, so
>>> making BOOST_FORCEINLINE be a no-op on the very compiler for which the
>>> feature has been added would be ridiculous. Second, it does force
>>> inlining, that's why it's called __forceinline. The whole point of the
>>> warning is to warn about the rare cases where the compiler does not
>>> honor the command; it exists because people want to know whether their
>>> "force inline" orders are ignored.
>>
>> But no boost user wants to be warned about some internal implementation
>> detail of a boost library.
>
> Yes of course. But users do want to be warned about their own code. And if
> Boost.Config disables the warning, they won't be, even if they don't use
> variant at all.

Maybe we could use __pragma in BOOST_FORCEINLINE on a recent enough MSVC?

https://godbolt.org/z/oh5szGd4r


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk