Support for type properties in g ++

When can we expect support for the properties of standard types in g ++? libstdC ++ provides support for most type properties, and some require support from special GNU extensions . However, it would be nice to have full support for <type_traits> , and I wonder when it will be. I tried to request the libstdc ++ mailing list, but unfortunately did not receive a response.

If you're curious about which type properties don't have support, here are some of them:

No 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 .

Thank you for your help!

+5
c ++ gcc c ++ 11 g ++ typetraits
source share
1 answer

They are part of the standard library, so they are provided by libstdC ++, not the compiler, and support most of them in libstdC ++.

The few that were missing were added at the end of the C ++ 0x process using N3142 , but libstdC ++ still provides 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 answers.

+2
source share

All Articles