diff --git a/test/optional_test_constructible_from_other.cpp b/test/optional_test_constructible_from_other.cpp index e106b69..af85686 100644 --- a/test/optional_test_constructible_from_other.cpp +++ b/test/optional_test_constructible_from_other.cpp @@ -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 > diff --git a/test/optional_test_path_assignment.cpp b/test/optional_test_path_assignment.cpp index 6da6718..fa51fff 100644 --- a/test/optional_test_path_assignment.cpp +++ b/test/optional_test_path_assignment.cpp @@ -15,6 +15,8 @@ #pragma hdrstop #endif +#ifndef BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT +#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS template struct void_t { @@ -42,6 +44,8 @@ struct Path template ::value_type> Path(T const&); }; +#endif +#endif int main() diff --git a/test/optional_test_ref_converting_ctor.cpp b/test/optional_test_ref_converting_ctor.cpp index 81f3c0f..e31904b 100644 --- a/test/optional_test_ref_converting_ctor.cpp +++ b/test/optional_test_ref_converting_ctor.cpp @@ -93,7 +93,9 @@ template void test_all_const_cases() { test_converting_ctor(); +#ifndef BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT test_converting_ctor(); +#endif test_converting_ctor_for_noconst_const(); }