Boost logo

Boost Users :

From: Michael Nicolella (boost_at_[hidden])
Date: 2006-07-14 13:20:22


Why don't you trust your compiler to decide when inlining a function is a
good choice for an optimization? :)

-----Original Message-----
From: Artem Alimarine [mailto:artem_at_[hidden]]
Sent: Friday, July 14, 2006 6:59 AM
To: boost-users_at_[hidden]
Subject: [Boost-users] force inline

Hi all,

Is there a macro in boost for something like MSVC __forceinline.
Currently I have in the project:

#if defined __GNUC__
     #define FORCE_INLINE __attribute__((always_inline))
     #define NO_INLINE __attribute__((noinline))
#elif defined _MSC_VER
     #define FORCE_INLINE __forceinline
     #define NO_INLINE __declspec(noinline)
#else
     //#error "no inlines"
     #define FORCE_INLINE inline
     #define NO_INLINE
#endif

I am wondering whether I can get rid of it and use boost for it?

Artem

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net