mirror of
https://github.com/boostorg/ptr_container.git
synced 2026-02-23 16:02:10 +00:00
*** empty log message ***
[SVN r27749]
This commit is contained in:
36
test/convert.cpp
Executable file
36
test/convert.cpp
Executable file
@@ -0,0 +1,36 @@
|
||||
template< class Iter, int Level >
|
||||
struct iterator
|
||||
{
|
||||
typedef Iter type;
|
||||
typedef iterator<Iter,Level-1> next;
|
||||
|
||||
next::type& next;
|
||||
mutable Iter iter_;
|
||||
|
||||
|
||||
Iter& base() const
|
||||
{
|
||||
return iter_;
|
||||
}
|
||||
};
|
||||
|
||||
template< class Iter, class Boxed >
|
||||
Iter unbox( const Boxed& b )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#include <vector>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::vector<int> v;
|
||||
typedef std::vector<int>::iterator iter;
|
||||
|
||||
iterator<iter> i;
|
||||
iter ii = i;
|
||||
|
||||
iterator< iterator<iter> > iii;
|
||||
iter iiii = iii;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user