
On 28 May 2011 23:47, Bryce Lelbach <blelbach@cct.lsu.edu> wrote:
John, Clang has supported GCC style type trait intrinsics (__is_pod, etc) for awhile. The <boost/type_traits/intrinsics.hpp> header doesn't detect this. May I fix this?
I just noticed this change. To avoid warnings, you should check that a macro is defined before using it. Common macros can be added to detail/workaround.hpp to make that easier. Although in this case I think we should be using clang's feature checking macros. For example (untested): #if defined(__has_extension) # if __has_extension(is_union) # define BOOST_IS_UNION(T) __is_union(T) # endif // .... #endif Maybe it should also check for clang first. That's pretty verbose though, perhaps something to consider for a future release. But it should be more robust than checking version numbers.