[cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7

Tom Stellard via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 7 03:43:49 PDT 2017


On 07/07/2017 03:23 AM, Katsuhiko Nishimra via cfe-dev wrote:
> Dear developers,
> 
> As of r307243, clang++ seems to have the __is_aggregate() builtin
> macro, but __has_builtin(__is_aggregate) returns false.  This is
> rendering std::is_aggregate from libstdc++-7 unusable with clang++.
> 

Is this a regression?  Also, can you file a bug at bugs.llvm.org and
add me as a cc: tstellar at gmail.com.

Thanks,
Tom

> I have tested the code below with clang-5.0=5.0~svn307243-1 package from
> apt.llvm.org on a debian unstable box.
> 
> #include <iostream>
> 
> int main(void){
> 	std::cout << "__has_builtin(__is_aggregate) = " <<  __has_builtin(__is_aggregate) << std::endl;
> 	std::cout << "__is_aggregate(int[42]) = " <<  __is_aggregate(int[42]) << std::endl;
> 	std::cout << "__is_aggregate(std::string) = " <<  __is_aggregate(std::string) << std::endl;
> 	return 0;
> }
> 
> result: 
> __has_builtin(__is_aggregate) = 0
> __is_aggregate(int[42]) = 1
> __is_aggregate(std::string) = 0
> 
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 




More information about the cfe-dev mailing list