mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 16:12:10 +02:00
Added lvalue test
[SVN r8922]
This commit is contained in:
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
// This is meant to be the beginnings of a comprehensive, generic
|
// This is meant to be the beginnings of a comprehensive, generic
|
||||||
// test suite for STL concepts such as iterators and containers.
|
// test suite for STL concepts such as iterators and containers.
|
||||||
|
//
|
||||||
|
// Revision History:
|
||||||
|
// 04 Feb 2001 Added lvalue test (David Abrahams)
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@ -87,6 +89,10 @@ template <class Iterator, class T>
|
|||||||
void forward_iterator_test(Iterator i, T v1, T v2)
|
void forward_iterator_test(Iterator i, T v1, T v2)
|
||||||
{
|
{
|
||||||
input_iterator_test(i, v1, v2);
|
input_iterator_test(i, v1, v2);
|
||||||
|
|
||||||
|
// Test for lvalue
|
||||||
|
const T* p = &*i;
|
||||||
|
(void)p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preconditions: *i == v1, *++i == v2
|
// Preconditions: *i == v1, *++i == v2
|
||||||
|
Reference in New Issue
Block a user