Subject: Re: [boost] BOOST_FORCE_INLINE
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-10-10 18:16:46
Le 10/10/11 23:27, Mathias Gaunard a écrit :
> On 10/10/2011 09:03 PM, Vicente J. Botet Escriba wrote:
>> I don't know if the better place to define these macros is in the
>> suffix.hpp file. This file is intendeed to define macros that can be
>> defined independently of compiler versions or platforms. IMO the good
>> place is to include them in the specific compiler file, and define them
>> as empty in suffix if not already defined.
>> #if !defined(BOOST_FORCEINLINE)
>> #define BOOST_FORCEINLINE inline
>> # if defined(__GNUC__)&& __GNUC__> 3
>> # define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
>> # endif
>> # define BOOST_FORCEINLINE __forceinline
> Those macros are for compilers that behave like GCC and those that
> behave like MSVC, and are not restricted to the real GCC or MSVC; I
> don't know if placing them in those files will be enough.
> Also, it seems to me those files are only used for the BOOST_NO_XXX
> family of macros.
I don't know exactly what was exactly the philosophy and if it is only
for NO_XXX macros. IMO, modifying the suffix.hpp file each time we know
about a new compiler/version that could implement BOOST_FORCEINLINE in
some way is not a good approach. Specificities of the compiler should go
the the specific compiler.name.hpp file.
Of course this is not really important. and I can live with it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk