Tests Pass in GCC 4.4.7

Several tests either did not compile or failed upon running when using
GCC 4.4.7.
This commit is contained in:
Robert Leahy
2019-12-22 16:12:28 -05:00
parent 683dbe2412
commit d07ae78901
3 changed files with 12 additions and 4 deletions

View File

@ -26,12 +26,14 @@ struct size_tag {};
template< typename T, typename U >
struct is_constructible
{
template< typename T1, typename U1 >
static yes_type check_helper(size_tag< sizeof(static_cast< T1 >(U1())) >*);
template< typename T1, typename U1 >
static U& get();
template< typename T1 >
static yes_type check_helper(size_tag< sizeof(static_cast< T1 >(get())) >*);
template< typename T1 >
static no_type check_helper(...);
static const bool value = sizeof(check_helper< T, U >(0)) == sizeof(yes_type);
static const bool value = sizeof(check_helper< T >(0)) == sizeof(yes_type);
};
template< typename T >