forked from boostorg/type_traits
Assert completeness fixes: fix up msvc failures.
This commit is contained in:
1 parent
bfb6384a0a
commit
0886e13a99
6 files changed
+24
-5
No files matched your search
@@ -27,6 +27,12 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
||||
//
|
||||
// We will undef this if the trait isn't fully functional:
|
||||
//
|
||||
#define BOOST_TT_HAS_WORKING_IS_COMPLETE
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1900)
|
||||
|
||||
namespace detail{
|
||||
@@ -74,6 +80,8 @@ namespace boost {
|
||||
template <class T> struct is_complete
|
||||
: public integral_constant<bool, true> {};
|
||||
|
||||
#undef BOOST_TT_HAS_WORKING_IS_COMPLETE
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
@@ -489,7 +489,10 @@ struct is_convertible : public integral_constant<bool, ::boost::detail::is_conve
|
||||
template <class From, class To>
|
||||
struct is_convertible : public integral_constant<bool, BOOST_IS_CONVERTIBLE(From, To)>
|
||||
{
|
||||
#ifdef __clang__
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1900)
|
||||
BOOST_STATIC_ASSERT_MSG(boost::is_complete<From>::value || boost::is_void<From>::value || boost::is_array<From>::value || boost::is_reference<From>::value, "From argument type to is_convertible must be a complete type");
|
||||
#endif
|
||||
#if defined(__clang__)
|
||||
// clang's intrinsic doesn't assert on incomplete types:
|
||||
BOOST_STATIC_ASSERT_MSG(boost::is_complete<To>::value || boost::is_void<To>::value || boost::is_array<To>::value, "Destination argument type to is_convertible must be a complete type");
|
||||
BOOST_STATIC_ASSERT_MSG(boost::is_complete<From>::value || boost::is_void<From>::value || boost::is_array<From>::value, "From argument type to is_convertible must be a complete type");
|
||||
|
||||
Reference in new issue
Block a user