mirror of
https://github.com/boostorg/optional.git
synced 2025-07-15 05:16:36 +02:00
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:
@ -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 >
|
||||
|
@ -15,6 +15,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
|
||||
template <typename, typename>
|
||||
struct void_t
|
||||
{
|
||||
@ -42,6 +44,8 @@ struct Path
|
||||
template <typename T, typename = BOOST_DEDUCED_TYPENAME trait<T>::value_type>
|
||||
Path(T const&);
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
int main()
|
||||
|
@ -93,7 +93,9 @@ template <typename T>
|
||||
void test_all_const_cases()
|
||||
{
|
||||
test_converting_ctor<T>();
|
||||
#ifndef BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
|
||||
test_converting_ctor<const T>();
|
||||
#endif
|
||||
test_converting_ctor_for_noconst_const<T>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user