4 * Hewlett-Packard Company
6 * Copyright (c) 1996,1997
7 * Silicon Graphics Computer Systems, Inc.
10 * Moscow Center for SPARC Technology
15 * This material is provided "as is", with absolutely no warranty expressed
16 * or implied. Any use is at your own risk.
18 * Permission to use or copy this software for any purpose is hereby granted
19 * without fee, provided the above notices are retained on all copies.
20 * Permission to modify the code and to distribute modified code is granted,
21 * provided the above notices are retained, and a notice that the code was
22 * modified is included with the above copyright notice.
26 /* NOTE: This is an internal header file, included by other STL headers.
27 * You should not attempt to use it directly.
30 #ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
31 #define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
33 #ifndef _STLP_INTERNAL_ITERATOR_BASE_H
34 # include <stl/_iterator_base.h>
39 template <class _ForwardIterator
, class _Tp
>
40 class raw_storage_iterator
41 : public iterator
<output_iterator_tag
,void,void,void,void>
44 _ForwardIterator _M_iter
;
46 typedef output_iterator_tag iterator_category
;
47 # ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
48 typedef void value_type
;
49 typedef void difference_type
;
51 typedef void reference
;
53 explicit raw_storage_iterator(_ForwardIterator __x
) : _M_iter(__x
) {}
54 raw_storage_iterator
<_ForwardIterator
, _Tp
>& operator*() { return *this; }
55 raw_storage_iterator
<_ForwardIterator
, _Tp
>& operator=(const _Tp
& __element
) {
56 _Param_Construct(&*_M_iter
, __element
);
59 raw_storage_iterator
<_ForwardIterator
, _Tp
>& operator++() {
63 raw_storage_iterator
<_ForwardIterator
, _Tp
> operator++(int) {
64 raw_storage_iterator
<_ForwardIterator
, _Tp
> __tmp
= *this;
70 # ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
71 template <class _ForwardIterator
, class _Tp
>
72 inline output_iterator_tag
iterator_category(const raw_storage_iterator
<_ForwardIterator
, _Tp
>&) { return output_iterator_tag(); }
76 #endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */