This patch adds new code to check if a given object is trivially
destructible. The ifdefs where necessary to implement it in gcc, as it
doesn't have the __is_trivially_destructible builtin like clang.
In gcc, it's not enough to only call __has_trivial_destructor, see:
https://stackoverflow.com/questions/20181702/which-type-traits-cannot-be-implemented-without-compiler-hooks
This patch only adds the new check, it will be used in D150211.
Internal types have been listed in nested namespace named details in this file. So, you should follow that convention.