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

@@ -76,19 +76,29 @@ struct proxy_iterator2
int main()
{
static_assert(boost::is_readable_iterator<v*>::value, "");
static_assert(boost::is_readable_iterator<v const*>::value, "");
static_assert(boost::is_readable_iterator<std::deque<v>::iterator>::value, "");
static_assert(boost::is_readable_iterator<std::deque<v>::const_iterator>::value, "");
static_assert(!boost::is_readable_iterator<std::back_insert_iterator<std::deque<v> > >::value, "");
static_assert(!boost::is_readable_iterator<std::ostream_iterator<v> >::value, "");
static_assert(boost::is_readable_iterator<proxy_iterator>::value, "");
static_assert(!boost::is_readable_iterator<proxy_iterator2>::value, "");
static_assert(boost::is_readable_iterator<value_iterator>::value, "");
static_assert(boost::is_readable_iterator<v*>::value,
"boost::is_readable_iterator<v*>::value is expected to be true.");
static_assert(boost::is_readable_iterator<v const*>::value,
"boost::is_readable_iterator<v const*>::value is expected to be true.");
static_assert(boost::is_readable_iterator<std::deque<v>::iterator>::value,
"boost::is_readable_iterator<std::deque<v>::iterator>::value is expected to be true.");
static_assert(boost::is_readable_iterator<std::deque<v>::const_iterator>::value,
"boost::is_readable_iterator<std::deque<v>::const_iterator>::value is expected to be true.");
static_assert(!boost::is_readable_iterator<std::back_insert_iterator<std::deque<v>>>::value,
"boost::is_readable_iterator<std::back_insert_iterator<std::deque<v>>>::value is expected to be false.");
static_assert(!boost::is_readable_iterator<std::ostream_iterator<v>>::value,
"boost::is_readable_iterator<std::ostream_iterator<v>>::value is expected to be false.");
static_assert(boost::is_readable_iterator<proxy_iterator>::value,
"boost::is_readable_iterator<proxy_iterator>::value is expected to be true.");
static_assert(!boost::is_readable_iterator<proxy_iterator2>::value,
"boost::is_readable_iterator<proxy_iterator2>::value is expected to be false.");
static_assert(boost::is_readable_iterator<value_iterator>::value,
"boost::is_readable_iterator<value_iterator>::value is expected to be true.");
// Make sure inaccessible copy constructor doesn't prevent
// readability
static_assert(boost::is_readable_iterator<noncopyable_iterator>::value, "");
static_assert(boost::is_readable_iterator<noncopyable_iterator>::value,
"boost::is_readable_iterator<noncopyable_iterator>::value is expected to be true.");
return 0;
}