Boost logo

Boost :

Subject: Re: [boost] BOOST_FORCE_INLINE
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-10-10 15:03:31


Le 10/10/11 18:51, Mathias Gaunard a écrit :
> On 09/10/2011 18:34, John Maddock wrote:
>>> I would like a BOOST_FORCE_INLINE macro to be added to
>>> boost/config/suffix.hpp
>>>
>> What do you want BOOST_FORCE_INLINE to be replaced for?
>>> Who do I need to contact to make this happen?
>>>
>>>
>>> John is the maintainer.
>>
>> Right, care to supply a patch?
>
> Patch attached.
>
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.

boost/config/suffix.hpp

#if !defined(BOOST_FORCEINLINE)
#define BOOST_FORCEINLINE inline
#endif

boost/config/compiler/gcc.hpp

# if defined(__GNUC__)&& __GNUC__> 3
# define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
# endif

boost/config/compiler/visualc.hpp

# define BOOST_FORCEINLINE __forceinline

Best,
Vicente


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