Add static_assert messages.

This commit is contained in:
Georgiy Guminov
2024-06-12 15:56:49 +03:00
committed by Georgy Guminov
parent 82b5c44cd3
commit 4ab19e045f
22 changed files with 189 additions and 135 deletions

View File

@@ -209,7 +209,10 @@ main()
test = static_assert_same<Iter1::pointer, int*>::value;
test = static_assert_same<Iter1::difference_type, std::ptrdiff_t>::value;
#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
static_assert(std::is_convertible<Iter1::iterator_category, std::random_access_iterator_tag>::value, "");
static_assert(
std::is_convertible<Iter1::iterator_category, std::random_access_iterator_tag>::value,
"Iter1::iterator_category must be convertible to std::random_access_iterator_tag."
);
#endif
}
@@ -220,9 +223,9 @@ main()
test = static_assert_same<Iter1::reference, const int&>::value;
#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
static_assert(boost::is_readable_iterator<Iter1>::value, "");
static_assert(boost::is_readable_iterator<Iter1>::value, "Iter1 is expected to be readable.");
# ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(boost::is_lvalue_iterator<Iter1>::value, "");
static_assert(boost::is_lvalue_iterator<Iter1>::value, "Iter1 is expected to be lvalue.");
# endif
#endif
@@ -243,8 +246,14 @@ main()
#endif
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(boost::is_non_const_lvalue_iterator<BaseIter>::value, "");
static_assert(boost::is_lvalue_iterator<Iter>::value, "");
static_assert(
boost::is_non_const_lvalue_iterator<BaseIter>::value,
"boost::is_non_const_lvalue_iterator<BaseIter>::value is expected to be true."
);
static_assert(
boost::is_lvalue_iterator<Iter>::value,
"boost::is_lvalue_iterator<Iter>::value is expected to be true."
);
#endif
typedef modify_traversal<BaseIter, boost::incrementable_traversal_tag> IncrementableIter;