mirror of
https://github.com/boostorg/iterator.git
synced 2025-11-16 15:39:28 +01:00
Add static_assert messages.
This commit is contained in:
committed by
Georgy Guminov
parent
82b5c44cd3
commit
4ab19e045f
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user