c++ - why doesn't clang++ compile the following code? -
i have following code: #include <type_traits> int main() { } g++ file.cc -std=c++0x works fine. however, need use clang++ reason. when try clang++ file.cc -std=c++0x i bunch of errors: in file included file.cc:1: in file included /usr/include/c++/4.4.4/type_traits:50: /usr/include/c++/4.4.4/tr1_impl/type_traits:230:41: error: expected ')' struct is_function<_res(_argtypes......)> ^ /usr/include/c++/4.4.4/tr1_impl/type_traits:230:28: note: match '(' struct is_function<_res(_argtypes......)> ^ /usr/include/c++/4.4.4/tr1_impl/type_traits:230:12: error: redefinition of 'is_function<type-parameter-0-0 (type-parameter-0-1, ...)>' struct is_function<_res(_argtypes......)> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/4.4.4/tr1_impl/type_traits:227:12: note: previous definition here struct is_function<_res(_argtypes......