id summary reporter owner description type status milestone component version severity resolution keywords cc 5635 compile error due to __is_pod conflicts with clang 3.x on osx 10.6 Dane Springmeyer John Maddock "Boost trunk no longer compiles with clang trunk on my system (mac osx 10.6) if a header like `boost/iterator/iterator_facade.hpp` or `boost/filesystem/operations.hpp` is included that leverages `type_traits/is_pod.hpp`. A simple test case is: `clang++ -o test.o -c -I/opt/boost-trunk/include test.cpp` {{{ #include int main() { return 0; } }}} This results in: {{{ In file included from test.cpp:1: In file included from test.cpp:1: In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26: /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:129: error: 'T' does not refer to a value ...= (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value); ^ /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:38:20: note: declared here template struct is_pod_impl ^ /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:141: error: type name requires a specifier or qualifier ...= (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value); ^ /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:141: error: C++ requires a type specifier for all declarations ...= (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value); ^ /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:141: error: expected ')' /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:31: note: to match this '(' static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ... ^ 4 errors generated. }}} See also: http://dbsgeo.com/tmp/clang-boost-error.ii I am seeing this with boost trunk svn r72721 and clang trunk: {{{ $ clang -v clang version 3.0 (trunk 131789) Target: x86_64-apple-darwin10.7.0 Thread model: posix }}} Developers on the #llvm irc.oftc.net channel helped advise that the reason is likely conflicting __is_pod definitions. To quote the details: {{{ there's a horrible compatibility hack in clang to cope with gcc's treatment of __is_pod basically, __is_pod is a compiler intrinsic, unless it's defined as an identifier, at which point it loses its magic this is because gcc <4.4 defined an __is_pod struct in libstdc++ and gcc>=4.4 define an __is_pod intrinsic (iirc) type_traits/intrinsics.hpp is using __is_pod as the definition of BOOST_IS_POD, which would be fine, except that your translation unit also pulls in libstdc++ 4.2.1's bits/cpp_type_traits.h, which defines __is_pod }}}" Bugs closed To Be Determined type_traits Boost Development Trunk Regression fixed