Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Support for Type Properties in g++

When can we expect support for the standard type properties in g++? libstdc++ provides support for most of the type properties, with some requiring support from special GNU extensions. However, it would be nice to have complete support for <type_traits>, and I am wondering when that will be. I tried inquiring the libstdc++ mailing list, but unfortunately received no response.

If you are wondering which type properties are lacking support, here are some of them:

Missing is_trivially_copyable, is_assignable, is_copy_assignable, is_move_assignable, is_trivially_constructible, is_trivially_default_constructible, is_trivially_copy_constructible, is_trivially_move_constructible, is_trivially_assignable, is_trivially_default_assignable, is_trivially_copy_assignable, is_trivially_move_assignable, is_trivially_destructible, is_nothrow_assignable, is_nothrow_copy_assignable, is_nothrow_move_assignable, is_nothrow_destructible

Source: search for "Type properties" here.

Thanks for your help!

like image 417
void-pointer Avatar asked Nov 04 '22 18:11

void-pointer


1 Answers

They're part of the standard library, so they're provided by libstdc++, not the compiler front-end, and there's support for most of in libstdc++.

The few that are missing were added late in the C++0x process by N3142 but libstdc++ still provides the older forms such as has_trivial_default_constructor instead of is_trivially_default_constructible.

As for when, "it depends". See http://gcc.gnu.org/ml/libstdc++/2012-08/msg00037.html and the following replies.

like image 138
Jonathan Wakely Avatar answered Nov 12 '22 18:11

Jonathan Wakely